kafo 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kafo/kafo_configure.rb +5 -1
- data/lib/kafo/param.rb +2 -1
- data/lib/kafo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 095e7777fcdd067feaccae76002cebd20bedc8ee
|
4
|
+
data.tar.gz: c9c0fab972d24f509aba17b1015d0c22c8ca6287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e903393ce3a36c473e6c727ef91dc5bad87819aeb8499578ab1924ac679efca6cb7178feb5f1be7b6f6fe8e0876da9097e9aae77a15f7fc94317c2c4fb0a3e76
|
7
|
+
data.tar.gz: 62227ed73ca0beed7b90acadcc187e55bf6be2d57a74ddee7a52283d3edf6fa0b6ea7e27b6e674c8fb76f4f5adcfefa72bad5ae7ee6e14f4046d97cb5ffb2b8f
|
data/lib/kafo/kafo_configure.rb
CHANGED
@@ -197,6 +197,10 @@ module Kafo
|
|
197
197
|
self.class.exit(:unknown_module)
|
198
198
|
end
|
199
199
|
|
200
|
+
def enabled_params
|
201
|
+
params.select { |p| p.module.enabled? }
|
202
|
+
end
|
203
|
+
|
200
204
|
def reset_params_cache
|
201
205
|
@params = nil
|
202
206
|
params
|
@@ -391,7 +395,7 @@ module Kafo
|
|
391
395
|
|
392
396
|
def validate_all(logging = true)
|
393
397
|
logger.info 'Running validation checks'
|
394
|
-
results =
|
398
|
+
results = enabled_params.map do |param|
|
395
399
|
result = param.valid?
|
396
400
|
errors = param.validation_errors.join(', ')
|
397
401
|
progress_log(:error, "Parameter #{with_prefix(param)} invalid: #{errors}") if logging && !result
|
data/lib/kafo/param.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require 'kafo/condition'
|
3
|
+
require 'kafo/data_type'
|
3
4
|
require 'kafo/validator'
|
4
5
|
|
5
6
|
module Kafo
|
@@ -20,7 +21,7 @@ module Kafo
|
|
20
21
|
|
21
22
|
# we use @value_set flag because even nil can be valid value
|
22
23
|
def value
|
23
|
-
@value_set ? @
|
24
|
+
@type.typecast(@value_set ? @value : default)
|
24
25
|
end
|
25
26
|
|
26
27
|
def value=(value)
|
data/lib/kafo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Hulan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|