shhh 1.6.1 → 1.6.2

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: 5d5c47820b4c177b5647c092f84686ef74b169fa
4
- data.tar.gz: 26ae8727ec033817a6b9cb7c9fc834d952138c40
3
+ metadata.gz: 8b69dc1f273a6c0e894b93d546b77d496cc533ea
4
+ data.tar.gz: e25fae154b281b834d705f2cff152e577fa910bd
5
5
  SHA512:
6
- metadata.gz: 9b9fbca8b285a087362d86a87b8f596878956a08c288fa34ebb31cf23dc5ef88c02765bce1a8388a713c437c44c40057dd165de2c61d4acd2006ea49e78ca483
7
- data.tar.gz: 11813a61d0d08a6badebd7363188966226f08c77f1f038e2a49ca69a7b1578b87dd5b3ef3accb0479b7c3779284f7c0be280294879478ad858e9831b1daf2915
6
+ metadata.gz: 50bbac49d69efebfdb355603c32f468c51448b55c161e915d78f0319c8096789d0d9cef5a41a6ae99e0ef48c2b6c5a012a74a3a46b3e999a116f80f8c130db69
7
+ data.tar.gz: 056789fe26fefb51707277ff2d05564a7d9eea886b33e838899275bfe1f1b547be9ecce07af88951cbfe910dda8095951e836dd80209a71c13766bf4e298359e
@@ -14,7 +14,7 @@ module Shhh
14
14
 
15
15
  def initialize(opts)
16
16
  self.opts = opts
17
- self.opts_hash = opts.to_hash
17
+ self.opts_hash = opts.respond_to?(:to_hash) ? opts.to_hash : opts
18
18
  self.args = ::Shhh::App::Args.new(opts_hash)
19
19
  initialize_input_handler
20
20
  initialize_key_handler
@@ -37,7 +37,7 @@ module Shhh
37
37
 
38
38
  unless command
39
39
  raise Shhh::Errors::InsufficientOptionsError.new(
40
- 'Can not determine what to do from the options ' + opts.keys.reject { |k| !opts[k] }.to_s)
40
+ 'Can not determine what to do from the options ' + opts_hash.keys.reject { |k| !opts[k] }.to_s)
41
41
  end
42
42
 
43
43
  self.result = command.execute
@@ -62,16 +62,13 @@ module Shhh
62
62
  @command ||= @command_class.new(self) if @command_class
63
63
  end
64
64
 
65
- private
66
-
67
- def error(hash)
68
- hash
69
- end
70
-
71
65
  def editor
72
66
  ENV['EDITOR'] || '/bin/vi'
73
67
  end
74
68
 
69
+ def error(hash)
70
+ hash
71
+ end
75
72
 
76
73
  def initialize_input_handler(handler = ::Shhh::App::Input::Handler.new)
77
74
  self.input_handler = handler
@@ -1,3 +1,3 @@
1
1
  module Shhh
2
- VERSION = '1.6.1'
2
+ VERSION = '1.6.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shhh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Gredeskoul