rbfind 2.14 → 2.14.1
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/rbfind +16 -9
- data/lib/rbfind.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d750bcaf97eb7cb1c8bdf3d5da1fd091504914e513b0ca1f078e319786a8741
|
4
|
+
data.tar.gz: 600367ca7afd454f9f7389b5e070e1049092b54111701e608277a80ace4f0cb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a888f1f8c8d4637e2bb010d2b1d43bdae5f6ff2a466bff266736a23051fea02168369dc182f8b7c27067727181f5a6c45ac6d4c09550d571846dd3a3f74e6b00
|
7
|
+
data.tar.gz: 1542a6f350f2c5687ef2fb4f2a07dac150c9811c62adea5abbb95afa649a095d4007c5260e0e87f83031970febcf7e46ce874427295ebd4b3f2a50da6e7c4623
|
data/bin/rbfind
CHANGED
@@ -62,7 +62,7 @@ module RbFind
|
|
62
62
|
option %w(N nodirs ), "skip directories" do @nodirs = true ; end
|
63
63
|
option %w(B begin ), "eval block before begin" do |blk| @blkbegin = blk ; end
|
64
64
|
option %w(E end ), "eval block after end" do |blk| @blkend = blk ; end
|
65
|
-
option %w(f file ), "read block expression from file" do |nam| @block = File.
|
65
|
+
option %w(f file ), "read block expression from file" do |nam| @block = File.read nam ; end
|
66
66
|
option %w(K encoding ), "encoding extern[:intern] (same as ruby -E)" do |str| e, i = str.split ":", 2 ; set_encoding e, i ; end
|
67
67
|
option %w( width-user), "width of user field" do |num| @wdu = num.to_i.nonzero? ; end
|
68
68
|
option %w( width-size), "width of size field" do |num| @wds = num.to_i.nonzero? ; end
|
@@ -126,12 +126,18 @@ module RbFind
|
|
126
126
|
end
|
127
127
|
|
128
128
|
def join_code a, ind = 0
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
129
|
+
r = a.map { |e|
|
130
|
+
q = case e
|
131
|
+
when Array then
|
132
|
+
join_code e, ind + 1
|
133
|
+
else
|
134
|
+
INDENT * ind + e.to_s
|
135
|
+
end
|
136
|
+
q.rstrip!
|
137
|
+
q unless q.empty?
|
138
|
+
}
|
139
|
+
r.compact!
|
140
|
+
r.join "\n"
|
135
141
|
end
|
136
142
|
|
137
143
|
def build_block
|
@@ -148,7 +154,7 @@ module RbFind
|
|
148
154
|
when :grep then
|
149
155
|
ic = Regexp::IGNORECASE if @icase
|
150
156
|
color = ", true" if co
|
151
|
-
@block = [ "grep %r#{build_re @block, ic}#{color}"]
|
157
|
+
@block = [ "grep %r#{build_re @block.to_s, ic}#{color}"]
|
152
158
|
@block.push "$stdout.flush" unless $stdout.tty?
|
153
159
|
@binary or @block = [ "unless binary? then", @block, "end"]
|
154
160
|
|
@@ -161,6 +167,7 @@ module RbFind
|
|
161
167
|
@block = @args.pop
|
162
168
|
end
|
163
169
|
end
|
170
|
+
@block = [ @block]
|
164
171
|
output = case @puts
|
165
172
|
when :ls then long_fmt false, false, "mtime.lsish", opath, co
|
166
173
|
when :alt then long_fmt true, true, "mtime.long", opath, co
|
@@ -168,7 +175,7 @@ module RbFind
|
|
168
175
|
when :ino then [ "spcsep ino.w8, nlink.w2, #{opath}"]
|
169
176
|
when :plain then [ "puts #{opath}"]
|
170
177
|
end
|
171
|
-
output and @block = [ "if (",
|
178
|
+
output and @block = [ "if (", @block, ") then", output, "end"]
|
172
179
|
|
173
180
|
end
|
174
181
|
|
data/lib/rbfind.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbfind
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
@@ -33,7 +33,7 @@ files:
|
|
33
33
|
- lib/rbfind/table.rb
|
34
34
|
homepage: http://www.bertram-scharpf.de/software/rbfind
|
35
35
|
licenses:
|
36
|
-
- BSD-2-Clause
|
36
|
+
- BSD-2-Clause+
|
37
37
|
metadata: {}
|
38
38
|
rdoc_options: []
|
39
39
|
require_paths:
|