boson 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gemspec +1 -1
- data/CHANGELOG.rdoc +6 -0
- data/README.md +6 -3
- data/lib/boson/runner.rb +1 -0
- data/lib/boson/version.rb +1 -1
- data/test/runner_test.rb +15 -0
- metadata +15 -13
data/.gemspec
CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_development_dependency 'bahia', '>= 0.4.0'
|
20
20
|
s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc,md} ext/**/*.{rb,c} **/deps.rip]) + %w{Rakefile .gemspec .travis.yml}
|
21
21
|
s.files += ['.rspec']
|
22
|
-
s.extra_rdoc_files = ["README.md", "LICENSE.txt"]
|
22
|
+
s.extra_rdoc_files = ["README.md", "LICENSE.txt", "Upgrading.md"]
|
23
23
|
s.license = 'MIT'
|
24
24
|
end
|
data/CHANGELOG.rdoc
CHANGED
data/README.md
CHANGED
@@ -8,9 +8,9 @@ be written as plain ruby. Works with on all major rubies for ruby >= 1.9.2
|
|
8
8
|
## New Boson
|
9
9
|
|
10
10
|
Starting with 1.0, boson has changed significantly. Please read [the upgrading
|
11
|
-
doc](
|
12
|
-
or if your [reading about
|
13
|
-
predates 2012.
|
11
|
+
doc](https://github.com/cldwalker/boson/blob/master/Upgrading.md) if you have an
|
12
|
+
older version or if your [reading about
|
13
|
+
boson](http://tagaholic.me/blog.html#gem:name=boson) predates 2012.
|
14
14
|
|
15
15
|
Boson has been rewritten to have a smaller core (no dependencies) with optional
|
16
16
|
plugins to hook into its various features. The major focus of 1.0 has been to
|
@@ -58,6 +58,9 @@ You can now execute cow with say and moo subcommands:
|
|
58
58
|
You'll notice that this syntax is powerful and concise and is very similar to
|
59
59
|
thor's API. Subcommands map to ruby methods and the class represents the executable.
|
60
60
|
|
61
|
+
For some examples of executables see [vimdb](http://github.com/cldwalker/vimdb)
|
62
|
+
or [tag](http://github.com/cldwalker/tag).
|
63
|
+
|
61
64
|
## Comparison to Thor
|
62
65
|
|
63
66
|
Since boson and it's rewrite are both heavily inspired by [thor](http://github.com/wycats/thor), it
|
data/lib/boson/runner.rb
CHANGED
data/lib/boson/version.rb
CHANGED
data/test/runner_test.rb
CHANGED
@@ -6,6 +6,13 @@ class MyRunner < Boson::Runner
|
|
6
6
|
p args
|
7
7
|
end
|
8
8
|
|
9
|
+
option :tags, :type => :array
|
10
|
+
option :blurg, :type => :boolean
|
11
|
+
desc 'This is splot'
|
12
|
+
def splot(*args)
|
13
|
+
p args
|
14
|
+
end
|
15
|
+
|
9
16
|
option :spicy, type: :boolean, desc: 'hot'
|
10
17
|
desc "This is a medium"
|
11
18
|
def medium(arg=nil, opts={})
|
@@ -52,6 +59,7 @@ Available commands:
|
|
52
59
|
mini This is a mini
|
53
60
|
quiet
|
54
61
|
small This is a small
|
62
|
+
splot This is splot
|
55
63
|
|
56
64
|
For help on a command: my_command COMMAND -h
|
57
65
|
STR
|
@@ -127,6 +135,13 @@ STR
|
|
127
135
|
my_command('medium 1 2 3')
|
128
136
|
end
|
129
137
|
|
138
|
+
it "calls command with splat args and multiple options correctly" do
|
139
|
+
Boson.in_shell = true
|
140
|
+
my_command('splot 1 2 -b --tags=1,2').chomp.should ==
|
141
|
+
'["1", "2", {:blurg=>true, :tags=>["1", "2"]}]'
|
142
|
+
Boson.in_shell = nil
|
143
|
+
end
|
144
|
+
|
130
145
|
it "prints error message for internal public method" do
|
131
146
|
MyRunner.expects(:abort).with %[Could not find command "to_s"]
|
132
147
|
my_command('to_s').should == ''
|
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.0.
|
4
|
+
version: 1.0.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-07 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mocha
|
16
|
-
requirement: &
|
16
|
+
requirement: &70306896691040 !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: *70306896691040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bacon
|
27
|
-
requirement: &
|
27
|
+
requirement: &70306896690580 !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: *70306896690580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mocha-on-bacon
|
38
|
-
requirement: &
|
38
|
+
requirement: &70306896690180 !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: *70306896690180
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bacon-bits
|
49
|
-
requirement: &
|
49
|
+
requirement: &70306896689720 !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: *70306896689720
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bahia
|
60
|
-
requirement: &
|
60
|
+
requirement: &70306896689200 !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: *70306896689200
|
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
|
@@ -77,6 +77,7 @@ extensions: []
|
|
77
77
|
extra_rdoc_files:
|
78
78
|
- README.md
|
79
79
|
- LICENSE.txt
|
80
|
+
- Upgrading.md
|
80
81
|
files:
|
81
82
|
- lib/boson/bare_runner.rb
|
82
83
|
- lib/boson/bin_runner.rb
|
@@ -140,9 +141,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
141
|
version: 1.3.6
|
141
142
|
requirements: []
|
142
143
|
rubyforge_project:
|
143
|
-
rubygems_version: 1.8.
|
144
|
+
rubygems_version: 1.8.15
|
144
145
|
signing_key:
|
145
146
|
specification_version: 3
|
146
147
|
summary: A command/task framework similar to rake and thor that opens your ruby universe
|
147
148
|
to the commandline and irb.
|
148
149
|
test_files: []
|
150
|
+
has_rdoc:
|