methadone 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/features/bootstrap.feature +2 -2
- data/lib/methadone/cucumber.rb +1 -1
- data/lib/methadone/sh.rb +4 -1
- data/lib/methadone/version.rb +1 -1
- data/test/test_sh.rb +15 -2
- metadata +4 -3
- data/.rvmrc +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 692fc45b02fcc752db93e0f638c0ae7f16f9348f
|
4
|
+
data.tar.gz: 64756d9b8d35358f356c399ceff7c113b6dc17d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12cb56fed24b6c59ee1cd0f02c85e846913e7417585cca1e8c65018a030423e8ecf1e34dbc3ea5da8c9176a9876c66a0c3a49287296482008076596ee3444b13
|
7
|
+
data.tar.gz: 8ae9c73f37665294633205fdefc1005735ccf09037a185115a6deea6ff185977991e78173e1d14362358deaccb3b186a01cf4533821be020e696ab31dac6f2c0
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
methadone
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0
|
data/features/bootstrap.feature
CHANGED
@@ -52,8 +52,8 @@ Feature: Bootstrap a new command-line app
|
|
52
52
|
When I successfully run `rake -T -I../../lib`
|
53
53
|
Then the output should contain:
|
54
54
|
"""
|
55
|
-
rake clean # Remove any temporary products
|
56
|
-
rake clobber # Remove any generated file
|
55
|
+
rake clean # Remove any temporary products
|
56
|
+
rake clobber # Remove any generated file
|
57
57
|
rake clobber_rdoc # Remove RDoc HTML files
|
58
58
|
rake features # Run Cucumber features
|
59
59
|
"""
|
data/lib/methadone/cucumber.rb
CHANGED
@@ -7,7 +7,7 @@ module Methadone
|
|
7
7
|
# When I get help for "command_to_run"
|
8
8
|
#
|
9
9
|
# * Make sure that each option shows up in the help and has *some* sort of documentation. By default,
|
10
|
-
# the options won't be
|
10
|
+
# the options won't be required to be negatable.
|
11
11
|
#
|
12
12
|
# Then the following options should be documented:
|
13
13
|
# |--force|
|
data/lib/methadone/sh.rb
CHANGED
@@ -196,7 +196,10 @@ module Methadone
|
|
196
196
|
end
|
197
197
|
|
198
198
|
def sh_logger
|
199
|
-
@sh_logger ||=
|
199
|
+
@sh_logger ||= begin
|
200
|
+
raise StandardError, "No logger set! Please include Methadone::CLILogging or provide your own via #set_sh_logger." unless self.respond_to?(:logger)
|
201
|
+
self.logger
|
202
|
+
end
|
200
203
|
end
|
201
204
|
|
202
205
|
# Safely call our block, even if the user passed in a lambda
|
data/lib/methadone/version.rb
CHANGED
data/test/test_sh.rb
CHANGED
@@ -261,8 +261,8 @@ class TestSH < Clean::Test::TestCase
|
|
261
261
|
|
262
262
|
class MyTestApp
|
263
263
|
include Methadone::SH
|
264
|
-
def initialize(logger)
|
265
|
-
set_sh_logger(logger)
|
264
|
+
def initialize(logger=nil)
|
265
|
+
set_sh_logger(logger) if logger
|
266
266
|
end
|
267
267
|
end
|
268
268
|
|
@@ -280,6 +280,19 @@ class TestSH < Clean::Test::TestCase
|
|
280
280
|
}
|
281
281
|
end
|
282
282
|
|
283
|
+
test_that "when we don't have CLILogging included and fail to provide a logger, an exception is thrown" do
|
284
|
+
Given {
|
285
|
+
@test_app = MyTestApp.new
|
286
|
+
@command = test_command
|
287
|
+
}
|
288
|
+
When {
|
289
|
+
@code = lambda { @test_app.sh @command }
|
290
|
+
}
|
291
|
+
Then {
|
292
|
+
exception = assert_raises(StandardError,&@code)
|
293
|
+
}
|
294
|
+
end
|
295
|
+
|
283
296
|
class MyExecutionStrategy
|
284
297
|
include Clean::Test::Any
|
285
298
|
attr_reader :command
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: methadone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- davetron5000
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -176,7 +176,8 @@ extensions: []
|
|
176
176
|
extra_rdoc_files: []
|
177
177
|
files:
|
178
178
|
- .gitignore
|
179
|
-
- .
|
179
|
+
- .ruby-gemset
|
180
|
+
- .ruby-version
|
180
181
|
- .travis.yml
|
181
182
|
- CHANGES.md
|
182
183
|
- Gemfile
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use 1.9.3-p286@methadone-dev --create
|