ultra_config 0.11.2 → 0.12.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: cd3774837b3d62bbb7acd6552b69f1dc83f9449b
4
- data.tar.gz: ebf2f4d7ae03672bfd731717653eaadc16776bc9
3
+ metadata.gz: 58a62bd2b4590fb7d00e698c1bd3514773eb7de8
4
+ data.tar.gz: 10fbaa211096cc69a4ee95a40ecf01ed5d2536e5
5
5
  SHA512:
6
- metadata.gz: '00937620283f74a3491ff91769380400119c1096cda51688d848aadc88594154d98ea443ac3c5ef6f6bf3f0cfd9867dedab229c546e27cee800363d5453537b8'
7
- data.tar.gz: 656c41d900329dec728eb9cc4321a7aa0214f19ee2a478fd08086c18528789600a4114c258e58a0a1088a59540b260c5194e1b59e6a3fbeb96460a30f8ce25af
6
+ metadata.gz: 164325f002a4eead14d033410e0aacdd72c6eb8e962c9de84d8c4999e0ff22b6009cfbbec91e4a05c1bf2d163ebe653979fda80b5c644a788ba77518b61ecfa2
7
+ data.tar.gz: 7b53809a1b08a2cee51941080eae2b879f0ae0c953417db076f631c74ceab49e9556720eebe05117ca541e4150e7293664a4c5053adc803b2fef45d33e016e9b
@@ -21,7 +21,7 @@ module UltraConfig
21
21
  type_safety(Settings.type_safety) unless @type_safety_checked
22
22
  @value = @intermediate_value
23
23
  rescue UltraConfig::Validation::ValidationError
24
- raise UltraConfig::Validation::ValidationError, @error_msg
24
+ raise UltraConfig::Validation::ValidationError.new(@error_msg, sanitize? ? '*****' : @intermediate_value)
25
25
  ensure
26
26
  @type_safety_checked = false
27
27
  @intermediate_value = nil
@@ -4,7 +4,17 @@ module UltraConfig
4
4
  module Validation
5
5
  include Boolean
6
6
 
7
- class ValidationError < StandardError; end
7
+ class ValidationError < StandardError
8
+ attr_reader :config
9
+ attr_reader :value
10
+
11
+ def initialize(msg = nil, value = nil)
12
+ @value = value
13
+
14
+ super(msg)
15
+ end
16
+ end
17
+
8
18
  class TypeValidationError < ValidationError; end
9
19
 
10
20
  def type_safety(type)
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.11.2'
7
+ spec.version = '0.12.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.11.2
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregory Kuruc