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 +4 -4
- data/bin/discover +1 -1
- data/bin/search +1 -1
- data/lib/utils/grepper.rb +1 -1
- data/lib/utils/version.rb +1 -1
- data/lib/utils/xdg.rb +8 -12
- data/utils.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11c3f0c005743ebba2c7f6e88075ccf2b600c96a2a7a61fdbf71a3912ed167e7
|
|
4
|
+
data.tar.gz: 0a477a003d9d890075fd2f403eb0fbff26d7d4629af84a46862b5ec8b4f0d4fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
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
|
-
|
|
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
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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.
|
|
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.
|
|
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]
|