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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b1ca4895251e4df53783b1dd731713c771a412cedd720fedf09ba3c106242b9
4
- data.tar.gz: 369077526902a6c6f3c591dc63f0b7c9bc6358c87b27085bc8fe338abb9447ba
3
+ metadata.gz: e532a36b31f1e5ae42a1e424d77f8ef336c54d7519bfa7b3223f27d46c7b1a8d
4
+ data.tar.gz: dc4e70a6bac2858abc1a251cb2ffe8aff2272ec4926187dd69c19d4ad0be867f
5
5
  SHA512:
6
- metadata.gz: 56468fca4c3aad622617a0d53ff8ae662b55d28667ac44773decc81aa13fed3f1344998d48b1bdc5509b119483bdd6a7f9e4698ddfe36d704b0391bee1f9f40c
7
- data.tar.gz: 5fe807bf73718c1a381a7fc66e9950ffab63663fd0430c2a2b815da295ecefaabb65e9e7a5158cfdc5cb5787d60b7d48c9258c5b6de19c109271155edb0f8874
6
+ metadata.gz: a57970664a9b1e27d0bc8d1a78cea8b4311c0a56b6c3edc252f232728de767c11dea3af0b8419a00e2ce722659f053c2504f8a5432b9cdfe21ab35a77e6c63df
7
+ data.tar.gz: f36c7175d63d53f35c0b4de54ec07f0129179cc2f2187d7640c5811ae639084f01f1d5cd80ac08e40a713910f6a3d1c5f440a8be3978772565a444467519d66d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fakeit (0.5.0)
4
+ fakeit (0.5.1)
5
5
  faker (~> 2.2)
6
6
  openapi_parser (= 0.8.0)
7
7
  rack (~> 2.0)
@@ -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
- (format || 'int32')[/\d+/].to_i
65
+ return DEFAULT_BITS unless format =~ /int\d+/
66
+
67
+ format[/\d+/].to_i
64
68
  end
65
69
  end
66
70
  end
@@ -1,3 +1,3 @@
1
1
  module Fakeit
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.5.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fakeit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Feng