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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74dcd411f3846055d59b17657ce5fc4664abca70
4
- data.tar.gz: 85d369daafb30cf5f5a0110b783928a00ebd4f90
3
+ metadata.gz: 22d89bf09880e4097926da86a0f1bbc82a936a2e
4
+ data.tar.gz: 73eb357b08b13f71c0dddbabbf8b35a2fc2232d1
5
5
  SHA512:
6
- metadata.gz: 99aeb8fcb77f0cfdc5bad45727ad37861bb454e5e8442d2fd8c6fd3c0eefacd3f0229da51dcbf1a93f8b1dbb3eb1c419de6af15ed422d149810bf2737a23862b
7
- data.tar.gz: 829b1e7e5275f456effead9406e9d04241b321d40791d77c37b5715e9ee4ea031ed30e81d6352533a68109fcb35dd61045946bfd8c01f8168fb286dfe6101473
6
+ metadata.gz: 7a8d23a944fafa0d411d2fb67242a28ce8f0fe9a277a92897dee4e4d1bbfab745c9c52c1fc31c2e46d6fdad4bd63f03571ff3f1228c0a55c9b79dcf5e5bb6f7c
7
+ data.tar.gz: 276cb215166ff16801ef437d1e7d68bf4258da690146316c0387ef4372d71b4a5d843c0fd8d35eec2499164d743f631e03f9e0630a4ad2365dd2cd1ed4d7bdfc
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.2.4 (2014-05-05)
2
+
3
+ * Fixed a bug with dot-notation access in Configurator
4
+
1
5
  # 2.2.3 (2014-05-04)
2
6
 
3
7
  * Changed Messenger `debug` method to be conditional
@@ -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
- @data[name.to_sym] ||= {}
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.
@@ -8,5 +8,5 @@ module CLIUtils
8
8
  SUMMARY = 'Sugary goodness for Ruby CLI apps.'
9
9
 
10
10
  # The current version of the gem
11
- VERSION = '2.2.3'
11
+ VERSION = '2.2.4'
12
12
  end
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: '/Users/abach/Git/cliutils/spec/../support/test_action.rb' } })
106
- expect(pref.pre).to eq({message: 'Test pre message', action: { name: '/Users/abach/Git/cliutils/spec/../support/test_action.rb', parameters: { param1: 'value1'} } })
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2014-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler