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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25a0eb5788b4351b8b1eac2a766034a897ea6008
4
- data.tar.gz: da8c173e32cd45175f1d7c8ce34bae3325207ad8
3
+ metadata.gz: 86494057d2ab66fb922f65321751d69cf86764c2
4
+ data.tar.gz: 713ba7d395b9327893eb60507cbef89de744d77b
5
5
  SHA512:
6
- metadata.gz: 7054b5fd73f84450e66efb29660f17d44196849337871c687b722d5087bc32f64563c1aa87c388fab73e0c09f1779f0c0ec25517c46dba14a0852bdba95c4be1
7
- data.tar.gz: 89c10691ba90669bc754ebc68fa22e0b533b14ae6bf4373c55ba5a4d037257c530d6e60bec215c1eed2838ffc9facff05dbc959ef0d6d2d6d7aacdb0a460a4a4
6
+ metadata.gz: 7ec3cf401d2448813a1bb7b33a37359dbd750782e316bff917317814bb67beb7303418f2dee5d456a34321df383446df54435bb2bbfa32a046f5f3c27b0eac8a
7
+ data.tar.gz: 48be90ac900e5f88eaaccaadd9b0e9d757c0e6c440cbc9e5db94237a4efd4cfbe112f5ac5a4fb93bf17c28f74df2d59cdfe3dccb38c46231fcc41bee17fecbc7
@@ -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.4"
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
- ag_flags << value unless value === true
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-ag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Sexton