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 +4 -4
- data/.travis.yml +2 -3
- data/json-fuzz-generator.gemspec +1 -1
- data/lib/json/fuzz/generator/keyword/items.rb +1 -1
- data/lib/json/fuzz/generator/version.rb +1 -1
- data/spec/json-fuzz-generator_spec.rb +11 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ab9100303e7df014e6970033116fc6b7ef401af
|
4
|
+
data.tar.gz: 58518f36a9b6b5f3107da7605d9ee8ff252baad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6ecb7bfe49ebf3561b5898362cf1b001489ff0af78699c7ea3dde273a94c3d3acf039f57dda560c0be74d87185330104a442c96f40e551ae1d338952a090b1d
|
7
|
+
data.tar.gz: 73c1e49651e6d1ad4a96e8c505f7859bf9739d5fc6874ae857d45d75ad39c03506d781e916b503a6f3c955a83b9e48fada7dc9c57b5beaddbc053455fae78a90
|
data/.travis.yml
CHANGED
data/json-fuzz-generator.gemspec
CHANGED
@@ -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
|
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)
|
@@ -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.
|
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:
|
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: '
|
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: '
|
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.
|
170
|
+
rubygems_version: 2.4.5
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Fuzz parameter gemerator from json-schema
|