mimi-core 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mimi/core/manifest.rb +4 -2
- data/lib/mimi/core/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: 5c34c8dca865e034defa218ffbc461136650420a
|
4
|
+
data.tar.gz: 8bd4b5b12b7f258853145636870998df0f6669fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fd8235b0bef748a1db7974ed62050b6bba3acc285f837e803bb91d6eeca8948bf7b23ed9ec9481f32fd94a4457f0b9fb51e82b07507a924aef1f839c031a5e6
|
7
|
+
data.tar.gz: 48392a423929b3b4cc7ad56db1cde2da908e74e152ff747b91e091b098c705283dc2f133e787db9a484b74486aaff0a3e2a69c54153d24170d0c15af521ad826
|
data/lib/mimi/core/manifest.rb
CHANGED
@@ -226,7 +226,7 @@ module Mimi
|
|
226
226
|
# ```
|
227
227
|
#
|
228
228
|
# If `:default` is specified for the parameter and the value is not provided,
|
229
|
-
# the default value is returned
|
229
|
+
# the default value is returned, converted to corresponding type, if it is not nil
|
230
230
|
#
|
231
231
|
# ```ruby
|
232
232
|
# manifest = Mimi::Core::Manifest.new(var1: { default: nil })
|
@@ -514,7 +514,9 @@ module Mimi
|
|
514
514
|
#
|
515
515
|
def process_single_value(value, properties)
|
516
516
|
if properties[:const] || value.nil?
|
517
|
-
return properties[:default].
|
517
|
+
return properties[:default].call if properties[:default].is_a?(Proc)
|
518
|
+
return nil if properties[:default].nil?
|
519
|
+
value = properties[:default]
|
518
520
|
end
|
519
521
|
case properties[:type]
|
520
522
|
when :string
|
data/lib/mimi/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mimi-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kukushkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|