rodolfo 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rodolfo/cli.rb +1 -3
- data/lib/rodolfo/json_schema.rb +1 -2
- data/lib/rodolfo/meta.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: ebd4fa30450adc2268539bb7c36fd359714689c3
|
4
|
+
data.tar.gz: e5dd078fc2dae3cc03a9a339c102687669137e73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b71c97573be62ca0b7e055b5002ce84874ffa02984a4ab7d069da136f41fb8de68d151f753bb7ba7f275911d189d51f2bfb02c13c2ade474ee3256515e9a81dc
|
7
|
+
data.tar.gz: 82c9d81d4028ad35ce0d2f07cd36f40a263852f8c7983557eec6ae10e8fbca9f511ab62919d39982d4f3f38dffdd29242e013e6f8ba6bcea6c713fc6ff3e99b0
|
data/lib/rodolfo/cli.rb
CHANGED
@@ -68,9 +68,7 @@ module Rodolfo
|
|
68
68
|
method_option 'save-to', type: :string, aliases: '-s'
|
69
69
|
def render(recipe_path)
|
70
70
|
data = $stdin.tty? ? {} : JSON.parse($stdin.read, symbolize_names: true)
|
71
|
-
|
72
|
-
|
73
|
-
content = recipe.render
|
71
|
+
content = Rodolfo::Renderer.new(recipe_path, data).render
|
74
72
|
|
75
73
|
file_name = options['save-to']
|
76
74
|
file_name ? File.write(file_name, content) : STDOUT.write(content)
|
data/lib/rodolfo/json_schema.rb
CHANGED
@@ -13,8 +13,7 @@ module Rodolfo
|
|
13
13
|
# Validate the json schema
|
14
14
|
# May raise a SchemaValidationError
|
15
15
|
def validate(data)
|
16
|
-
opts = {
|
17
|
-
strict: true }
|
16
|
+
opts = { insert_defaults: true, strict: true }
|
18
17
|
errors = JSON::Validator.fully_validate json, data, opts
|
19
18
|
raise SchemaValidationError, errors unless errors.empty?
|
20
19
|
data
|
data/lib/rodolfo/meta.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodolfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Initios
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|