fakeit 0.4.0 → 0.4.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: 85a4951080b18afc8b31d90df48908395db45187040d55234f2e8d012d7e604b
4
- data.tar.gz: '038962f3d25cf199b87c45f3e2556fea349ae30939da4a8ea5a67a6fc32c7c47'
3
+ metadata.gz: 6731f389644255b0fed1ba064f3ad16037de5936d305d0a7aafb711a5bf33bda
4
+ data.tar.gz: 78070a872e99bce2b9cbe8e09d8ba179cc3bdd0c924e040293fdfa08dd944f2a
5
5
  SHA512:
6
- metadata.gz: 803b450a3aaff3aae4a2a93e99e205076476585ba344febf551a6fadb743f6d44e3c9955179e296530fd0fb37ead6b3f60ebefb825cd5dd0771cb2811e067a68
7
- data.tar.gz: efc7ba4148e2f557e882c449266f8559eb2208fcd0801157aea4130ec95b42378826d6b932742a1879d1f666be0613e1a699e423e425a4a3afe7cbc5477c2a01
6
+ metadata.gz: 4f2aa78fc96a37508d92728b3afcc00c465da0178566e6ac03eebaa248f077fff6607bfb5c18d771488acfaad1a74f7481de31b66112ba3dac7d68b3797d909b
7
+ data.tar.gz: 1bc853eeddeaa9b5c045091f1ea490d9f4b5b3f479d1fb13f4b36ca7b287b05c8f54e58fbaf757934494fb1b8ffe076fb47e784ea5f4143c75bae5a843529d90
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fakeit (0.4.0)
4
+ fakeit (0.4.1)
5
5
  faker (~> 2.2)
6
- openapi_parser (= 0.3.1)
6
+ openapi_parser (= 0.6.1)
7
7
  rack (~> 2.0)
8
8
  rack-cors (~> 1.0)
9
9
  rainbow (~> 3.0)
@@ -17,18 +17,19 @@ GEM
17
17
  concurrent-ruby (1.1.5)
18
18
  diff-lcs (1.3)
19
19
  docile (1.3.2)
20
- faker (2.5.0)
21
- i18n (~> 1.6.0)
22
- i18n (1.6.0)
20
+ faker (2.7.0)
21
+ i18n (>= 1.6, < 1.8)
22
+ i18n (1.7.0)
23
23
  concurrent-ruby (~> 1.0)
24
- jaro_winkler (1.5.3)
24
+ jaro_winkler (1.5.4)
25
25
  json (2.2.0)
26
- openapi_parser (0.3.1)
27
- parallel (1.18.0)
26
+ openapi_parser (0.6.1)
27
+ parallel (1.19.0)
28
28
  parser (2.6.5.0)
29
29
  ast (~> 2.4.0)
30
30
  rack (2.0.7)
31
- rack-cors (1.0.3)
31
+ rack-cors (1.1.0)
32
+ rack (>= 2.0.0)
32
33
  rack-test (1.1.0)
33
34
  rack (>= 1.0, < 3)
34
35
  rainbow (3.0.0)
@@ -46,7 +47,7 @@ GEM
46
47
  diff-lcs (>= 1.2.0, < 2.0)
47
48
  rspec-support (~> 3.9.0)
48
49
  rspec-support (3.9.0)
49
- rubocop (0.75.0)
50
+ rubocop (0.76.0)
50
51
  jaro_winkler (~> 1.5.1)
51
52
  parallel (~> 1.10)
52
53
  parser (>= 2.6)
data/fakeit.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'simplecov', '~> 0.16'
34
34
 
35
35
  spec.add_dependency 'faker', '~> 2.2'
36
- spec.add_dependency 'openapi_parser', '0.3.1'
36
+ spec.add_dependency 'openapi_parser', '0.6.1'
37
37
  spec.add_dependency 'rack', '~> 2.0'
38
38
  spec.add_dependency 'rack-cors', '~> 1.0'
39
39
  spec.add_dependency 'rainbow', '~> 3.0'
@@ -4,21 +4,16 @@ module Fakeit
4
4
  def array_example(options)
5
5
  example_options = add_depth(options)
6
6
  if example_options[:use_static][type: 'array', property: example_options[:property]]
7
- static_array_example(example_options)
7
+ generate_array_example(example_options, -> { min_array })
8
8
  else
9
- random_array_example(example_options)
9
+ generate_array_example(example_options, -> { random_array_size(example_options) })
10
10
  end
11
11
  end
12
12
 
13
13
  private
14
14
 
15
- def static_array_example(example_options)
16
- size = retries = min_array
17
- [].tap { |result| generate_items(size, retries, example_options, result) }
18
- end
19
-
20
- def random_array_example(example_options)
21
- size = retries = random_array_size(example_options)
15
+ def generate_array_example(example_options, get_size)
16
+ size = retries = get_size[]
22
17
  [].tap { |result| generate_items(size, retries, example_options, result) }
23
18
  end
24
19
 
@@ -1,3 +1,3 @@
1
1
  module Fakeit
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fakeit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Feng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-09 00:00:00.000000000 Z
11
+ date: 2019-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 0.3.1
131
+ version: 0.6.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 0.3.1
138
+ version: 0.6.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rack
141
141
  requirement: !ruby/object:Gem::Requirement