configatron 4.3.0 → 4.4.0

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.
@@ -1,3 +1,7 @@
1
+ === 4.4.0
2
+
3
+ * [backwards-incompatible] Make temp preserve locking state across invocations
4
+
1
5
  === 4.3.0
2
6
 
3
7
  * [backwards-incompatible] Make nil into a valid config value
@@ -40,10 +40,12 @@ class Configatron::RootStore < BasicObject
40
40
 
41
41
  def temp_start
42
42
  @temp = ::Configatron::DeepClone.deep_clone(@store)
43
+ @temp_locked = @locked
43
44
  end
44
45
 
45
46
  def temp_end
46
47
  @store = @temp
48
+ @locked = @temp_locked
47
49
  end
48
50
 
49
51
  def locked?
@@ -1,3 +1,3 @@
1
1
  class Configatron
2
- VERSION = "4.3.0"
2
+ VERSION = "4.4.0"
3
3
  end
@@ -48,6 +48,14 @@ class Critic::Functional::ConfigatronTest < Critic::Functional::Test
48
48
  assert_equal('original', @kernel.foo.bar)
49
49
  end
50
50
 
51
+ it 'restores locking state' do
52
+ @kernel.lock!
53
+ @kernel.temp do
54
+ @kernel.unlock!
55
+ end
56
+ assert(@kernel.locked?)
57
+ end
58
+
51
59
  describe 'start/end' do
52
60
  it 'allows for temporary setting of values' do
53
61
  assert_equal('A', @kernel.a)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-23 00:00:00.000000000 Z
12
+ date: 2014-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  segments:
140
140
  - 0
141
- hash: -4412635049792496814
141
+ hash: 3757414852321725562
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  none: false
144
144
  requirements:
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  segments:
149
149
  - 0
150
- hash: -4412635049792496814
150
+ hash: 3757414852321725562
151
151
  requirements: []
152
152
  rubyforge_project:
153
153
  rubygems_version: 1.8.25