flexconf 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +9 -0
- data/flexconf.gemspec +1 -1
- data/lib/flexconf.rb +1 -1
- data/spec/flexconf_spec.rb +18 -0
- metadata +5 -4
data/HISTORY.md
ADDED
data/flexconf.gemspec
CHANGED
data/lib/flexconf.rb
CHANGED
data/spec/flexconf_spec.rb
CHANGED
@@ -63,6 +63,18 @@ describe FlexConf do
|
|
63
63
|
it "is enumerable" do
|
64
64
|
@this.count.should > 0
|
65
65
|
end
|
66
|
+
|
67
|
+
it "can return its keys" do
|
68
|
+
@this.keys.should include(:zoo, :this_file, :nest)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "can return its values" do
|
72
|
+
@this.values.should include("far", 0.5, 'seven')
|
73
|
+
end
|
74
|
+
|
75
|
+
it "can return itself as a hash" do
|
76
|
+
@this.to_hash.keys.should == @this.keys
|
77
|
+
end
|
66
78
|
end
|
67
79
|
|
68
80
|
describe "nesting" do
|
@@ -77,6 +89,12 @@ describe FlexConf do
|
|
77
89
|
it "can use arbitrary call styles" do
|
78
90
|
@this.nest[:renest].bar.should == 'foofoo'
|
79
91
|
end
|
92
|
+
|
93
|
+
it "can return nested hashes" do
|
94
|
+
@this.development.to_hash.should == {:foo => 'dev-fu',
|
95
|
+
:boo => 'Chicken Boo',
|
96
|
+
:yoo => 'yuh?'}
|
97
|
+
end
|
80
98
|
end
|
81
99
|
|
82
100
|
describe "initialization" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexconf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70126519419820 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70126519419820
|
25
25
|
description: ! "FlexConf is a simple configuration utility that does its job and gets\nout
|
26
26
|
of your way. It reads settings from a hash or YAML file ('config.yml' by default)\nbut
|
27
27
|
allows overrides from a '*_local.yml' file and from environment variables. \nSettings
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- .gitignore
|
38
38
|
- .rspec
|
39
39
|
- Gemfile
|
40
|
+
- HISTORY.md
|
40
41
|
- LICENSE.md
|
41
42
|
- README.md
|
42
43
|
- Rakefile
|