gem-ag 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gem-ag.gemspec +1 -1
- data/lib/rubygems/commands/ag_command.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86494057d2ab66fb922f65321751d69cf86764c2
|
4
|
+
data.tar.gz: 713ba7d395b9327893eb60507cbef89de744d77b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ec3cf401d2448813a1bb7b33a37359dbd750782e316bff917317814bb67beb7303418f2dee5d456a34321df383446df54435bb2bbfa32a046f5f3c27b0eac8a
|
7
|
+
data.tar.gz: 48be90ac900e5f88eaaccaadd9b0e9d757c0e6c440cbc9e5db94237a4efd4cfbe112f5ac5a4fb93bf17c28f74df2d59cdfe3dccb38c46231fcc41bee17fecbc7
|
data/gem-ag.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "gem-ag"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.5"
|
8
8
|
spec.authors = ["Christopher Sexton"]
|
9
9
|
spec.email = ["github@codeography.com"]
|
10
10
|
spec.summary = %q{Search installed gems with ag}
|
@@ -44,8 +44,17 @@ class Gem::Commands::AgCommand < Gem::Command
|
|
44
44
|
def add_ag_opts(list)
|
45
45
|
list.each do |current_opt|
|
46
46
|
add_option(*current_opt) do |value, options|
|
47
|
+
# We need to get the flag to put on the command line. We can grab that
|
48
|
+
# from the first `current_opt` because each definition has to start
|
49
|
+
# with the option name. We want to split it on space because it might
|
50
|
+
# designate a parameter (in the form of "--ignore PATTERN"). Ain't
|
51
|
+
# pretty but gets the job done.
|
47
52
|
ag_flags << current_opt.first.split(' ').first
|
48
|
-
|
53
|
+
|
54
|
+
# If `value` is `true` or `false` assume this is a option that takes a
|
55
|
+
# parameter and stuff that param in the array after the flag.
|
56
|
+
ag_flags << value unless (value === true || value === false)
|
57
|
+
|
49
58
|
end
|
50
59
|
end
|
51
60
|
end
|