json_schema-faker 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/json_schema/faker/util.rb +8 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfafb79a64676037970d45ea495b3c5dd601ba44
|
4
|
+
data.tar.gz: c5e69abcb15a816b5e90ee5cd9c08752082ab8f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96ef98bb3d841808674fdbe71d4e7781604f3aba3e731696ef7eebb181a0051091fd98bec9dbe9f273229508b3a0b893e90a87d3a0f13d3a673f30a11b8d6c64
|
7
|
+
data.tar.gz: fa77f0ea527055174ad18b868029f597f07652e41daed123710c25f6c7f8985209f00111abdd85e40f5bde46a8c80e0bb20a0d1f94bd8781b0fac337d12f9564
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
@@ -67,13 +67,15 @@ class JsonSchema::Faker
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
# pattern
|
70
|
-
if
|
71
|
-
|
72
|
-
|
70
|
+
if b.pattern
|
71
|
+
if a.pattern
|
72
|
+
# TODO: pexeger does not support generated one
|
73
|
+
::JsonSchema::Faker::Configuration.logger.warn "not support merging pattern" if ::JsonSchema::Faker::Configuration.logger
|
74
|
+
# a.pattern = RegExp.new("/^(?=.*#{a.pattern.inspect.gsub("/\\/", "").gsub("\\//", "")})(?=.*#{b.pattern.inspect.gsub("/\\/", "").gsub("\\//", "")})/")
|
75
|
+
else
|
76
|
+
a.pattern = b.pattern
|
77
|
+
end
|
73
78
|
end
|
74
|
-
#if b.pattern
|
75
|
-
# a.pattern = (a.pattern ? "/^(?=.*#{a.pattern.inspect.gsub("/\\/", "").gsub("\\//", "")})(?=.*#{b.pattern.inspect.gsub("/\\/", "").gsub("\\//", "")})/" : b.pattern)
|
76
|
-
#end
|
77
79
|
|
78
80
|
# for array
|
79
81
|
# items and aditionalItems
|