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.
- checksums.yaml +4 -4
- data/bin/rodolfo +8 -3
- data/lib/meta.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 235477c3e9015027f9782265e203be84078aa30d
|
4
|
+
data.tar.gz: 4cc58c32447200649c5dfb07bbc3aaa3415a165a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
20
|
+
unless opts.package?
|
20
21
|
puts opts
|
21
22
|
exit 1
|
22
23
|
end
|
23
24
|
|
24
|
-
|
25
|
-
|
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