rodolfo 1.0.0.pre1 → 1.0.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rodolfo +8 -3
  3. data/lib/meta.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b498230131abc3d841264549a9ec547fceea25e
4
- data.tar.gz: 6833a7b5d93376c8aacc4258f678fe76278c8980
3
+ metadata.gz: 235477c3e9015027f9782265e203be84078aa30d
4
+ data.tar.gz: 4cc58c32447200649c5dfb07bbc3aaa3415a165a
5
5
  SHA512:
6
- metadata.gz: bb9562065baa9d63a5ef04349cd573875e77567a803bc2993499957a242f878600e77f1eb9580e6efe533f7f7f59eaf83d82832965b819406dafb120678c558a
7
- data.tar.gz: 356f2c476efe91758744f44d61e11f5b8efb284d571cec90935425b074e404353b88e18367a9fd53cdcf17e172ba8cfef563a8d4ddc13b1413ccd49b89e9b52b
6
+ metadata.gz: 79718b075a8f667138f0eceb3e27d4f016630b991a7f0a5ee0fe628e3000f690affc49a2ba3e0e0ffe6025a0f85aaa37b2d7e6415607f81d7f163ba06a0267fe
7
+ data.tar.gz: c4ed51ec22e55137588fe9a28172f17040bada2b1b8401636135ffe34920be51ea0dd7ba5e00d49ea1f714a42513a6efb6d55c131937683b9701f8bebab5a352
data/bin/rodolfo CHANGED
@@ -8,6 +8,7 @@ require File.join(root_path, 'lib', 'rodolfo')
8
8
 
9
9
  opts = Slop.parse do |o|
10
10
  o.string '-p', '--package', 'package name'
11
+ o.on '--schema', 'get the package json schema'
11
12
  o.on '--skip-validation', 'skip json schema validation'
12
13
  o.on '--version', 'print the version' do
13
14
  require File.join(root_path, 'lib', 'meta')
@@ -16,13 +17,17 @@ opts = Slop.parse do |o|
16
17
  end
17
18
  end
18
19
 
19
- unless opts[:package]
20
+ unless opts.package?
20
21
  puts opts
21
22
  exit 1
22
23
  end
23
24
 
24
- json_data = $stdin.tty? ? {} : $stdin.read
25
- data = JSON.parse(json_data, symbolize_names: true)
25
+ if opts.schema?
26
+ STDOUT.write Rodolfo::Package.new(opts[:package], {}).schema
27
+ exit 0
28
+ end
29
+
30
+ data = $stdin.tty? ? {} : JSON.parse($stdin.read, symbolize_names: true)
26
31
  package = Rodolfo::Package.new opts[:package], data
27
32
 
28
33
  unless opts.skip_validation? || package.valid?
data/lib/meta.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Create PDFs from the CLI using Prawn
3
3
  module Rodolfo
4
- VERSION = '1.0.0.pre1'.freeze
4
+ VERSION = '1.0.0.pre2'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodolfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre1
4
+ version: 1.0.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Initios