cliutils 2.2.3 → 2.2.4
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/HISTORY.md +4 -0
- data/lib/cliutils/configurator.rb +5 -1
- data/lib/cliutils/constants.rb +1 -1
- data/spec/pref_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22d89bf09880e4097926da86a0f1bbc82a936a2e
|
4
|
+
data.tar.gz: 73eb357b08b13f71c0dddbabbf8b35a2fc2232d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a8d23a944fafa0d411d2fb67242a28ce8f0fe9a277a92897dee4e4d1bbfab745c9c52c1fc31c2e46d6fdad4bd63f03571ff3f1228c0a55c9b79dcf5e5bb6f7c
|
7
|
+
data.tar.gz: 276cb215166ff16801ef437d1e7d68bf4258da690146316c0387ef4372d71b4a5d843c0fd8d35eec2499164d743f631e03f9e0630a4ad2365dd2cd1ed4d7bdfc
|
data/HISTORY.md
CHANGED
@@ -115,7 +115,11 @@ module CLIUtils
|
|
115
115
|
# @yield if a block is passed
|
116
116
|
# @return [Hash] The hash with the method's name as key
|
117
117
|
def method_missing(name, *args, &block)
|
118
|
-
|
118
|
+
if name[-1,1] == '='
|
119
|
+
@data[name[0..-2].to_sym] = args[0]
|
120
|
+
else
|
121
|
+
@data[name.to_sym] ||= {}
|
122
|
+
end
|
119
123
|
end
|
120
124
|
|
121
125
|
# Clears the configuration data.
|
data/lib/cliutils/constants.rb
CHANGED
data/spec/pref_spec.rb
CHANGED
@@ -102,8 +102,8 @@ describe CLIUtils::Pref do
|
|
102
102
|
expect(pref.default).to eq(pref_data[:default])
|
103
103
|
expect(pref.last_error_message).to eq(nil)
|
104
104
|
expect(pref.options).to eq(['bachya'])
|
105
|
-
expect(pref.post).to eq({message: 'Test post message', action: { name: '
|
106
|
-
expect(pref.pre).to eq({message: 'Test pre message', action: { name: '
|
105
|
+
expect(pref.post).to eq({message: 'Test post message', action: { name: File.join(base_path, 'test_action.rb') } })
|
106
|
+
expect(pref.pre).to eq({message: 'Test pre message', action: { name: File.join(base_path, 'test_action.rb'), parameters: { param1: 'value1'} } })
|
107
107
|
expect(pref.prereqs).to eq([{ config_section: 'section' }, { config_value: 'value' }])
|
108
108
|
expect(pref.validator_objects[0].class).to eq(CLIUtils::TestValidator)
|
109
109
|
expect(pref.validators).to eq([File.join(base_path, 'test_validator.rb')])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cliutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Bach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|