boson 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gemspec CHANGED
@@ -11,9 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.summary = "A command/task framework similar to rake and thor that opens your ruby universe to the commandline and irb."
12
12
  s.description = "Boson is a command/task framework with the power to turn any ruby method into a full-fledged executable with options. Some unique features that differentiate it from rake and thor include being usable from irb and the commandline, optional automated views generated by hirb and allowing libraries to be written as plain ruby. For my libraries that use this, see irbfiles. Works with all major ruby versions."
13
13
  s.required_rubygems_version = ">= 1.3.6"
14
- s.rubyforge_project = 'tagaholic'
15
14
  s.executables = ['boson']
16
- s.add_dependency 'hirb', '>= 0.3.5'
15
+ s.add_dependency 'hirb', '>= 0.5.0'
17
16
  s.add_dependency 'alias', '>= 0.2.2'
18
17
  s.add_development_dependency 'mocha'
19
18
  s.add_development_dependency 'bacon', '>= 1.1.0'
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.4
2
+ * Handle rubygems deprecation (#28)
3
+ * 1.9 Fixes
4
+
1
5
  == 0.3.3
2
6
  * Fix install command for https (#22)
3
7
 
data/README.rdoc CHANGED
@@ -153,6 +153,9 @@ Having done that, let's start up irb:
153
153
  == Bugs/Issues
154
154
  Please report them {on github}[http://github.com/cldwalker/boson/issues].
155
155
 
156
+ == Contributing
157
+ {See here}[http://tagaholic.me/contributing.html]
158
+
156
159
  == Motivation
157
160
  My {tagging obsession}[http://github.com/cldwalker/tag-tree] from the ruby console.
158
161
 
@@ -168,3 +171,4 @@ Boson stands on the shoulders of these people and their ideas:
168
171
  * Dave Thomas for scraping a method's comments (Boson::CommentInspector)
169
172
  * Mauricio Fernandez for scraping a method's arguments (Boson::ArgumentInspector)
170
173
  * Chris Wanstrath for inspiring Boson's libraries with Rip's packages.
174
+ * And its contributors: @mirell
data/deps.rip CHANGED
@@ -1,2 +1,2 @@
1
- hirb >=0.3.5
1
+ hirb >=0.5.0
2
2
  alias >=0.2.2
@@ -10,7 +10,10 @@ module Boson
10
10
  class GemLibrary < Library
11
11
  #:stopdoc:
12
12
  def self.is_a_gem?(name)
13
- Object.const_defined?(:Gem) && Gem.searcher.find(name).is_a?(Gem::Specification)
13
+ return false unless defined? Gem
14
+ Gem::VERSION >= '1.8.0' ?
15
+ Gem::Specification.find_all_by_name(name)[0].is_a?(Gem::Specification) :
16
+ Gem.searcher.find(name).is_a?(Gem::Specification)
14
17
  end
15
18
 
16
19
  handles {|source| is_a_gem?(source.to_s) }
@@ -24,4 +27,4 @@ module Boson
24
27
  end
25
28
  #:startdoc:
26
29
  end
27
- end
30
+ end
data/lib/boson/loader.rb CHANGED
@@ -84,7 +84,8 @@ module Boson
84
84
  " your libraries. Rename your module to avoid this warning."
85
85
  end
86
86
 
87
- Manager.create_class_aliases(@module, @class_commands) unless @class_commands.to_s.empty? || @method_conflict
87
+ Manager.create_class_aliases(@module, @class_commands) unless @class_commands.nil? ||
88
+ @class_commands.empty? || @method_conflict
88
89
  check_for_method_conflicts unless @force
89
90
  @namespace = clean_name if @object_namespace
90
91
  namespace ? Namespace.create(namespace, self) : include_in_universe
@@ -114,4 +115,4 @@ module Boson
114
115
  end
115
116
  #:startdoc:
116
117
  end
117
- end
118
+ end
@@ -117,7 +117,7 @@ module Boson
117
117
  global_opt, parsed_options, new_args = parse_options temp_args
118
118
  Runner.in_shell? ? args = new_args : args += new_args
119
119
  # add default options
120
- elsif @command.options.to_s.empty? || (!@command.has_splat_args? &&
120
+ elsif @command.options.nil? || @command.options.empty? || (!@command.has_splat_args? &&
121
121
  args.size <= (@command.arg_size - 1).abs) || (@command.has_splat_args? && !args[-1].is_a?(Hash))
122
122
  global_opt, parsed_options = parse_options([])[0,2]
123
123
  # merge default options with given hash of options
@@ -189,8 +189,9 @@ module Boson
189
189
  end
190
190
 
191
191
  def modify_args(args)
192
- if @command.default_option && @command.arg_size <= 1 && !@command.has_splat_args? && args[0].to_s[/./] != '-'
193
- args[0] = "--#{@command.default_option}=#{args[0]}" unless args.join.empty? || args[0].is_a?(Hash)
192
+ if @command.default_option && @command.arg_size <= 1 && !@command.has_splat_args? &&
193
+ !args[0].is_a?(Hash) && args[0].to_s[/./] != '-' && !args.join.empty?
194
+ args[0] = "--#{@command.default_option}=#{args[0]}"
194
195
  end
195
196
  end
196
197
 
@@ -218,4 +219,4 @@ module Boson
218
219
  end
219
220
  #:startdoc:
220
221
  end
221
- end
222
+ end
data/lib/boson/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Boson
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
data/test/test_helper.rb CHANGED
@@ -30,7 +30,7 @@ module TestHelpers
30
30
  def reset_main_object
31
31
  Boson.send :remove_const, "Universe"
32
32
  eval "module ::Boson::Universe; include ::Boson::Commands::Namespace; end"
33
- Commands.send :remove_const, "Blah" if Commands.const_defined?("Blah")
33
+ Boson::Commands.send :remove_const, "Blah" rescue nil
34
34
  Boson.main_object = Object.new
35
35
  end
36
36
 
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 3
9
- - 3
10
- version: 0.3.3
4
+ prerelease:
5
+ version: 0.3.4
11
6
  platform: ruby
12
7
  authors:
13
8
  - Gabriel Horner
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-02-07 00:00:00 -05:00
13
+ date: 2011-08-15 00:00:00 -04:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,12 +21,7 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 25
30
- segments:
31
- - 0
32
- - 3
33
- - 5
34
- version: 0.3.5
24
+ version: 0.5.0
35
25
  type: :runtime
36
26
  version_requirements: *id001
37
27
  - !ruby/object:Gem::Dependency
@@ -42,11 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ">="
44
34
  - !ruby/object:Gem::Version
45
- hash: 19
46
- segments:
47
- - 0
48
- - 2
49
- - 2
50
35
  version: 0.2.2
51
36
  type: :runtime
52
37
  version_requirements: *id002
@@ -58,9 +43,6 @@ dependencies:
58
43
  requirements:
59
44
  - - ">="
60
45
  - !ruby/object:Gem::Version
61
- hash: 3
62
- segments:
63
- - 0
64
46
  version: "0"
65
47
  type: :development
66
48
  version_requirements: *id003
@@ -72,11 +54,6 @@ dependencies:
72
54
  requirements:
73
55
  - - ">="
74
56
  - !ruby/object:Gem::Version
75
- hash: 19
76
- segments:
77
- - 1
78
- - 1
79
- - 0
80
57
  version: 1.1.0
81
58
  type: :development
82
59
  version_requirements: *id004
@@ -88,9 +65,6 @@ dependencies:
88
65
  requirements:
89
66
  - - ">="
90
67
  - !ruby/object:Gem::Version
91
- hash: 3
92
- segments:
93
- - 0
94
68
  version: "0"
95
69
  type: :development
96
70
  version_requirements: *id005
@@ -102,9 +76,6 @@ dependencies:
102
76
  requirements:
103
77
  - - ">="
104
78
  - !ruby/object:Gem::Version
105
- hash: 3
106
- segments:
107
- - 0
108
79
  version: "0"
109
80
  type: :development
110
81
  version_requirements: *id006
@@ -191,25 +162,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
162
  requirements:
192
163
  - - ">="
193
164
  - !ruby/object:Gem::Version
194
- hash: 3
195
- segments:
196
- - 0
197
165
  version: "0"
198
166
  required_rubygems_version: !ruby/object:Gem::Requirement
199
167
  none: false
200
168
  requirements:
201
169
  - - ">="
202
170
  - !ruby/object:Gem::Version
203
- hash: 23
204
- segments:
205
- - 1
206
- - 3
207
- - 6
208
171
  version: 1.3.6
209
172
  requirements: []
210
173
 
211
- rubyforge_project: tagaholic
212
- rubygems_version: 1.3.7
174
+ rubyforge_project:
175
+ rubygems_version: 1.6.2
213
176
  signing_key:
214
177
  specification_version: 3
215
178
  summary: A command/task framework similar to rake and thor that opens your ruby universe to the commandline and irb.