json_schema-faker 0.6.1 → 0.6.3

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
- SHA1:
3
- metadata.gz: 55f8ba801612ccb07d821cc0428a9909b3ddff4c
4
- data.tar.gz: 7c4f071e4a7c0e0ba22025dc6d5334d7a6a3c32f
2
+ SHA256:
3
+ metadata.gz: 825732f967f977c99909ab3e10c9f9436d666f38091dca7dffdd1e87578a15aa
4
+ data.tar.gz: 571940be85e56f8d730219ab8863fba0febe0e3c9dcf6e81f14271515c90dda1
5
5
  SHA512:
6
- metadata.gz: '04390e5b4ab6c4a3a9782f32a55656465d6b0c4ecdfebd5507eca7cff91177acaa7ecc16eceb0d2be8e3773915dd156265530820693ccc713723ab2dcd02077b'
7
- data.tar.gz: 664d28afe382ea2764198fab2a811129c78b01cbafae64b97668fb367ced53abdaa6db2fa0381c8ef6e6564d7644168731f1e9d2cf12fd8afe37a3d7e7043bfc
6
+ metadata.gz: f4d8bd7a1b5591e7952d19845b2bcafdaeb76a2973c1cea6beb53e1eb4b20531315f45c867be1e9457412082e62ba5ddd1e29ac3b4a9a30b9b951ae51c5b316f
7
+ data.tar.gz: d34567b9bc89aeab2df034e8228a1403ac72a6381962e22b416337b7c8b8fa7ee4afcdfad2b8c7d5d783252627cb0b4eb7fbe632ab570637b37d384d2a2c1d1e
data/CHANGELOG.md CHANGED
@@ -1,55 +1,65 @@
1
+ ## 0.6.3
2
+
3
+ - Fixed
4
+ - #18
5
+
6
+ ## 0.6.2
7
+
8
+ - Fixed
9
+ - #16
10
+
1
11
  ## 0.6.1
2
12
 
3
- * Fixed
4
- * hint-example descending
13
+ - Fixed
14
+ - hint-example descending
5
15
 
6
16
  ## 0.6.0
7
17
 
8
- * Added
9
- * support of default faker against format
10
- * support for copying format in take_logical_and_of_schema
18
+ - Added
19
+ - support of default faker against format
20
+ - support for copying format in take_logical_and_of_schema
11
21
 
12
22
  ## 0.5.2
13
23
 
14
- * Added
15
- * support of schema dependency for JsonSchema::Faker::Strategy::Simple
16
- * validate default and return only if valid
17
- * Fixed
18
- * fixes bug of disruption in JsonSchema::Faker::Util.take_logical_and_of_schema
19
- * fixes bug of not merged in JsonSchema::Faker::Strategy::Simple#compact_schema
24
+ - Added
25
+ - support of schema dependency for JsonSchema::Faker::Strategy::Simple
26
+ - validate default and return only if valid
27
+ - Fixed
28
+ - fixes bug of disruption in JsonSchema::Faker::Util.take_logical_and_of_schema
29
+ - fixes bug of not merged in JsonSchema::Faker::Strategy::Simple#compact_schema
20
30
 
21
31
  ## 0.5.1
22
32
 
23
- * Added
24
- * support for copying pattern in take_logical_and_of_schema
33
+ - Added
34
+ - support for copying pattern in take_logical_and_of_schema
25
35
 
26
36
  ## 0.5.0
27
37
 
28
- * Added
29
- * ::JsonSchema::Faker::Util. utility for json_schema
30
- * Removed
31
- * ::JsonSchema::Faker::Strategy::Simple.merge_schema! is removed. use ::JsonSchema::Faker::Util.take_logical_and_of_schema instead.
38
+ - Added
39
+ - ::JsonSchema::Faker::Util. utility for json_schema
40
+ - Removed
41
+ - ::JsonSchema::Faker::Strategy::Simple.merge_schema! is removed. use ::JsonSchema::Faker::Util.take_logical_and_of_schema instead.
32
42
 
33
43
  ## 0.4.0
34
44
 
35
- * Added
36
- * Greedy strategy to use properties as much as possible (suitable to response generation)
45
+ - Added
46
+ - Greedy strategy to use properties as much as possible (suitable to response generation)
37
47
 
38
48
  ## 0.3.0
39
49
 
40
- * Added
41
- * can add faker to format
50
+ - Added
51
+ - can add faker to format
42
52
 
43
53
  ## 0.2.0
44
54
 
45
- * Added
46
- * support example as hint
55
+ - Added
56
+ - support example as hint
47
57
 
48
58
  ## 0.1.1
49
59
 
50
- * Added
51
- * refactor and improve generation
60
+ - Added
61
+ - refactor and improve generation
52
62
 
53
63
  ## 0.1.0
54
64
 
55
- * initial release
65
+ - initial release
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.3
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.add_dependency "pxeger"
20
20
  spec.add_dependency "faker"
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.12"
22
+ spec.add_development_dependency "bundler"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
 
25
25
  # test
@@ -16,7 +16,7 @@ class JsonSchema::Faker
16
16
  def email(schema, hint: nil, position: nil)
17
17
  raise "invalid schema given" unless schema.format == "email"
18
18
 
19
- (hint && hint[:example]) || ::Faker::Internet.safe_email
19
+ (hint && hint[:example]) || ::Faker::Internet.email
20
20
  end
21
21
 
22
22
  # https://tools.ietf.org/html/rfc2606
@@ -53,7 +53,7 @@ class JsonSchema::Faker
53
53
  raise "invalid schema given" unless schema.format == "uri"
54
54
 
55
55
  # TODO: urn
56
- (hint && hint[:example]) || ::Faker::Internet.url(safe_domain)
56
+ (hint && hint[:example]) || ::Faker::Internet.url(host: safe_domain)
57
57
  end
58
58
 
59
59
  protected def safe_domain
@@ -105,7 +105,7 @@ class JsonSchema::Faker
105
105
  a.additonal_items = false
106
106
  else
107
107
  if b.additional_items.is_a?(::JsonSchema::Schema)
108
- if a.additional_items.is_a?(::JsonSchem::Schema)
108
+ if a.additional_items.is_a?(::JsonSchema::Schema)
109
109
  ::JsonSchema::Faker::Configuration.logger.warn "not support merging additionalItems" if ::JsonSchema::Faker::Configuration.logger
110
110
  else
111
111
  a.additional_items = b.additional_items
@@ -157,7 +157,7 @@ class JsonSchema::Faker
157
157
  a.additional_properties = false
158
158
  else
159
159
  if b.additional_properties.is_a?(::JsonSchema::Schema)
160
- if a.additional_properties.is_a?(::JsonSchem::Schema)
160
+ if a.additional_properties.is_a?(::JsonSchema::Schema)
161
161
  ::JsonSchema::Faker::Configuration.logger.warn "not support merging additionalProperties" if ::JsonSchema::Faker::Configuration.logger
162
162
  else
163
163
  a.additional_properties = b.additional_properties
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schema-faker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - okitan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_schema
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.12'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.12'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +197,7 @@ homepage: https://github.com/okitan/json_schema-faker
197
197
  licenses:
198
198
  - MIT
199
199
  metadata: {}
200
- post_install_message:
200
+ post_install_message:
201
201
  rdoc_options: []
202
202
  require_paths:
203
203
  - lib
@@ -212,9 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubyforge_project:
216
- rubygems_version: 2.6.12
217
- signing_key:
215
+ rubygems_version: 3.1.6
216
+ signing_key:
218
217
  specification_version: 4
219
218
  summary: generate fake data from json schema
220
219
  test_files: []