yamload 0.0.1 → 0.0.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: d479e22a573daeec01e50860fd57bcbbdd156b41
4
- data.tar.gz: a214e210884aa1700000372b007876511494f7fa
3
+ metadata.gz: a6be6f6616ab52beb4071293efae46f89ace03f8
4
+ data.tar.gz: f69f085e8311b5f37b58f2f62f2aa0720284e96d
5
5
  SHA512:
6
- metadata.gz: db21529dffbe4ec9389b2935628700ae463316f823e65202531a95409976400673fbccb5e2865da036204d401b8fa77e94c227b9d41b39daf9c1809175ee3307
7
- data.tar.gz: ac79928bb7fe4532c1e153d85cd2d60e170d6ab838323b15235abadb3b2eaceade65ce239ee3b3ea8bb772219d25523c2b1899da59c346ac5105cb4de189c2ce
6
+ metadata.gz: 243f48a7eae25f29cf995c3de52af317414b78c2a9c9d03921272b3f26890dd698b1884c99ba1bc0d14d3fd80bcd47df1e5ee21093755efa1b83d7a5016e129b
7
+ data.tar.gz: f37efa4c9ca19518c591b3b9357c15146604fdad7d9192d48759b27117ab76b6eadbba672bb0c6538a00114839d13caaff2e3793b95156dc9ac1cc799f26243e
@@ -10,7 +10,7 @@ module Yamload
10
10
  end
11
11
 
12
12
  def loaded_hash
13
- @loaded_hash ||= defaults.deep_merge(load)
13
+ @loaded_hash ||= IceNine.deep_freeze(defaults.deep_merge(load))
14
14
  end
15
15
 
16
16
  def obj
@@ -1,3 +1,3 @@
1
1
  module Yamload
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -66,6 +66,15 @@ describe Yamload do
66
66
  specify { expect(config_obj.users[1].email).to eq 'speccy.speccer@spec.com' }
67
67
  specify { expect(config_obj.settings.remote_access).to eq true }
68
68
 
69
+ context 'when trying to modify the loaded hash' do
70
+ let(:new_user) { double('new user') }
71
+ specify 'the hash should be immutable' do
72
+ expect { config['users'] << new_user }
73
+ .to raise_error RuntimeError, "can't modify frozen Array"
74
+ expect(config['users']).not_to include new_user
75
+ end
76
+ end
77
+
69
78
  context 'when trying to modify the configuration object' do
70
79
  let(:new_user) { double('new user') }
71
80
  specify 'the object should be immutable' do
@@ -18,13 +18,15 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(/^(test|spec|features)\//)
19
19
  spec.require_paths = ['lib']
20
20
 
21
+ spec.required_ruby_version = '>= 1.9.3'
22
+
21
23
  spec.add_dependency 'anima', '~> 0.2'
22
24
  spec.add_dependency 'facets', '~> 3.0'
23
25
  spec.add_dependency 'respect', '~> 0.1'
24
26
 
25
27
  spec.add_development_dependency 'bundler', '~> 1.7'
26
28
  spec.add_development_dependency 'rake', '~> 10.0'
27
- spec.add_development_dependency 'rspec', '~> 3.1'
29
+ spec.add_development_dependency 'rspec', '~> 3.2'
28
30
  spec.add_development_dependency 'simplecov', '~> 0.9'
29
31
  spec.add_development_dependency 'simplecov-rcov', '~> 0.2'
30
32
  spec.add_development_dependency 'coveralls'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Berardi
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.1'
89
+ version: '3.2'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.1'
96
+ version: '3.2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -186,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - ">="
188
188
  - !ruby/object:Gem::Version
189
- version: '0'
189
+ version: 1.9.3
190
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - ">="