boson 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +3 -0
- data/lib/boson/option_command.rb +2 -1
- data/lib/boson/version.rb +1 -1
- data/test/runner_test.rb +6 -1
- metadata +13 -14
data/CHANGELOG.rdoc
CHANGED
data/lib/boson/option_command.rb
CHANGED
@@ -42,7 +42,8 @@ module Boson
|
|
42
42
|
# arguments.
|
43
43
|
def parse(args)
|
44
44
|
if args.size == 1 && args[0].is_a?(String)
|
45
|
-
|
45
|
+
args = Shellwords.shellwords(args[0]) if !Boson.in_shell
|
46
|
+
global_opt, parsed_options, args = parse_options args
|
46
47
|
# last string argument interpreted as args + options
|
47
48
|
elsif args.size > 1 && args[-1].is_a?(String)
|
48
49
|
temp_args = Boson.in_shell ? args : Shellwords.shellwords(args.pop)
|
data/lib/boson/version.rb
CHANGED
data/test/runner_test.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/test_helper'
|
2
|
+
require 'shellwords'
|
2
3
|
|
3
4
|
class MyRunner < Boson::Runner
|
4
5
|
GLOBAL_OPTIONS[:version] = {
|
@@ -56,7 +57,7 @@ describe "Runner" do
|
|
56
57
|
|
57
58
|
def my_command(cmd='')
|
58
59
|
capture_stdout do
|
59
|
-
MyRunner.start
|
60
|
+
MyRunner.start Shellwords.split(cmd)
|
60
61
|
end
|
61
62
|
end
|
62
63
|
|
@@ -136,6 +137,10 @@ STR
|
|
136
137
|
my_command('medium 1 --spicy').chomp.should == '["1", {:spicy=>true}]'
|
137
138
|
end
|
138
139
|
|
140
|
+
it "calls command with quoted arguments correctly" do
|
141
|
+
my_command("medium '1 2'").chomp.should == '["1 2", {}]'
|
142
|
+
end
|
143
|
+
|
139
144
|
it "calls optionless command correctly" do
|
140
145
|
my_command('small 1 2').chomp.should == '["1", "2"]'
|
141
146
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mocha
|
16
|
-
requirement: &
|
16
|
+
requirement: &70160942164240 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.10.4
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70160942164240
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bacon
|
27
|
-
requirement: &
|
27
|
+
requirement: &70160942163680 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.1.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70160942163680
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mocha-on-bacon
|
38
|
-
requirement: &
|
38
|
+
requirement: &70160942163160 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70160942163160
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bacon-bits
|
49
|
-
requirement: &
|
49
|
+
requirement: &70160942162700 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70160942162700
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bahia
|
60
|
-
requirement: &
|
60
|
+
requirement: &70160942162140 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: 0.4.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70160942162140
|
69
69
|
description: Boson is a modular command/task framework. Thanks to its rich set of
|
70
70
|
plugins, it differentiates itself from rake and thor by being usable from irb and
|
71
71
|
the commandline, having optional automated views generated by hirb and allowing
|
@@ -141,10 +141,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: 1.3.6
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project:
|
144
|
-
rubygems_version: 1.8.
|
144
|
+
rubygems_version: 1.8.11
|
145
145
|
signing_key:
|
146
146
|
specification_version: 3
|
147
147
|
summary: A command/task framework similar to rake and thor that opens your ruby universe
|
148
148
|
to the commandline and irb.
|
149
149
|
test_files: []
|
150
|
-
has_rdoc:
|