hsume2-hirb 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -171,7 +171,11 @@ module Hirb
171
171
  @new_args << CHOSEN_ARG
172
172
  field = $3 ? unalias_field($3) : default_field ||
173
173
  raise(Error, "No default field/column found. Fields must be explicitly picked.")
174
- [Util.choose_from_array(@output, word), field]
174
+ if return_cell_values?
175
+ [Util.choose_from_array(@output, word), field]
176
+ else
177
+ [[Util.choose_from_array(@output, word)], nil]
178
+ end
175
179
  elsif word[ALL_REGEXP]
176
180
  @new_args << CHOSEN_ARG
177
181
  $2 ? [ALL_ARG, unalias_field($2)] : ALL_ARG
@@ -1,3 +1,3 @@
1
1
  module Hirb
2
- VERSION = '0.6.2'
2
+ VERSION = '0.6.3'
3
3
  end
@@ -177,6 +177,11 @@ describe "Menu" do
177
177
  two_d_menu(:action=>true, :two_d=>nil, :invoke=>[[{:a=>1, :bro=>2}]])
178
178
  end
179
179
 
180
+ it "with 1d invokes on multiple choices" do
181
+ menu_input "p 1,2 1-2"
182
+ two_d_menu(:action=>true, :two_d=>nil, :invoke=>[[{:a => 1, :bro => 2}, {:a => 3, :bro => 4}, {:a => 1, :bro => 2}, {:a => 3, :bro => 4}]])
183
+ end
184
+
180
185
  it "with non-choice arguments invokes" do
181
186
  menu_input "p arg1 1"
182
187
  two_d_menu :action=>true, :invoke=>['arg1', [1]]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hsume2-hirb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 2
10
- version: 0.6.2
9
+ - 3
10
+ version: 0.6.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabriel Horner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-08 00:00:00 -08:00
18
+ date: 2012-02-09 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency