boson 1.2.4 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dedcf0b9e8fa2af762c838c810f1697fa2bec04f
4
+ data.tar.gz: b6d513a8ebb8828dc92707ef6791d45e5a4d4ec2
5
+ SHA512:
6
+ metadata.gz: 01345ad74e0bd18e7547ae1149aad05a38c619b54650e4ab9a74bd9c4c43d73a9b4fcae07d5b4d962dc90a6dbe203f5bf0548bb80d4fe38a4ac7a6e7a7575fa9
7
+ data.tar.gz: cef6658d42054c5b85d4d30de02f86af4020674a5b76574faae8ec2e60be436e1c32dbdb8767b2008efdea3496756d8c12ac173045b93ee98c5538f26eed9229
data/.gemspec CHANGED
@@ -12,12 +12,12 @@ Gem::Specification.new do |s|
12
12
  s.description = "Boson is a modular command/task framework. Thanks to its rich set of plugins, it differentiates itself from rake and thor by being usable from irb and the commandline, having optional automated views generated by hirb and allowing libraries to be written as plain ruby. Works with ruby >= 1.9.2"
13
13
  s.required_rubygems_version = ">= 1.3.6"
14
14
  s.executables = ['boson']
15
- s.add_development_dependency 'mocha', '~> 0.10.4'
15
+ s.add_development_dependency 'mocha', '~> 0.12.0'
16
16
  s.add_development_dependency 'bacon', '>= 1.1.0'
17
- s.add_development_dependency 'mocha-on-bacon'
17
+ s.add_development_dependency 'mocha-on-bacon', '~> 0.2.1'
18
18
  s.add_development_dependency 'bacon-bits'
19
19
  s.add_development_dependency 'bahia', '>= 0.5.0'
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}
20
+ s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc,md} ext/**/*.{rb,c}]) + %w{Rakefile .gemspec .travis.yml}
21
21
  s.files += ['.rspec']
22
22
  s.extra_rdoc_files = ["README.md", "LICENSE.txt", "Upgrading.md"]
23
23
  s.license = 'MIT'
