utils 0.0.41 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -0
- data/VERSION +1 -1
- data/lib/utils/editor.rb +8 -4
- data/lib/utils/finder.rb +1 -1
- data/lib/utils/grepper.rb +2 -4
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +2 -2
- metadata +3 -3
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.42
|
data/lib/utils/editor.rb
CHANGED
@@ -113,7 +113,11 @@ module Utils
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def edit_file(*filenames)
|
116
|
-
|
116
|
+
if gui
|
117
|
+
edit_remote_file(*filenames)
|
118
|
+
else
|
119
|
+
cmd(vim, *filenames)
|
120
|
+
end
|
117
121
|
end
|
118
122
|
|
119
123
|
def edit_file_linenumber(filename, linenumber)
|
@@ -165,15 +169,15 @@ module Utils
|
|
165
169
|
end
|
166
170
|
|
167
171
|
def edit_remote(*args)
|
168
|
-
cmd(vim, gui, '--servername', servername, '--remote', *args)
|
172
|
+
gui and cmd(vim, gui, '--servername', servername, '--remote', *args)
|
169
173
|
end
|
170
174
|
|
171
175
|
def edit_remote_wait(*args)
|
172
|
-
cmd(vim, gui, '--servername', servername, '--remote-wait', *args)
|
176
|
+
gui and cmd(vim, gui, '--servername', servername, '--remote-wait', *args)
|
173
177
|
end
|
174
178
|
|
175
179
|
def edit_remote_send(*args)
|
176
|
-
cmd(vim, gui, '--servername', servername, '--remote-send', *args)
|
180
|
+
gui and cmd(vim, gui, '--servername', servername, '--remote-send', *args)
|
177
181
|
end
|
178
182
|
|
179
183
|
def edit_remote_file(*filenames)
|
data/lib/utils/finder.rb
CHANGED
@@ -53,7 +53,7 @@ class Utils::Finder
|
|
53
53
|
def search
|
54
54
|
pathes = []
|
55
55
|
suffixes = @args['I'].ask_and_send(:split, /[\s,]+/).to_a
|
56
|
-
find(
|
56
|
+
find(*[ @roots, { :suffix => suffixes } ]) do |filename|
|
57
57
|
begin
|
58
58
|
bn, s = filename.pathname.basename, filename.stat
|
59
59
|
if s.directory? && @config.discover.prune?(bn)
|
data/lib/utils/grepper.rb
CHANGED
@@ -149,10 +149,8 @@ class Utils::Grepper
|
|
149
149
|
|
150
150
|
def search
|
151
151
|
suffixes = @args['I'].ask_and_send(:split, /[\s,]+/).to_a
|
152
|
-
|
153
|
-
|
154
|
-
match(filename)
|
155
|
-
end
|
152
|
+
find(*[ @roots, { :suffix => suffixes } ]) do |filename|
|
153
|
+
match(filename)
|
156
154
|
end
|
157
155
|
if @args['L'] or @args['e']
|
158
156
|
@pathes = @pathes.sort_by do |path|
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "utils"
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.42"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Florian Frank"]
|
9
|
-
s.date = "2012-04-
|
9
|
+
s.date = "2012-04-24"
|
10
10
|
s.description = "This ruby gem provides some useful command line utilities"
|
11
11
|
s.email = "flori@ping.de"
|
12
12
|
s.executables = ["untest", "chroot-libs", "edit_wait", "chroot-exec", "number_files", "search", "strip_spaces", "path", "enum", "edit", "git-empty", "classify", "utils-install-config", "xmp", "discover", "sshscreen", "myex", "probe", "errf", "same_files", "utils-utilsrc", "unquarantine_apps", "vacuum_firefox_sqlite", "sedit"]
|
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.0.
|
4
|
+
version: 0.0.42
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gem_hadar
|
@@ -255,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
segments:
|
257
257
|
- 0
|
258
|
-
hash:
|
258
|
+
hash: 187006888137579121
|
259
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
260
|
none: false
|
261
261
|
requirements:
|