json-fuzz-generator 0.0.1 → 0.0.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: 30a39a73a5cf80278262d3256ebb21cf148cf8f3
4
- data.tar.gz: 07a5db01c606abf3f00702cfbfad86f6df46d8fd
3
+ metadata.gz: 0ab9100303e7df014e6970033116fc6b7ef401af
4
+ data.tar.gz: 58518f36a9b6b5f3107da7605d9ee8ff252baad2
5
5
  SHA512:
6
- metadata.gz: f1ca3a27181a14ef2297b670f4c9742b0ae82bc46b5f09e67c093331dd01f9b42e2db6f676ff3091f747228c1f7c9b35a1e3fe130c6acb61a2c71e562fb7d4c0
7
- data.tar.gz: 967c4a4f35a5a3fcbe26ab9e6ce722f25679d7d27ca01780a669f92ab5fdf58c7204a67445d871ce4a92b697e35f4fd831e2f3006810050e6b1c8519a522bb86
6
+ metadata.gz: c6ecb7bfe49ebf3561b5898362cf1b001489ff0af78699c7ea3dde273a94c3d3acf039f57dda560c0be74d87185330104a442c96f40e551ae1d338952a090b1d
7
+ data.tar.gz: 73c1e49651e6d1ad4a96e8c505f7859bf9739d5fc6874ae857d45d75ad39c03506d781e916b503a6f3c955a83b9e48fada7dc9c57b5beaddbc053455fae78a90
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.1
4
- - 2.1.0
3
+ - 2.2.3
4
+ - 2.1.6
5
5
  - 2.0.0
6
- - 1.9.3
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "json-schema"
21
+ spec.add_dependency "json-schema", "< 2.3"
22
22
  spec.add_dependency "randexp"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.6"
@@ -51,7 +51,7 @@ module JSON
51
51
  generated_param = []
52
52
 
53
53
  if items.instance_of?(Hash)
54
- generated_param = JSON::Fuzz::Generator.default_param(items)
54
+ generated_param << JSON::Fuzz::Generator.default_param(items)
55
55
  else
56
56
  items.each do |item|
57
57
  generated_param << JSON::Fuzz::Generator.default_param(item)
@@ -1,7 +1,7 @@
1
1
  module JSON
2
2
  module Fuzz
3
3
  module Generator
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -6,7 +6,6 @@ describe JSON::Fuzz do
6
6
  it "can generate valid parameter" do
7
7
  valid_parameter = JSON::Fuzz::Generator.default_param(schema)
8
8
  expect(valid_parameter).to be_matching_schema(schema)
9
- #expect(JSON::Validator.validate(schema, valid_parameter)).to eq(true)
10
9
  end
11
10
  end
12
11
 
@@ -15,7 +14,6 @@ describe JSON::Fuzz do
15
14
  invalid_parameters = JSON::Fuzz::Generator.generate(schema)
16
15
  invalid_parameters.each do |invalid_param|
17
16
  expect(invalid_param).to be_not_matching_schema(schema)
18
- #expect(JSON::Validator.validate(schema, invalid_param)).to eq(false)
19
17
  end
20
18
  end
21
19
  end
@@ -368,6 +366,17 @@ describe JSON::Fuzz do
368
366
  end
369
367
  end
370
368
 
369
+ context "given array style" do
370
+ it_behaves_like JSON::Fuzz::Generator do
371
+ let(:schema) {{
372
+ "$schema" => "http://json-schema.org/draft-04/schema#",
373
+ "items" => {
374
+ "type" => "boolean"
375
+ },
376
+ }}
377
+ end
378
+ end
379
+
371
380
  context "with additionalItems" do
372
381
  context "given false" do
373
382
  it_behaves_like JSON::Fuzz::Generator do
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-fuzz-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - deme0607
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "<"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "<"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: randexp
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.2.2
170
+ rubygems_version: 2.4.5
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Fuzz parameter gemerator from json-schema