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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcf23c4ee6d9c6af1146a8cb392a5268720c54f3
4
- data.tar.gz: bbf9e13a00e1a04e007d8ef2ae0142a4f6566adf
3
+ metadata.gz: aa160adc045cc3b478250bc25843f1be1142c9ec
4
+ data.tar.gz: f407c1da6ea79a0da7c4fe2782a6351c4b4ec548
5
5
  SHA512:
6
- metadata.gz: 7a0c305f4447833807a98f463d6e7843e9c9f854784a5f782209a57bc1bd52e12732daf9c911d6e87fdbef36a63c102913263380628b32d74555ca74c9ba8e36
7
- data.tar.gz: 1d13e29e31dfa597f197272b32f4ff3a5716132ac40d1d48628719ac70ed8f582d3de316e7c7366ac7393ebef4ab7bcd51e7b93c54c00b8fb52b4e8d5251eaf6
6
+ metadata.gz: 222aeb80be0857eaf55762bfe91e06ac613f5600c63b824ead1dae8594771682b9aec45c2409d396656fad7a261780e40de3abbc5a3eeafd23cf5d454bf96dd1
7
+ data.tar.gz: 84edc10c6abb6312627c796f3fa3d7c01953f3b4b6d88f0766c9ceaa84805e78ee6be19715cd936dc14718f5884be56804a4e7dd6519b2089cb5080725db1532
@@ -9,4 +9,5 @@ Gem::Specification.new do |s|
9
9
  s.homepage = "https://github.com/axsh/fuguta"
10
10
  s.require_path = ['lib']
11
11
  s.files = `git ls-files`.split($/)
12
+ s.license = 'LGPLv3'
12
13
  end
@@ -92,7 +92,6 @@ module Fuguta
92
92
  l.load(File.expand_path(path, base_conf_dir))
93
93
  end
94
94
  }
95
- l.validate
96
95
 
97
96
  self
98
97
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Fuguta
3
- VERSION='1.0.2'
3
+ VERSION='1.0.3'
4
4
  end
@@ -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 = Test1.load(File.expand_path('../nest-test1.conf', __FILE__))
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
@@ -2,3 +2,5 @@ config.param1 = 1
2
2
  config.param2 = 2
3
3
 
4
4
  load 'test2.conf'
5
+
6
+ config.param3 = 30
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.2
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-08-22 00:00:00.000000000 Z
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: []