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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8313e64afd2cdd8841de895190d05ca27d350fa
4
- data.tar.gz: 031a2254cd3894076e7192c7bdf3e70198103d4d
3
+ metadata.gz: 692fc45b02fcc752db93e0f638c0ae7f16f9348f
4
+ data.tar.gz: 64756d9b8d35358f356c399ceff7c113b6dc17d7
5
5
  SHA512:
6
- metadata.gz: 1ad67101488c31588201c6029ab5be39138bb310bd57f27f03aaefdaa8dba099884bab989a7b2091e39c132d17933521bbc8632c356febe657acd8f444a94c4d
7
- data.tar.gz: 9a9d0b1373c5fcfbc9e3eea47b8c04cdecc5bfc925bdffe91963c74c68a6ec59c7c1af69a7cb2a28633ea0d2a59da3519622e50d06a0a7b62180984cbb05663e
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
@@ -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
  """
@@ -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 re2quired to be negatable.
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 ||= self.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
@@ -1,3 +1,3 @@
1
1
  module Methadone #:nodoc:
2
- VERSION = "1.3.0" #:nodoc:
2
+ VERSION = "1.3.1" #:nodoc:
3
3
  end
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.0
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-05-11 00:00:00.000000000 Z
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
- - .rvmrc
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