committee 2.1.0 → 2.1.1

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: 6b64e50881610fea8f1bb4ee2f0c5ec42f196d15
4
- data.tar.gz: b1a449811bf1750b00f3dde8acd48520a42af196
3
+ metadata.gz: 8b9b7fded711273c72d2e35628376206b082f115
4
+ data.tar.gz: f89a74a16ed6d15b2a6f8f363182776675e7418d
5
5
  SHA512:
6
- metadata.gz: 577dcd6f0ff08f595af7c031d3f37cd96b9186858066716b27a9d6d150141309da0ccfab324b6c03fc38784a8456b0ddb523b1c37493b29d9d6baa343ee2ef53
7
- data.tar.gz: 4193d95a73e0af8d5e66d51a05e2cd5e500874712c1bb498b7a9f89f829c9d4fac2ec69c9c27ed79e87d6ed3977e7966d3bcd924700559aec743c6c882a8ff28
6
+ metadata.gz: 7e356500e91bf48bde973b1cfa352e1fafa788d0be4b8d1f4303b338a29b2b49f0f7688b0caa84ac28f33eddadef762ed04c9bd60a8f01c5c9fac185a85fc5d3
7
+ data.tar.gz: ec9773029e7b1052b634f78e64370cbe1f265d94c89fd4893069d1854f9e8bb336c6d0de0049a71fcbca5c83479907ccb89c8bb25382145db87cc9b3c7a51197
data/bin/committee-stub CHANGED
@@ -9,14 +9,12 @@ args = ARGV.dup
9
9
  bin = Committee::Bin::CommitteeStub.new
10
10
  options, parser = bin.get_options_parser
11
11
 
12
- if $0 == __FILE__
13
- parser.parse!(args)
14
-
15
- unless args.count == 1 || options[:help] || !options[:driver]
16
- puts parser.to_s
17
- exit
18
- end
12
+ parser.parse!(args)
19
13
 
14
+ if options[:help] || !options[:driver] || args.length < 1
15
+ # shows help information
16
+ puts parser.to_s
17
+ else
20
18
  driver = Committee::Drivers.driver_from_name(options[:driver])
21
19
  schema = driver.parse(::YAML.load(File.read(args[0])))
22
20
 
@@ -65,7 +65,7 @@ module Committee::Test
65
65
  end
66
66
 
67
67
  def schema_path
68
- raise "Please override #commitee_schema."
68
+ raise "Please override #committee_schema."
69
69
  end
70
70
 
71
71
  def schema_url_prefix
data/test/bin_test.rb CHANGED
@@ -12,6 +12,7 @@ require_relative "test_helper"
12
12
  describe "executables in bin/" do
13
13
  before do
14
14
  @bin_dir = File.expand_path("../../bin", __FILE__)
15
+ ARGV[0] = '-h'
15
16
  end
16
17
 
17
18
  it "has roughly valid Ruby structure for committee-stub" do
@@ -121,7 +121,12 @@ describe Committee::StringParamsCoercer do
121
121
  def check_convert(key, before_value, after_value)
122
122
  data = {key => before_value}
123
123
  call(data)
124
- assert_equal(data[key], after_value)
124
+
125
+ if !after_value.nil?
126
+ assert_equal(data[key], after_value)
127
+ else
128
+ assert_nil(data[key])
129
+ end
125
130
  end
126
131
 
127
132
  def call(data, options={})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: committee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandur
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-27 00:00:00.000000000 Z
12
+ date: 2018-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_schema