app_conf 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app_conf.gemspec +1 -1
- data/lib/app_conf.rb +4 -0
- data/spec/app_conf_spec.rb +9 -1
- metadata +3 -3
data/app_conf.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'base64'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'app_conf'
|
5
|
-
s.version = '0.2.
|
5
|
+
s.version = '0.2.3'
|
6
6
|
s.authors = 'Phil Thompson'
|
7
7
|
s.email = Base64.decode64("cGhpbEBlbGVjdHJpY3Zpc2lvbnMuY29t\n")
|
8
8
|
s.summary = 'Simplest YAML Backed Application Wide Configuration (AppConfig)'
|
data/lib/app_conf.rb
CHANGED
data/spec/app_conf_spec.rb
CHANGED
@@ -14,9 +14,17 @@ describe AppConf do
|
|
14
14
|
AppConf.load("#{@dir}/config.yml")
|
15
15
|
end
|
16
16
|
|
17
|
+
describe 'keys' do
|
18
|
+
it 'returns them' do
|
19
|
+
AppConf.from_hash(:users => {:joe => nil, :mark => nil})
|
20
|
+
|
21
|
+
AppConf.users.keys.must_equal %w(joe mark)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
17
25
|
it 'creates from a hash' do
|
18
26
|
AppConf.clear
|
19
|
-
AppConf.from_hash(
|
27
|
+
AppConf.from_hash(:user => {:name => {:first => 'Joe'}})
|
20
28
|
AppConf.user.name.first.must_equal 'Joe'
|
21
29
|
end
|
22
30
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 3
|
9
|
+
version: 0.2.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Phil Thompson
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-03-
|
17
|
+
date: 2011-03-29 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|