boson 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemspec +1 -1
- data/CHANGELOG.rdoc +3 -0
- data/deps.rip +1 -1
- data/lib/boson/runners/bin_runner.rb +5 -3
- data/lib/boson/version.rb +1 -1
- data/test/bin_runner_test.rb +6 -1
- metadata +7 -7
data/.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.required_rubygems_version = ">= 1.3.6"
|
14
14
|
s.rubyforge_project = 'tagaholic'
|
15
15
|
s.executables = ['boson']
|
16
|
-
s.add_dependency 'hirb', '>= 0.3.
|
16
|
+
s.add_dependency 'hirb', '>= 0.3.5'
|
17
17
|
s.add_dependency 'alias', '>= 0.2.2'
|
18
18
|
s.add_development_dependency 'mocha'
|
19
19
|
s.add_development_dependency 'bacon', '>= 1.1.0'
|
data/CHANGELOG.rdoc
CHANGED
data/deps.rip
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
hirb >=0.3.
|
1
|
+
hirb >=0.3.5
|
2
2
|
alias >=0.2.2
|
@@ -23,6 +23,7 @@ module Boson
|
|
23
23
|
# [:render] Toggles the auto-rendering done for commands that don't have views. Doesn't affect commands that already have views.
|
24
24
|
# Default is false. Also see Auto Rendering section below.
|
25
25
|
# [:pager_toggle] Toggles Hirb's pager in case you'd like to pipe to another command.
|
26
|
+
# [:backtrace] Prints full backtrace on error. Default is false.
|
26
27
|
#
|
27
28
|
# ==== Auto Rendering
|
28
29
|
# Commands that don't have views (defined via render_options) have their return value auto-rendered as a view as follows:
|
@@ -48,7 +49,8 @@ module Boson
|
|
48
49
|
:option_commands=>{:type=>:boolean, :desc=>"Toggles on all commands to be defined as option commands" },
|
49
50
|
:ruby_debug=>{:type=>:boolean, :desc=>"Sets $DEBUG", :alias=>'D'},
|
50
51
|
:debug=>{:type=>:boolean, :desc=>"Prints debug info for boson"},
|
51
|
-
:load_path=>{:type=>:string, :desc=>"Add to front of $LOAD_PATH", :alias=>'I'}
|
52
|
+
:load_path=>{:type=>:string, :desc=>"Add to front of $LOAD_PATH", :alias=>'I'},
|
53
|
+
:backtrace=>{:type=>:boolean, :desc=>'Prints full backtrace'}
|
52
54
|
} #:nodoc:
|
53
55
|
|
54
56
|
PIPE = '+'
|
@@ -123,7 +125,7 @@ module Boson
|
|
123
125
|
|
124
126
|
#:stopdoc:
|
125
127
|
def abort_with(message)
|
126
|
-
message += "\nOriginal error: #{$!}\n
|
128
|
+
message += "\nOriginal error: #{$!}\n #{$!.backtrace.join("\n ")}" if options[:verbose] || options[:backtrace]
|
127
129
|
abort message
|
128
130
|
end
|
129
131
|
|
@@ -203,4 +205,4 @@ module Boson
|
|
203
205
|
#:startdoc:
|
204
206
|
end
|
205
207
|
end
|
206
|
-
end
|
208
|
+
end
|
data/lib/boson/version.rb
CHANGED
data/test/bin_runner_test.rb
CHANGED
@@ -104,6 +104,11 @@ describe "BinRunner" do
|
|
104
104
|
aborts_with(/Error.*not found/) { start 'blah' }
|
105
105
|
end
|
106
106
|
|
107
|
+
it "with backtrace option prints backtrace" do
|
108
|
+
BinRunner.expects(:autoload_command).returns(false)
|
109
|
+
aborts_with(/not found\nOriginal.*runner\.rb:/m) { start("--backtrace", "blah") }
|
110
|
+
end
|
111
|
+
|
107
112
|
it "basic command executes" do
|
108
113
|
BinRunner.expects(:init).returns(true)
|
109
114
|
BinRunner.stubs(:render_output)
|
@@ -215,4 +220,4 @@ describe "BinRunner" do
|
|
215
220
|
BinRunner.parse_args(['-v', 'com', '-v']).should == ["com", {:verbose=>true}, ['-v']]
|
216
221
|
BinRunner.parse_args(['com', '-v']).should == ["com", {}, ['-v']]
|
217
222
|
end
|
218
|
-
end
|
223
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
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: 2010-09
|
18
|
+
date: 2010-11-09 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 25
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
- 3
|
33
|
-
-
|
34
|
-
version: 0.3.
|
33
|
+
- 5
|
34
|
+
version: 0.3.5
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|