Skip to content

Instantly share code, notes, and snippets.

@pvalena
Created January 16, 2021 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvalena/480cd29fc875a09f3ae9081ed2183455 to your computer and use it in GitHub Desktop.
Save pvalena/480cd29fc875a09f3ae9081ed2183455 to your computer and use it in GitHub Desktop.
+ rpmdev-bumpspec -c 'Update to pathutil 0.16.2.
Resolves: rhbz#1504400' -n 0.16.2 fedora/packages/rubygem-pathutil/rubygem-pathutil.spec
<p align=center>
<a href=https://goo.gl/BhrgjW>
<img src=https://envygeeks.io/badges/paypal-large_1.png alt=Donate>
</a>
<br>
<a href=https://travis-ci.org/envygeeks/pathutil>
<img src="https://travis-ci.org/envygeeks/pathutil.svg?branch=master">
</a>
</div>
# Pathutil
Pathutil tries to be a faster pure Ruby impelementation of Pathname. It
arose out of a need to fix basic problems with Pathname, such as suscepetibility
to join overrides, need for automatic encoding, and normalization (for stuff
like Jekyll) and the ability to do other safe-style operations in an
encapsulated format, like copying files and folders with symlinks
but only if they originate from the given root.
### Diverging (or New/Extra) Methods
- `encoding`, `encoding=` - Set the read/write encoding.
- `normalize` - `crlf` => `lf` (read), `lf` => `crlf` (write).
- `!~`, `=~` - Regexp operations on the path, behaves normally.
- `search_backwards` - Allows you to search backwards for a file or folder.
- `>=`, `>` - Check if a file is in but ahead of a path: `Pathutil.new("/tmp/hello") > "/tmp" # => true`
- `in_path?` - Check if a file is within a given path: `Pathutil.new("/tmp/hello").in_path?("/tmp") # => true`
- `<=`, `<` - Check if a file is in but below a path: `Pathutil.new("/tmp") < "/tmp/hello" # => true`
- `read_yaml` - a wrapper around `Yaml.safe_load` and `SafeYAML` to make reading `YAML` easy.
- `children` - behaves like Pathname, except it accepts a block to work on the path.
- `safe_copy` - Copy files, disallowing symlinks unless `in_path?`
- `enforce_root` - Force a root if not already in that root.
- `read_yaml` - Read YAML with or without safe.
- `unlink` - Behaves like File.
`touch`, `rm_r`, `link`, `symlink`, `cp_r`, `rm`, `cp`, `rm_rf`, `first` (alias of `dirname`), `shellescape`, `to_regexp`, `chdir`, `glob` (does `chdir` first), `gsub` (works on `@path`), `chomp` (works on `@path`), `mkdir_p`, `to_str` (alias of `to_s`), `to_a` (alias of `children`), `regexp_escape`, `last` (alias of `basename`), `to_pathname`, `split_path`, `read_json`, `rm_f`
## Current (All) Methods
Pathutil has and responds to all methods that Pathname provides and forwards
them where they need to go with wrappers if necessary and with our `@path` as
the first argumement on our behalf. It is a true encapsulator with a few
extra helpers to make your life easy.
`relative_path_from`, `touch`, `mkpath`, `rmtree`, `rm_r`, `sub_ext`, `directory?`, `exist?`, `opendir`, `readable?`, `readable_real?`, `world_readable?`, `writable?`, `writable_real?`, `world_writable?`, `executable?`, `executable_real?`, `file?`, `size?`, `owned?`, `grpowned?`, `pipe?`, `symlink?`, `socket?`, `blockdev?`, `chardev?`, `setuid?`, `setgid?`, `sticky?`, `stat`, `lstat`, `ftype`, `atime`, `mtime`, `ctime`, `birthtime`, `utime`, `chmod`, `chown`, `lchmod`, `lchown`, `link`, `symlink`, `readlink`, `truncate`, `rename`, `find`, `unlink`, `expand_path`, `normalize`, `realpath`, `<`, `basename`, `>`, `realdirpath`, `extname`, `dirname`, `cp_r`, `rm`, `zero?`, `make_link`, `cp`, `rm_rf`, `entries`, `/`, `+`, `make_symlink`, `first`, `to_path`, `each_entry`, `shellescape`, `to_regexp`, `chdir`, `mkdir`, `rmdir`, `glob`, `fnmatch?`, `<=`, `>=`, `fnmatch`, `split`, `read`, `write`, `sub`, `gsub`, `chomp`, `mkdir_p`, `open`, `readlines`, `delete`, `size`, `each_line`, `sysopen`, `encoding`, `binwrite`, `binread`, `to_str`, `to_a`, `split_path`, `to_pathname`, `read_yaml`, `read_json`, `in_path?`, `regexp_escape`, `enforce_root`, `parent`, `safe_copy`, `root?`, `absolute?`, `relative?`, `each_filename`, `descend`, `last`, `ascend`, `join`, `encoding=`, `mountpoint?`, `children`, `each_child`, `rm_f`
SHA512 (pathutil-0.16.2.gem) = 76c63bc75d9c1128e921efe0a9b830ee166618d3ca61ff839429efeefa249d30c50c5062c3d430bb7f321e56da15549c85cc36bd0a758998e2c743cf781d68fa
SHA512 (pathutil-README.md) = 4be3f9ec3181c458409bfcc54a94a7631609d06a7a32f2336413803c90a96e5fbc47e5ff17d722b33af12406371f26a425aa2f8fcceb1ffead30dbe4e43bb266
[rebase be02f03] Update to pathutil 0.16.2.
2 files changed, 8 insertions(+), 3 deletions(-)
NOTE: Gem::Specification#has_rdoc is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc called from /usr/share/gems/gems/gem-compare-0.0.7/lib/rubygems/comparator/utils.rb:112.
NOTE: Gem::Specification#has_rdoc is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc called from /usr/share/gems/gems/gem-compare-0.0.7/lib/rubygems/comparator/utils.rb:112.
Compared versions: ["0.14.0", "0.16.2"]
DIFFERENT homepage:
0.14.0: http://github.com/envygeeks/pathutils
0.16.2: http://github.com/envygeeks/pathutil
DIFFERENT Gemfile dependencies
0.14.0->0.16.2:
* Added:
simplecov [">= 0"]
* Deleted
codeclimate-test-reporter [">= 0"]
luna-rubocop-formatters [">= 0"]
> Continue with commit ammend.
[rebase faa3db1] Update to pathutil 0.16.2.
Date: Sat Jan 16 15:59:03 2021 +0100
2 files changed, 8 insertions(+), 3 deletions(-)
commit faa3db1510caaf90c0e2ed96f36165c1456aed40
Author: Pavel Valena <pvalena@redhat.com>
Date: Sat Jan 16 15:59:03 2021 +0100
Update to pathutil 0.16.2.
Resolves: rhbz#1504400
diff --git a/rubygem-pathutil.spec b/rubygem-pathutil.spec
index 337561c..ab07872 100644
--- a/rubygem-pathutil.spec
+++ b/rubygem-pathutil.spec
@@ -2,8 +2,8 @@
%global gem_name pathutil
Name: rubygem-%{gem_name}
-Version: 0.14.0
-Release: 9%{?dist}
+Version: 0.16.2
+Release: 1%{?dist}
Summary: Faster pure Ruby implementation of Pathname with extra bits
License: MIT
@@ -63,6 +63,10 @@ This package contains the documentation files for %{name}.
%changelog
+* Sat Jan 16 2021 Pavel Valena <pvalena@redhat.com> - 0.16.2-1
+- Update to pathutil 0.16.2.
+ Resolves: rhbz#1504400
+
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
diff --git a/sources b/sources
index 859c1eb..66685f8 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-56116772eb89fa26b5830d6961fb0e99 pathutil-0.14.0.gem
+SHA512 (pathutil-0.16.2.gem) = 76c63bc75d9c1128e921efe0a9b830ee166618d3ca61ff839429efeefa249d30c50c5062c3d430bb7f321e56da15549c85cc36bd0a758998e2c743cf781d68fa
+SHA512 (pathutil-README.md) = 4be3f9ec3181c458409bfcc54a94a7631609d06a7a32f2336413803c90a96e5fbc47e5ff17d722b33af12406371f26a425aa2f8fcceb1ffead30dbe4e43bb266
On branch rebase
Your branch is ahead of 'pvalena/rebase' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit (use -u to show untracked files)
remote: Sending to redis to log activity and send commit notification emails
remote: * Publishing information for 1 commits
remote: - to fedora-message
remote:
remote: Create a pull-request for rebase
remote: https://src.fedoraproject.org/fork/pvalena/rpms/rubygem-pathutil/diff/master..rebase
remote:
To ssh://pkgs.fedoraproject.org/forks/pvalena/rpms/rubygem-pathutil.git
5a2654c..faa3db1 rebase -> rebase
Branch 'rebase' set up to track remote branch 'rebase' from 'pvalena'.
> Run copr build.
+ scripts/pkgs/cr-build.sh -c -t 30m rubygems
Created builds: 1881767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment