shhh 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shhh/application.rb +5 -8
- data/lib/shhh/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b69dc1f273a6c0e894b93d546b77d496cc533ea
|
|
4
|
+
data.tar.gz: e25fae154b281b834d705f2cff152e577fa910bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50bbac49d69efebfdb355603c32f468c51448b55c161e915d78f0319c8096789d0d9cef5a41a6ae99e0ef48c2b6c5a012a74a3a46b3e999a116f80f8c130db69
|
|
7
|
+
data.tar.gz: 056789fe26fefb51707277ff2d05564a7d9eea886b33e838899275bfe1f1b547be9ecce07af88951cbfe910dda8095951e836dd80209a71c13766bf4e298359e
|
data/lib/shhh/application.rb
CHANGED
|
@@ -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 ' +
|
|
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
|
data/lib/shhh/version.rb
CHANGED