fakeit 0.5.2 → 0.5.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
2
  SHA256:
3
- metadata.gz: 30ea4d2aa93efde5e87605835f598e5f73de921fd00d2fd4f15b1784dbc44c87
4
- data.tar.gz: e10dc92c54c9463a7a75c9caf0391d1a563445d99ded2e0d02038cde2f7c9886
3
+ metadata.gz: 110dc63680d60c4b438f4d2162c7164a6306519e4852cd68dbb36de630210a20
4
+ data.tar.gz: 9ccc8d513d56cb66f6ed5438841052add1206cf2f5f0710cefa1956b2d2ffb72
5
5
  SHA512:
6
- metadata.gz: fdca80c0d4597949df629c3691bac048ed915bbe7fc69ea684c28d36bb21ecf6aa469910e107a9e8264fc93d11db6e23ded0d97a42b19e8bc613e63b2f0d0df2
7
- data.tar.gz: 12b14f11d000f28bc18534f3ceb20f6ccc2cb1fac8ced1e9b28e74c2a6886b302e0106f504229ac8becac342632c6df3fcbd133d8d77694a23d8aaec196c34f1
6
+ metadata.gz: 23e5abad04ebea0e94c2bb643f77ecd86b4daec69ca13df18713a4c2ca2e601c019110435041d510281a41edd753ac3baf013a8fe1fbd606480eb7eea232bba6
7
+ data.tar.gz: fb0fd7e1a33e71b434baa3a3c8a053a41cd8f29d3d93454b73d41fd9c8bf847974553964367b03039f7905444d061843bd0557feda246e7686a50c75c6fccb75
@@ -26,3 +26,9 @@ Style/HashTransformKeys:
26
26
 
27
27
  Style/HashTransformValues:
28
28
  Enabled: true
29
+
30
+ Lint/RaiseException:
31
+ Enabled: true
32
+
33
+ Lint/StructNewOverride:
34
+ Enabled: true
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fakeit (0.5.2)
5
- faker (~> 2.2)
4
+ fakeit (0.5.3)
5
+ faker (= 2.11.0)
6
6
  openapi_parser (= 0.8.0)
7
7
  rack (~> 2.0)
8
8
  rack-cors (~> 1.0)
9
9
  rainbow (~> 3.0)
10
- slop (~> 4.6)
10
+ slop (~> 4.8)
11
11
 
12
12
  GEM
13
13
  remote: https://rubygems.org/
@@ -17,14 +17,14 @@ GEM
17
17
  concurrent-ruby (1.1.6)
18
18
  diff-lcs (1.3)
19
19
  docile (1.3.2)
20
- faker (2.10.2)
20
+ faker (2.11.0)
21
21
  i18n (>= 1.6, < 2)
22
22
  i18n (1.8.2)
23
23
  concurrent-ruby (~> 1.0)
24
24
  jaro_winkler (1.5.4)
25
25
  openapi_parser (0.8.0)
26
26
  parallel (1.19.1)
27
- parser (2.7.0.2)
27
+ parser (2.7.0.5)
28
28
  ast (~> 2.4.0)
29
29
  rack (2.2.2)
30
30
  rack-cors (1.1.1)
@@ -40,28 +40,28 @@ GEM
40
40
  rspec-mocks (~> 3.9.0)
41
41
  rspec-core (3.9.1)
42
42
  rspec-support (~> 3.9.1)
43
- rspec-expectations (3.9.0)
43
+ rspec-expectations (3.9.1)
44
44
  diff-lcs (>= 1.2.0, < 2.0)
45
45
  rspec-support (~> 3.9.0)
46
46
  rspec-mocks (3.9.1)
47
47
  diff-lcs (>= 1.2.0, < 2.0)
48
48
  rspec-support (~> 3.9.0)
49
49
  rspec-support (3.9.2)
50
- rubocop (0.80.0)
50
+ rubocop (0.81.0)
51
51
  jaro_winkler (~> 1.5.1)
52
52
  parallel (~> 1.10)
53
53
  parser (>= 2.7.0.1)
54
54
  rainbow (>= 2.2.2, < 4.0)
55
55
  rexml
56
56
  ruby-progressbar (~> 1.7)
57
- unicode-display_width (>= 1.4.0, < 1.7)
57
+ unicode-display_width (>= 1.4.0, < 2.0)
58
58
  ruby-progressbar (1.10.1)
59
- simplecov (0.18.2)
59
+ simplecov (0.18.5)
60
60
  docile (~> 1.1)
61
61
  simplecov-html (~> 0.11)
62
- simplecov-html (0.12.0)
63
- slop (4.8.0)
64
- unicode-display_width (1.6.1)
62
+ simplecov-html (0.12.2)
63
+ slop (4.8.1)
64
+ unicode-display_width (1.7.0)
65
65
 
66
66
  PLATFORMS
67
67
  ruby
data/README.md CHANGED
@@ -61,7 +61,7 @@ Command line options:
61
61
  --use-example use example provided in spec if exists
62
62
  --static generate static response
63
63
  --static-types generate static value for specified types, e.g. --static-types integer,string
64
- --static-properties generate static value for specified properties, e.g. --static-types id,uuid
64
+ --static-properties generate static value for specified properties, e.g. --static-properties id,uuid
65
65
 
66
66
  other options:
67
67
  -v, --version
@@ -32,10 +32,10 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency 'rubocop', '~> 0.80'
33
33
  spec.add_development_dependency 'simplecov', '~> 0.18'
34
34
 
35
- spec.add_dependency 'faker', '~> 2.2'
35
+ spec.add_dependency 'faker', '2.11.0'
36
36
  spec.add_dependency 'openapi_parser', '0.8.0'
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'
40
- spec.add_dependency 'slop', '~> 4.6'
40
+ spec.add_dependency 'slop', '~> 4.8'
41
41
  end
@@ -1,3 +1,4 @@
1
+ # https://github.com/ota42y/openapi_parser/issues/41
1
2
  module OpenAPIParser
2
3
  module Findable
3
4
  def purge_object_cache
@@ -0,0 +1,14 @@
1
+ # https://github.com/ota42y/openapi_parser/issues/75
2
+ module OpenAPIParser
3
+ class PathItemFinder
4
+ private
5
+
6
+ def find_path_and_params(http_method, request_path)
7
+ return [request_path, {}] if matches_directly?(request_path, http_method)
8
+
9
+ matching = matching_paths_with_params(request_path, http_method)
10
+
11
+ matching.min_by { |match| match[1].size }
12
+ end
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module Fakeit
2
- VERSION = '0.5.2'.freeze
2
+ VERSION = '0.5.3'.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.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Feng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: faker
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '2.2'
117
+ version: 2.11.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: '2.2'
124
+ version: 2.11.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: openapi_parser
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '4.6'
187
+ version: '4.8'
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '4.6'
194
+ version: '4.8'
195
195
  description: Create mock server from Openapi specification
196
196
  email:
197
197
  - realfengjia@foxmail.com
@@ -217,6 +217,7 @@ files:
217
217
  - lib/fakeit/app/app.rb
218
218
  - lib/fakeit/app/options.rb
219
219
  - lib/fakeit/core_extensions/findable.rb
220
+ - lib/fakeit/core_extensions/path_item_finder.rb
220
221
  - lib/fakeit/core_extensions/schema.rb
221
222
  - lib/fakeit/logger.rb
222
223
  - lib/fakeit/middleware/recorder.rb