fuguta 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fuguta.gemspec +1 -0
- data/lib/fuguta.rb +0 -1
- data/lib/fuguta/version.rb +1 -1
- data/spec/configuration_spec.rb +12 -1
- data/spec/nest-test1.conf +2 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa160adc045cc3b478250bc25843f1be1142c9ec
|
4
|
+
data.tar.gz: f407c1da6ea79a0da7c4fe2782a6351c4b4ec548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 222aeb80be0857eaf55762bfe91e06ac613f5600c63b824ead1dae8594771682b9aec45c2409d396656fad7a261780e40de3abbc5a3eeafd23cf5d454bf96dd1
|
7
|
+
data.tar.gz: 84edc10c6abb6312627c796f3fa3d7c01953f3b4b6d88f0766c9ceaa84805e78ee6be19715cd936dc14718f5884be56804a4e7dd6519b2089cb5080725db1532
|
data/fuguta.gemspec
CHANGED
data/lib/fuguta.rb
CHANGED
data/lib/fuguta/version.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
@@ -5,6 +5,16 @@ describe Fuguta::Configuration do
|
|
5
5
|
param :param1
|
6
6
|
param :param2
|
7
7
|
end
|
8
|
+
|
9
|
+
class NestTest1 < Test1
|
10
|
+
param :param3
|
11
|
+
|
12
|
+
def validate(errors)
|
13
|
+
if @config[:param3].nil?
|
14
|
+
errors << "Need to set param3"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
8
18
|
|
9
19
|
it "loads conf file" do
|
10
20
|
conf = Test1.load(File.expand_path('../test1.conf', __FILE__))
|
@@ -19,8 +29,9 @@ describe Fuguta::Configuration do
|
|
19
29
|
end
|
20
30
|
|
21
31
|
it "allows nested imports/loads" do
|
22
|
-
conf =
|
32
|
+
conf = NestTest1.load(File.expand_path('../nest-test1.conf', __FILE__))
|
23
33
|
expect(conf.param1).to eq(10)
|
24
34
|
expect(conf.param2).to eq(20)
|
35
|
+
expect(conf.param3).to eq(30)
|
25
36
|
end
|
26
37
|
end
|
data/spec/nest-test1.conf
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuguta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Axsh co. LTD
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A configuration framework for Ruby programs
|
14
14
|
email:
|
@@ -30,7 +30,8 @@ files:
|
|
30
30
|
- spec/test1.conf
|
31
31
|
- spec/test2.conf
|
32
32
|
homepage: https://github.com/axsh/fuguta
|
33
|
-
licenses:
|
33
|
+
licenses:
|
34
|
+
- LGPLv3
|
34
35
|
metadata: {}
|
35
36
|
post_install_message:
|
36
37
|
rdoc_options: []
|