fakeit 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +36 -0
- data/Gemfile.lock +25 -22
- data/README.md +2 -4
- data/fakeit.gemspec +2 -2
- data/lib/fakeit/version.rb +1 -1
- metadata +6 -7
- data/lib/fakeit/core_extensions/findable.rb +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f19c0713bc918d394d2bb1c56251b09cf6dae231a0252c5bbb32c3b99fd284d
|
|
4
|
+
data.tar.gz: abcb565c1179594b5ea2b5c2f707c4c3597fbb74e2833edeb5335661866723a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 962926947343492b3b37a5e1739d8919cc76ffac8491e033e183f72a8ac2346eb62147aed3e870da9dfc8988422c9f0869255d7957253bb56fc0f35772e8065a
|
|
7
|
+
data.tar.gz: d471fae5943b4932e07413ee8f67ba484f188efddb0a5d4bf8198f0d791eea07e9744514e7b6ef0890be5dd4932a088bd4f9cc60111f9c72adfadfd96af5fb44
|
data/.rubocop.yml
CHANGED
|
@@ -32,3 +32,39 @@ Lint/RaiseException:
|
|
|
32
32
|
|
|
33
33
|
Lint/StructNewOverride:
|
|
34
34
|
Enabled: true
|
|
35
|
+
|
|
36
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
|
37
|
+
Enabled: true
|
|
38
|
+
|
|
39
|
+
Layout/SpaceAroundMethodCallOperator:
|
|
40
|
+
Enabled: true
|
|
41
|
+
|
|
42
|
+
Lint/DeprecatedOpenSSLConstant:
|
|
43
|
+
Enabled: true
|
|
44
|
+
|
|
45
|
+
Lint/MixedRegexpCaptureTypes:
|
|
46
|
+
Enabled: true
|
|
47
|
+
|
|
48
|
+
Style/AccessorGrouping:
|
|
49
|
+
Enabled: true
|
|
50
|
+
|
|
51
|
+
Style/BisectedAttrAccessor:
|
|
52
|
+
Enabled: true
|
|
53
|
+
|
|
54
|
+
Style/ExponentialNotation:
|
|
55
|
+
Enabled: true
|
|
56
|
+
|
|
57
|
+
Style/RedundantAssignment:
|
|
58
|
+
Enabled: true
|
|
59
|
+
|
|
60
|
+
Style/RedundantFetchBlock:
|
|
61
|
+
Enabled: true
|
|
62
|
+
|
|
63
|
+
Style/RedundantRegexpCharacterClass:
|
|
64
|
+
Enabled: true
|
|
65
|
+
|
|
66
|
+
Style/RedundantRegexpEscape:
|
|
67
|
+
Enabled: true
|
|
68
|
+
|
|
69
|
+
Style/SlicingWithRange:
|
|
70
|
+
Enabled: true
|
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
fakeit (0.6.
|
|
5
|
-
faker (= 2.
|
|
6
|
-
openapi_parser (= 0.
|
|
4
|
+
fakeit (0.6.2)
|
|
5
|
+
faker (= 2.13.0)
|
|
6
|
+
openapi_parser (= 0.11.2)
|
|
7
7
|
rack (~> 2.0)
|
|
8
8
|
rack-cors (~> 1.0)
|
|
9
9
|
rainbow (~> 3.0)
|
|
@@ -12,55 +12,58 @@ PATH
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: https://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
ast (2.4.
|
|
16
|
-
byebug (11.1.
|
|
15
|
+
ast (2.4.1)
|
|
16
|
+
byebug (11.1.3)
|
|
17
17
|
concurrent-ruby (1.1.6)
|
|
18
|
-
diff-lcs (1.
|
|
18
|
+
diff-lcs (1.4.4)
|
|
19
19
|
docile (1.3.2)
|
|
20
|
-
faker (2.
|
|
20
|
+
faker (2.13.0)
|
|
21
21
|
i18n (>= 1.6, < 2)
|
|
22
|
-
i18n (1.8.
|
|
22
|
+
i18n (1.8.3)
|
|
23
23
|
concurrent-ruby (~> 1.0)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
rack (2.2.2)
|
|
24
|
+
openapi_parser (0.11.2)
|
|
25
|
+
parallel (1.19.2)
|
|
26
|
+
parser (2.7.1.4)
|
|
27
|
+
ast (~> 2.4.1)
|
|
28
|
+
rack (2.2.3)
|
|
30
29
|
rack-cors (1.1.1)
|
|
31
30
|
rack (>= 2.0.0)
|
|
32
31
|
rack-test (1.1.0)
|
|
33
32
|
rack (>= 1.0, < 3)
|
|
34
33
|
rainbow (3.0.0)
|
|
35
34
|
rake (12.3.3)
|
|
35
|
+
regexp_parser (1.7.1)
|
|
36
36
|
rexml (3.2.4)
|
|
37
37
|
rspec (3.9.0)
|
|
38
38
|
rspec-core (~> 3.9.0)
|
|
39
39
|
rspec-expectations (~> 3.9.0)
|
|
40
40
|
rspec-mocks (~> 3.9.0)
|
|
41
|
-
rspec-core (3.9.
|
|
42
|
-
rspec-support (~> 3.9.
|
|
43
|
-
rspec-expectations (3.9.
|
|
41
|
+
rspec-core (3.9.2)
|
|
42
|
+
rspec-support (~> 3.9.3)
|
|
43
|
+
rspec-expectations (3.9.2)
|
|
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
|
-
rspec-support (3.9.
|
|
50
|
-
rubocop (0.
|
|
51
|
-
jaro_winkler (~> 1.5.1)
|
|
49
|
+
rspec-support (3.9.3)
|
|
50
|
+
rubocop (0.87.1)
|
|
52
51
|
parallel (~> 1.10)
|
|
53
|
-
parser (>= 2.7.
|
|
52
|
+
parser (>= 2.7.1.1)
|
|
54
53
|
rainbow (>= 2.2.2, < 4.0)
|
|
54
|
+
regexp_parser (>= 1.7)
|
|
55
55
|
rexml
|
|
56
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
|
56
57
|
ruby-progressbar (~> 1.7)
|
|
57
58
|
unicode-display_width (>= 1.4.0, < 2.0)
|
|
59
|
+
rubocop-ast (0.1.0)
|
|
60
|
+
parser (>= 2.7.0.1)
|
|
58
61
|
ruby-progressbar (1.10.1)
|
|
59
62
|
simplecov (0.18.5)
|
|
60
63
|
docile (~> 1.1)
|
|
61
64
|
simplecov-html (~> 0.11)
|
|
62
65
|
simplecov-html (0.12.2)
|
|
63
|
-
slop (4.8.
|
|
66
|
+
slop (4.8.2)
|
|
64
67
|
unicode-display_width (1.7.0)
|
|
65
68
|
|
|
66
69
|
PLATFORMS
|
data/README.md
CHANGED
|
@@ -30,14 +30,12 @@ After tried several existing options, we cannot find a best solution to meet all
|
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
|
-
* Randomly or statically generated response
|
|
34
|
-
* Request validation
|
|
33
|
+
* Randomly or statically generated response (`application/.*json`)
|
|
34
|
+
* Request validation (`application/.*json`, `multipart/form-data`)
|
|
35
35
|
* Load specification from local or remote
|
|
36
36
|
* Support hot reload local specification
|
|
37
37
|
* Support specification in yaml or json format
|
|
38
38
|
|
|
39
|
-
**Note:** Only support json content type as of now
|
|
40
|
-
|
|
41
39
|
## Installation
|
|
42
40
|
|
|
43
41
|
Install it with:
|
data/fakeit.gemspec
CHANGED
|
@@ -32,8 +32,8 @@ 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.
|
|
36
|
-
spec.add_dependency 'openapi_parser', '0.
|
|
35
|
+
spec.add_dependency 'faker', '2.13.0'
|
|
36
|
+
spec.add_dependency 'openapi_parser', '0.11.2'
|
|
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'
|
data/lib/fakeit/version.rb
CHANGED
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.6.
|
|
4
|
+
version: 0.6.2
|
|
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-
|
|
11
|
+
date: 2020-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -114,28 +114,28 @@ dependencies:
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - '='
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 2.
|
|
117
|
+
version: 2.13.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.
|
|
124
|
+
version: 2.13.0
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: openapi_parser
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - '='
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 0.
|
|
131
|
+
version: 0.11.2
|
|
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.
|
|
138
|
+
version: 0.11.2
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
140
|
name: rack
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -217,7 +217,6 @@ files:
|
|
|
217
217
|
- lib/fakeit/app/app.rb
|
|
218
218
|
- lib/fakeit/app/body_parser.rb
|
|
219
219
|
- lib/fakeit/app/options.rb
|
|
220
|
-
- lib/fakeit/core_extensions/findable.rb
|
|
221
220
|
- lib/fakeit/core_extensions/path_item_finder.rb
|
|
222
221
|
- lib/fakeit/core_extensions/schema.rb
|
|
223
222
|
- lib/fakeit/logger.rb
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# https://github.com/ota42y/openapi_parser/issues/41
|
|
2
|
-
module OpenAPIParser
|
|
3
|
-
module Findable
|
|
4
|
-
def purge_object_cache
|
|
5
|
-
return if @purged
|
|
6
|
-
|
|
7
|
-
@find_object_cache = {}
|
|
8
|
-
@purged = true
|
|
9
|
-
|
|
10
|
-
_openapi_all_child_objects.values.each(&:purge_object_cache)
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|