utils 0.86.0 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45dd9d630295ca603cefea5e05cc519293f601ca3870238d964346a0e152cf36
4
- data.tar.gz: 599507eeab4466076016b42fda07110222c54820fcfc79bfa718664a9d3e0c43
3
+ metadata.gz: 11c3f0c005743ebba2c7f6e88075ccf2b600c96a2a7a61fdbf71a3912ed167e7
4
+ data.tar.gz: 0a477a003d9d890075fd2f403eb0fbff26d7d4629af84a46862b5ec8b4f0d4fa
5
5
  SHA512:
6
- metadata.gz: fd971b240d210063700fa81259cd64e9d3795cfa5cc50c7bdbff1e5f17e67240f24ca8c2bd6b00ee714fd0d168c70b361a605703094cdd2a56a9ba19c9a43a9e
7
- data.tar.gz: a9602ee4790e2be111ee2994e859f6d6a3c0ef4f6b5c518b9db46c4ee591558ece2fb38411bbdf0822a7bc35931ae2684065a39c5aa06ee54c2abc149fa7ddb7
6
+ metadata.gz: 6149a5155835a3f6cc8acd7e20fd5ff931a4a45f3d26240937891e893a736376f8703d1cfcbca63d85369e7a06278bfe663d70c5454e54d9917ede6476b0538b
7
+ data.tar.gz: d12dc91177ada52d0dd1a0884bc975745791656f9058d4a01b95bf0b431355ab9102af178b9398bb34105fe3a1fa9b6e265052727d5ef248aab7927b755a2318
data/bin/discover CHANGED
@@ -85,7 +85,7 @@ Options are
85
85
  -n NUMBER the first NUMBER of matches is returned
86
86
  -s search by interactively inputting PATTERN
87
87
  -l list all paths in cache relative to current directory
88
- -L list all paths in cahce as absolute pathes from root
88
+ -L list all paths in cache as absolute pathes from root
89
89
  -h display this help
90
90
 
91
91
  Version is #{File.basename($0)} #{Utils::VERSION}.
data/bin/search CHANGED
@@ -206,7 +206,7 @@ def usage
206
206
  -B NUMBER displays NUMBER lines of context before the match
207
207
  -C NUMBER displays NUMBER lines of context around the match
208
208
  -f just list the paths of the files that would be searched
209
- -F just consider real files when searching
209
+ -F follow symlinks when searching
210
210
  -l just list the paths of the files with matches
211
211
  -L list only the path:linenumber of the files with matches
212
212
  -pX interpret PATTERN argument as X=f fuzzy or X=r for regexp
data/lib/utils/grepper.rb CHANGED
@@ -249,7 +249,7 @@ class Utils::Grepper
249
249
  if !s ||
250
250
  s.directory? && @config.search.prune?(bn) ||
251
251
  (s.file? || s.symlink?) && @config.search.skip?(bn) ||
252
- @args[?F] && s.symlink?
252
+ !@args[?F] && s.symlink?
253
253
  then
254
254
  @args[?v] and warn "Pruning #{filename.inspect}."
255
255
  prune
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.86.0'
3
+ VERSION = '0.87.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/lib/utils/xdg.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'pathname'
2
2
  require 'fileutils'
3
+ require 'stringio'
3
4
 
4
5
  # Module for handling XDG base directory specifications and application
5
6
  # directory management.
@@ -91,19 +92,14 @@ module Utils::XDG
91
92
  end
92
93
  end
93
94
 
94
- # The join method creates a new path by combining the current path with a
95
- # given path component.
96
- #
97
- # This method takes a path string and appends it to the current path,
98
- # returning a new Pathname object that represents the combined path.
99
- #
100
- # @param path [ String ] the path component to append to the current path
101
- #
102
- # @return [ Pathname ] a new Pathname object representing the joined path
103
- def join(path)
104
- self.class.new(File.join(to_s, path))
95
+ %i[
96
+ join + dirname basename realpath expand_path cleanpath
97
+ relative_path_from
98
+ ].each do |id|
99
+ define_method(id) do |*args, **kw, &block|
100
+ self.class.new(super(*args, **kw, &block))
101
+ end
105
102
  end
106
- alias + join
107
103
 
108
104
  alias to_str to_s
109
105
  end
data/utils.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.86.0 ruby lib
2
+ # stub: utils 0.87.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.86.0".freeze
6
+ s.version = "0.87.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.86.0
4
+ version: 0.87.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank