rodolfo 2.4.1 → 2.4.2

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: 8176bbe5d94ac08b1412fb0d43e324fe1048debf
4
- data.tar.gz: 85c76f4c3b1b3f6d6423ffdf1f17cfcc43aa8a6b
3
+ metadata.gz: ebd4fa30450adc2268539bb7c36fd359714689c3
4
+ data.tar.gz: e5dd078fc2dae3cc03a9a339c102687669137e73
5
5
  SHA512:
6
- metadata.gz: b92693fc5cbf65bda22495267966ab8b8430b95c6d0ac1783f1e8b6fddda6a35feb1a7590a4631fabc55e99e05070a5de1bd7454f9ad5039a23a7628f73daee2
7
- data.tar.gz: 7e0562d1f0a9b698f8b373ed9427777d258f2998925d6321719145ef2ecd8bf816062f54b65dbac29077b88416884c8478f881213ad7d3928d1820f225a2d0c3
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
- recipe = Rodolfo::Renderer.new recipe_path, data
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)
@@ -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 = { errors_as_objects: true, insert_defaults: true,
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
@@ -1,4 +1,4 @@
1
1
  # Create PDFs from the CLI using Prawn
2
2
  module Rodolfo
3
- VERSION = '2.4.1'.freeze
3
+ VERSION = '2.4.2'.freeze
4
4
  end
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.1
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-12 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema