json_schema 0.20.7 → 0.20.8

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/validate-schema +10 -12
  3. data/test/bin_test.rb +5 -6
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c800e1fd6f5a28d53899ac7832439c0c6ec66d8c4948484f60e42c195a2bc247
4
- data.tar.gz: 1da408588552c827c26ff7d9606e805fc04e9b0efa3000176d23439c20d791e8
3
+ metadata.gz: 239a8df86c5fd746683d265f47f53ee415ac40613c8411abc8e4492cc3e02e18
4
+ data.tar.gz: 5614b247d018816964ab128923d4a86fd1fd4e6c397309bb74864c06a4ee95fd
5
5
  SHA512:
6
- metadata.gz: 491ad2864ae84497a4c44ddc7dcef6cceb0dde648f04f04b70712898afa056ad3596cb0355deb56adf979a80c4ee90a4aaa4fc0b7048af5b550badb8ceabb7e9
7
- data.tar.gz: b6307a601843446eba043e83ee7b9b1b36abeb3d9d0b8a5a766f835111807fd332929efca1f57ba64d57edb4450b2fad6528798e9c82a6e2866c37f15441c874
6
+ metadata.gz: fad2007fa5541c260baa72dd32527fba69ed292c7ec589959f023ef8a4edc206a1bb260dc0d3b6421586758f3d707c6284aac5c300d1dda00d30250d3f78c45f
7
+ data.tar.gz: cf384d7f97d445df492f9cb67737d852b725d63542d5da2bd30809a91a36c5277ea851c7502cda03724a13ab1eb2036122eaf4c1aeb5a661e25ec4bf81993cc7
@@ -26,17 +26,15 @@ parser = OptionParser.new { |opts|
26
26
  end
27
27
  }
28
28
 
29
- if $0 == __FILE__
30
- parser.parse!
31
- success = command.run(ARGV.dup)
29
+ parser.parse!
30
+ success = command.run(ARGV.dup)
32
31
 
33
- if success
34
- command.messages.each { |m| $stdout.puts(m) }
35
- elsif !command.errors.empty?
36
- command.errors.each { |e| $stderr.puts(e) }
37
- exit(1)
38
- else
39
- print_usage!
40
- exit(1)
41
- end
32
+ if success
33
+ command.messages.each { |m| $stdout.puts(m) }
34
+ elsif !command.errors.empty?
35
+ command.errors.each { |e| $stderr.puts(e) }
36
+ exit(1)
37
+ else
38
+ print_usage!
39
+ exit(1)
42
40
  end
@@ -1,12 +1,10 @@
1
1
  require "test_helper"
2
2
 
3
3
  #
4
- # The purpose of this sets of tests is just to include our Ruby executables
5
- # where possible so that we can get very basic sanity checks on their syntax
6
- # (which is something that of course Ruby can't do by default).
4
+ # The purpose of this sets of tests is just to test our Ruby executables
5
+ # where possible so that we can get very basic sanity checks on their syntax.
7
6
  #
8
- # We can do this without actually executing them because they're gated by `if
9
- # $0 == __FILE__` statements.
7
+ # We can do this without actually executing them with a "ruby -c" call.
10
8
  #
11
9
 
12
10
  describe "executables in bin/" do
@@ -15,6 +13,7 @@ describe "executables in bin/" do
15
13
  end
16
14
 
17
15
  it "has roughly valid Ruby structure for validate-schema" do
18
- load File.join(@bin_dir, "validate-schema")
16
+ IO.popen(["ruby", "-c", File.join(@bin_dir, "validate-schema")]) { |io| io.read }
17
+ assert_equal $?.exitstatus, 0, "Ruby syntax check failed; see error above"
19
18
  end
20
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.7
4
+ version: 0.20.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-18 00:00:00.000000000 Z
11
+ date: 2019-09-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.0.3
72
+ rubygems_version: 3.0.6
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: A JSON Schema V4 and Hyperschema V4 parser and validator.