wijet-thor 0.14.6 → 0.14.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,8 +94,6 @@ class Thor
94
94
  end
95
95
 
96
96
  module ClassMethods
97
- attr_accessor :debugging
98
-
99
97
  def attr_reader(*) #:nodoc:
100
98
  no_tasks { super }
101
99
  end
@@ -384,11 +382,10 @@ class Thor
384
382
  # script.invoke(:task, first_arg, second_arg, third_arg)
385
383
  #
386
384
  def start(given_args=ARGV, config={})
387
- self.debugging = given_args.delete("--debug")
388
385
  config[:shell] ||= Thor::Base.shell.new
389
386
  dispatch(nil, given_args.dup, nil, config)
390
387
  rescue Thor::Error => e
391
- debugging ? (raise e) : config[:shell].error(e.message)
388
+ ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
392
389
  exit(1) if exit_on_failure?
393
390
  end
394
391
 
@@ -1,3 +1,3 @@
1
1
  class Thor
2
- VERSION = "0.14.6".freeze
2
+ VERSION = "0.14.7".freeze
3
3
  end
@@ -227,10 +227,15 @@ describe Thor::Base do
227
227
  end
228
228
 
229
229
  describe "#start" do
230
- it "raises an error instead of rescueing if --debug is given" do
231
- lambda {
232
- MyScript.start ["what", "--debug"]
233
- }.should raise_error(Thor::UndefinedTaskError, 'Could not find task "what" in "my_script" namespace.')
230
+ it "raises an error instead of rescueing if THOR_DEBUG=1 is given" do
231
+ begin
232
+ ENV["THOR_DEBUG"] = 1
233
+ lambda {
234
+ MyScript.start ["what", "--debug"]
235
+ }.should raise_error(Thor::UndefinedTaskError, 'Could not find task "what" in "my_script" namespace.')
236
+ rescue
237
+ ENV["THOR_DEBUG"] = nil
238
+ end
234
239
  end
235
240
 
236
241
  it "does not steal args" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wijet-thor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.6
4
+ version: 0.14.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-11-20 00:00:00.000000000Z
13
+ date: 2011-11-21 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &2156605740 !ruby/object:Gem::Requirement
17
+ requirement: &2156019540 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '1.0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *2156605740
25
+ version_requirements: *2156019540
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: fakeweb
28
- requirement: &2156605260 !ruby/object:Gem::Requirement
28
+ requirement: &2156018060 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2156605260
36
+ version_requirements: *2156018060
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rdoc
39
- requirement: &2156604760 !ruby/object:Gem::Requirement
39
+ requirement: &2156016680 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '2.5'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2156604760
47
+ version_requirements: *2156016680
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rake
50
- requirement: &2156604180 !ruby/object:Gem::Requirement
50
+ requirement: &2156014620 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0.8'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2156604180
58
+ version_requirements: *2156014620
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rspec
61
- requirement: &2156603620 !ruby/object:Gem::Requirement
61
+ requirement: &2156012020 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '2.1'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2156603620
69
+ version_requirements: *2156012020
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: simplecov
72
- requirement: &2156603060 !ruby/object:Gem::Requirement
72
+ requirement: &2156009560 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '0.3'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2156603060
80
+ version_requirements: *2156009560
81
81
  description: A scripting framework that replaces rake, sake and rubigen
82
82
  email:
83
83
  - ruby-thor@googlegroups.com
@@ -178,6 +178,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
178
  - - ! '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ segments:
182
+ - 0
183
+ hash: 1276832147745609702
181
184
  required_rubygems_version: !ruby/object:Gem::Requirement
182
185
  none: false
183
186
  requirements: