fakeit 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/Gemfile.lock +1 -1
- data/lib/fakeit/openapi/example/integer_example.rb +5 -1
- data/lib/fakeit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e532a36b31f1e5ae42a1e424d77f8ef336c54d7519bfa7b3223f27d46c7b1a8d
|
4
|
+
data.tar.gz: dc4e70a6bac2858abc1a251cb2ffe8aff2272ec4926187dd69c19d4ad0be867f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a57970664a9b1e27d0bc8d1a78cea8b4311c0a56b6c3edc252f232728de767c11dea3af0b8419a00e2ce722659f053c2504f8a5432b9cdfe21ab35a77e6c63df
|
7
|
+
data.tar.gz: f36c7175d63d53f35c0b4de54ec07f0129179cc2f2187d7640c5811ae639084f01f1d5cd80ac08e40a713910f6a3d1c5f440a8be3978772565a444467519d66d
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Fakeit
|
2
2
|
module Openapi
|
3
3
|
module Example
|
4
|
+
DEFAULT_BITS = 32
|
5
|
+
|
4
6
|
def integer_example(example_options)
|
5
7
|
if example_options[:use_static][type: 'integer', property: example_options[:property]]
|
6
8
|
static_integer_example
|
@@ -60,7 +62,9 @@ module Fakeit
|
|
60
62
|
end
|
61
63
|
|
62
64
|
def int_bits
|
63
|
-
|
65
|
+
return DEFAULT_BITS unless format =~ /int\d+/
|
66
|
+
|
67
|
+
format[/\d+/].to_i
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
data/lib/fakeit/version.rb
CHANGED