@@ -3,6 +3,8 @@ script: bacon -q -Ilib -I. test/*_test.rb
3
3
  rvm:
4
4
  - 1.9.2
5
5
  - 1.9.3
6
+ - 2.0.0
7
+ - 2.1.0
6
8
  - rbx-19mode
7
9
  - jruby-19mode
8
10
  matrix:
@@ -1,3 +1,6 @@
1
+ == 1.3.0
2
+ * Fix to support ruby 2.X
3
+
1
4
  == 1.2.4
2
5
  * Remove repo_index which has moved to boson-more
3
6
 
@@ -0,0 +1 @@
1
+ Thanks for trying out this project! [See here for contribution guidelines.](http://tagaholic.me/contributing.html)
data/README.md CHANGED
@@ -58,8 +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).
61
+ For some examples of executables see
62
+ [vimdb](https://github.com/cldwalker/vimdb/blob/master/lib/vimdb/runner.rb)
63
+ or [tag](https://github.com/cldwalker/tag/blob/master/lib/tag/runner.rb).
63
64
 
64
65
  ## Comparison to Thor
65
66
 
@@ -126,10 +127,12 @@ Now for pros thor has over boson. Thor
126
127
 
127
128
  ## Writing Plugins
128
129
 
129
- The most common way to write a plugin is to extend one of the many method hooks
130
- available. Any methods that are defined in an API or APIClassMethods module
131
- are extendable. For example, if you want to extend what any boson-based
132
- executable does first, extend Boson::BareRunner.start:
130
+ A Boson plugin is a third-party library that extends Boson through its extension
131
+ API. Any Boson class/module that includes or extends a module named API or
132
+ APIClassMethods provides an extension API. Examples of such classes are
133
+ Boson::BareRunner, Boson::Command, Boson::Inspector and Boson::Library. As an
134
+ example, let us extend what any boson-based executable does first, extend
135
+ Boson::BareRunner.start:
133
136
 
134
137
  ```ruby
135
138
  module Boson
@@ -213,7 +216,7 @@ Motivation for the new boson is all the damn executables I'm making.
213
216
  ## Credits
214
217
  Boson stands on the shoulders of these people and their ideas:
215
218
 
216
- * Contributors: @mirell, @martinos, @celldee
219
+ * Contributors: @mirell, @martinos, @celldee, @zhando
217
220
  * Yehuda Katz for Thor and its awesome option parser (Boson::OptionParser).
218
221
  * Daniel Berger for his original work on thor's option parser.
219
222
  * Chris Wanstrath for inspiring Boson's libraries with Rip's packages.
@@ -395,12 +395,13 @@ module Boson
395
395
  if Boson.config[:option_underscore_search]
396
396
  self.class.send(:define_method, :auto_alias_value) {|values, possible_val|
397
397
  Util.underscore_search(possible_val, values, true) || possible_val
398
- }.call(values, possible_value)
398
+ }
399
399
  else
400
400
  self.class.send(:define_method, :auto_alias_value) {|values, possible_val|
401
401
  values.find {|v| v.to_s =~ /^#{possible_val}/ } || possible_val
402
- }.call(values, possible_value)
402
+ }
403
403
  end
404
+ auto_alias_value(values, possible_value)
404
405
  end
405
406
 
406
407
  def validate_enum_values(values, possible_values)
@@ -1,3 +1,3 @@
1
1
  module Boson
2
- VERSION = '1.2.4'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -153,7 +153,7 @@ describe "Scientist" do
153
153
 
154
154
  it "with too many args raises CommandArgumentError" do
155
155
  args3 = RUBY_ENGINE == 'rbx' ? [ArgumentError, 'given 3, expected 2'] :
156
- [ArgumentError, '3 for 2']
156
+ RUBY_VERSION >= '2.0.0' ? [ArgumentError, "3 for 1..2"] : [ArgumentError, '3 for 2']
157
157
  args4 = [OptionCommand::CommandArgumentError, '4 for 2']
158
158
  assert_error(*args3) { command_with_args 1,2,3 }
159
159
  assert_error(*args4) { command_with_args '1 2 3' }
@@ -1,4 +1,4 @@
1
- require 'mocha'
1
+ require 'mocha_standalone'
2
2
  require 'boson'
3
3
  require 'fileutils'
4
4
  require 'boson/runner'
metadata CHANGED
@@ -1,94 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
5
- prerelease:
4
+ version: 1.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Gabriel Horner
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-06-07 00:00:00.000000000 Z
11
+ date: 2014-01-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mocha
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: 0.10.4
19
+ version: 0.12.0
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: 0.10.4
26
+ version: 0.12.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bacon
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 1.1.0
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.1.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: mocha-on-bacon
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ~>
52
46
  - !ruby/object:Gem::Version
53
- version: '0'
47
+ version: 0.2.1
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ~>
60
53
  - !ruby/object:Gem::Version
61
- version: '0'
54
+ version: 0.2.1
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: bacon-bits
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: bahia
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: 0.5.0
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: 0.5.0
94
83
  description: Boson is a modular command/task framework. Thanks to its rich set of
@@ -136,9 +125,9 @@ files:
136
125
  - bin/boson
137
126
  - LICENSE.txt
138
127
  - CHANGELOG.rdoc
128
+ - CONTRIBUTING.md
139
129
  - README.md
140
130
  - Upgrading.md
141
- - test/deps.rip
142
131
  - Rakefile
143
132
  - .gemspec
144
133
  - .travis.yml
@@ -146,27 +135,26 @@ files:
146
135
  homepage: http://tagaholic.me/boson/
147
136
  licenses:
148
137
  - MIT
138
+ metadata: {}
149
139
  post_install_message:
150
140
  rdoc_options: []
151
141
  require_paths:
152
142
  - lib
153
143
  required_ruby_version: !ruby/object:Gem::Requirement
154
- none: false
155
144
  requirements:
156
- - - ! '>='
145
+ - - '>='
157
146
  - !ruby/object:Gem::Version
158
147
  version: '0'
159
148
  required_rubygems_version: !ruby/object:Gem::Requirement
160
- none: false
161
149
  requirements:
162
- - - ! '>='
150
+ - - '>='
163
151
  - !ruby/object:Gem::Version
164
152
  version: 1.3.6
165
153
  requirements: []
166
154
  rubyforge_project:
167
- rubygems_version: 1.8.24
155
+ rubygems_version: 2.0.0
168
156
  signing_key:
169
- specification_version: 3
157
+ specification_version: 4
170
158
  summary: A command/task framework similar to rake and thor that opens your ruby universe
171
159
  to the commandline and irb.
172
160
  test_files: []
@@ -1,5 +0,0 @@
1
- mocha ~>0.10.4
2
- bacon >=1.1.0
3
- mocha-on-bacon >=0
4
- bacon-bits >=0
5
- bahia >=0.5.0