ultra_config 0.6.0 → 0.6.1

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: 45e3cd0b3e5c162a02035c400998f8032e5f3870
4
- data.tar.gz: ddc1e423404d068d18a42017eb35283048107ff1
3
+ metadata.gz: faae8b0f6b12bc463661b9cebc0f45824056172f
4
+ data.tar.gz: 076b41dd9c74b242388e94b74c9f836d21c55cb8
5
5
  SHA512:
6
- metadata.gz: 224b1be537616646332bc2647b088584fb88e55639a4c801e51c6bb6909ca1dd6b6b0c576868d6946c7c6e2b26377404fb680a161d0ad6cd5c567fa3294b92da
7
- data.tar.gz: e7a5552fb37d6f859470f166f36029dba942fd54be780ecde2cfe4b86f97c2a2d5bf44390d94b7a7957a600310666a121a31c1ef70511b2f2537138b7a8d8ed3
6
+ metadata.gz: 97f9ee06384633e16d3bf7becadc36eb3b7a7b49b45a5b2079ac1b1f9ca9f226252ff5d7ec7fa43d38a86060f97ac1bd8adff2f7dd16ee103ba6de60514d5830
7
+ data.tar.gz: ea31726e063e47dd3a28ac588815dff424a475d6af96e94de063ce0188910512f335ca0543e9f1f77c35e2b051d81ea087b7aa8988106f812d6d0266b1fdbf1f
@@ -15,6 +15,10 @@ module UltraConfig
15
15
  @objects[name] = Namespace.new(&block)
16
16
  end
17
17
 
18
+ def constants(constants)
19
+ @constants ||= constants
20
+ end
21
+
18
22
  def config(name, default = nil, &block)
19
23
  @objects[name] = Config.new(default, &block)
20
24
  end
@@ -11,6 +11,8 @@ module UltraConfig
11
11
  @old_value = old
12
12
  @test_value = new
13
13
 
14
+ return if @test_value.nil?
15
+
14
16
  self.instance_eval(&validation) if validation
15
17
 
16
18
  type_safety(Settings.type_safety) unless @explicit_type_safety
data/ultra_config.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'ultra_config'
7
- spec.version = '0.6.0'
7
+ spec.version = '0.6.1'
8
8
  spec.authors = ['Gregory Kuruc']
9
9
  spec.email = ['gjk910327@gmail.com']
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultra_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Kuruc