ultra_config 0.2.0 → 0.3.0

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: 0e091cc18ac143003d88a9a24e10f839517b5860
4
- data.tar.gz: 2cf8a5e6ed8acb1b7bb2fc40957f1c20c0466693
3
+ metadata.gz: 676f5e1dfc918319086131538dedc889aa4f866e
4
+ data.tar.gz: 5d40a683ea9225df5dac8dd86091d26ef97e5afe
5
5
  SHA512:
6
- metadata.gz: 1729565fe216396c9fae8d3789e16a4c22df81fba022514c1496f52e953aafa57951c837eb7f2ab69e6b013076dd765a89f267bee30a9177d9be89c5eb357c14
7
- data.tar.gz: 3760cb323990e0ab06d0eb23db0c221c0bb351aac5b6e67e573722f1a5886b6c6a723d10065e6b0608949f2b18fff665f78be082be5d0ce2c4a5ec4711da891b
6
+ metadata.gz: ed611e8048ae483c96ec5a559b38f0daea2555e3350d168a753c212bddf906ffc52843e09403e7c72222df98f9ff44b5c8a3532e5f4214d9591edd90f06e496d
7
+ data.tar.gz: 2d84201a46e57b356a107ee0d285be973414b65b2e4886c01d4f73fd02daaee7c1190535964449bd59749b5b804413e5de8df1c2e98de229c5ce8180e3bffc09
@@ -0,0 +1,3 @@
1
+ module Boolean; end
2
+ class TrueClass; include Boolean; end
3
+ class FalseClass; include Boolean; end
@@ -1,5 +1,9 @@
1
+ require_relative 'utilities/boolean'
2
+
1
3
  module UltraConfig
2
4
  class Validator
5
+ extend Boolean
6
+
3
7
  class ValidationError < StandardError; end
4
8
  class TypeValidationError < ValidationError; end
5
9
 
@@ -14,6 +18,7 @@ module UltraConfig
14
18
 
15
19
  def self.type_safety(old)
16
20
  return if old.nil?
21
+ return if old.is_a?(Boolean) && @test_value.is_a?(Boolean)
17
22
 
18
23
  raise TypeValidationError if old.class != @test_value.class
19
24
  end
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.2.0'
7
+ spec.version = '0.3.0'
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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Kuruc
@@ -68,6 +68,7 @@ files:
68
68
  - lib/ultra_config/config.rb
69
69
  - lib/ultra_config/namespace.rb
70
70
  - lib/ultra_config/settings.rb
71
+ - lib/ultra_config/utilities/boolean.rb
71
72
  - lib/ultra_config/validator.rb
72
73
  - ultra_config.gemspec
73
74
  homepage: https://github.com/SpyMachine/UltraConfig