restful_resource 2.9.1 → 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.rubocop_todo.yml +119 -70
- data/CHANGELOG.md +20 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +74 -64
- data/lib/restful_resource.rb +2 -1
- data/lib/restful_resource/base.rb +19 -23
- data/lib/restful_resource/http_client.rb +5 -0
- data/lib/restful_resource/open_object.rb +1 -1
- data/lib/restful_resource/redirections.rb +6 -4
- data/lib/restful_resource/strict_open_struct.rb +5 -0
- data/lib/restful_resource/version.rb +1 -1
- data/restful_resource.gemspec +10 -9
- data/spec/restful_resource/associations_spec.rb +0 -2
- data/spec/restful_resource/base_spec.rb +14 -14
- data/spec/restful_resource/http_client_configuration_spec.rb +8 -8
- data/spec/restful_resource/http_client_spec.rb +5 -5
- data/spec/restful_resource/rails_validations_spec.rb +8 -8
- data/spec/spec_helper.rb +1 -0
- metadata +51 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07d4d828bec908de39e82dafb3758b8d5aba824156cfab777e6f7cc1023ad780
|
4
|
+
data.tar.gz: 0bc035ca2730ac59ea88cdc4ed09ace71694de18da2049651472f860a1d07cb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc2785c662982c44946272a01c012d908f65e6dbb4226ce33c69ed907472af8b6866f12052e6ef4dc44f4d94868e44ce48a2de62d84bd30acfa40e8a314c20d5
|
7
|
+
data.tar.gz: '06982f1adf0b187610157a049b35ca24516cccddad936aa2d52a04415a1e8f5d10bd6b7e95d0a510a9fb680a38ed26a0550aed5ea67ba71b06b2482d0fb2bd1f'
|
data/.circleci/config.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,130 +1,132 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-11-12 16:45:32 UTC using RuboCop version 1.3.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'restful_resource.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 2
|
17
|
+
# Cop supports --auto-correct.
|
18
|
+
# Configuration parameters: Width, IgnoredPatterns.
|
19
|
+
Layout/IndentationWidth:
|
20
|
+
Exclude:
|
21
|
+
- 'lib/restful_resource/associations.rb'
|
22
|
+
|
9
23
|
# Offense count: 2
|
10
24
|
# Cop supports --auto-correct.
|
11
25
|
Layout/RescueEnsureAlignment:
|
12
26
|
Exclude:
|
13
27
|
- 'lib/restful_resource/associations.rb'
|
14
28
|
|
15
|
-
# Offense count:
|
16
|
-
|
29
|
+
# Offense count: 2
|
30
|
+
# Cop supports --auto-correct.
|
31
|
+
# Configuration parameters: EnforcedStyleForEmptyBraces.
|
32
|
+
# SupportedStyles: space, no_space, compact
|
33
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
34
|
+
Layout/SpaceInsideHashLiteralBraces:
|
35
|
+
EnforcedStyle: space
|
36
|
+
|
37
|
+
# Offense count: 6
|
38
|
+
# Configuration parameters: AllowedMethods.
|
39
|
+
Lint/ConstantDefinitionInBlock:
|
17
40
|
Exclude:
|
18
|
-
- '
|
41
|
+
- 'spec/restful_resource/base_authorization_spec.rb'
|
42
|
+
- 'spec/restful_resource/http_client_configuration_spec.rb'
|
19
43
|
|
20
44
|
# Offense count: 1
|
45
|
+
Lint/DuplicateBranch:
|
46
|
+
Exclude:
|
47
|
+
- 'lib/restful_resource/http_client.rb'
|
48
|
+
|
49
|
+
# Offense count: 1
|
50
|
+
# Cop supports --auto-correct.
|
21
51
|
Lint/Loop:
|
22
52
|
Exclude:
|
23
53
|
- 'lib/restful_resource/base.rb'
|
24
54
|
|
25
55
|
# Offense count: 2
|
26
|
-
Lint/
|
56
|
+
Lint/MissingSuper:
|
27
57
|
Exclude:
|
28
|
-
- '
|
58
|
+
- 'lib/restful_resource/http_client.rb'
|
59
|
+
- 'lib/restful_resource/parameter_missing_error.rb'
|
29
60
|
|
30
61
|
# Offense count: 2
|
31
62
|
# Cop supports --auto-correct.
|
32
|
-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
63
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
|
33
64
|
Lint/UnusedMethodArgument:
|
34
65
|
Exclude:
|
35
66
|
- 'lib/restful_resource/redirections.rb'
|
36
67
|
|
37
|
-
# Offense count:
|
38
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
39
|
-
Lint/UselessAccessModifier:
|
40
|
-
Exclude:
|
41
|
-
- 'lib/restful_resource/base.rb'
|
42
|
-
- 'lib/restful_resource/redirections.rb'
|
43
|
-
|
44
|
-
# Offense count: 5
|
68
|
+
# Offense count: 4
|
45
69
|
Lint/UselessAssignment:
|
46
70
|
Exclude:
|
47
|
-
- 'lib/restful_resource/rails_validations.rb'
|
48
71
|
- 'lib/restful_resource/redirections.rb'
|
49
72
|
- 'spec/restful_resource/base_spec.rb'
|
73
|
+
- 'spec/restful_resource/http_client_spec.rb'
|
50
74
|
- 'spec/restful_resource/redirections_spec.rb'
|
51
75
|
|
52
76
|
# Offense count: 8
|
77
|
+
# Configuration parameters: IgnoredMethods.
|
53
78
|
Metrics/AbcSize:
|
54
|
-
Max:
|
55
|
-
|
56
|
-
# Offense count: 1
|
57
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
58
|
-
# ExcludedMethods: refine
|
59
|
-
Metrics/BlockLength:
|
60
|
-
Max: 27
|
79
|
+
Max: 102
|
61
80
|
|
62
81
|
# Offense count: 2
|
63
|
-
# Configuration parameters: CountComments.
|
82
|
+
# Configuration parameters: CountComments, CountAsOne.
|
64
83
|
Metrics/ClassLength:
|
65
|
-
Max:
|
84
|
+
Max: 195
|
66
85
|
|
67
|
-
# Offense count:
|
86
|
+
# Offense count: 5
|
87
|
+
# Configuration parameters: IgnoredMethods.
|
68
88
|
Metrics/CyclomaticComplexity:
|
69
89
|
Max: 13
|
70
90
|
|
71
|
-
# Offense count: 42
|
72
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
73
|
-
# URISchemes: http, https
|
74
|
-
Metrics/LineLength:
|
75
|
-
Max: 201
|
76
|
-
|
77
91
|
# Offense count: 10
|
78
|
-
# Configuration parameters: CountComments.
|
92
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
79
93
|
Metrics/MethodLength:
|
80
94
|
Max: 56
|
81
95
|
|
82
|
-
# Offense count:
|
96
|
+
# Offense count: 9
|
83
97
|
# Configuration parameters: CountKeywordArgs.
|
84
98
|
Metrics/ParameterLists:
|
85
|
-
Max:
|
99
|
+
Max: 11
|
86
100
|
|
87
|
-
# Offense count:
|
101
|
+
# Offense count: 2
|
102
|
+
# Configuration parameters: IgnoredMethods.
|
88
103
|
Metrics/PerceivedComplexity:
|
89
|
-
Max:
|
104
|
+
Max: 11
|
90
105
|
|
91
106
|
# Offense count: 2
|
92
|
-
# Configuration parameters: NamePrefix,
|
107
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
93
108
|
# NamePrefix: is_, has_, have_
|
94
|
-
#
|
95
|
-
#
|
109
|
+
# ForbiddenPrefixes: is_, has_, have_
|
110
|
+
# AllowedMethods: is_a?
|
96
111
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
97
112
|
Naming/PredicateName:
|
98
113
|
Exclude:
|
99
114
|
- 'spec/**/*'
|
100
115
|
- 'lib/restful_resource/associations.rb'
|
101
116
|
|
102
|
-
# Offense count: 14
|
103
|
-
# Configuration parameters: Prefixes.
|
104
|
-
# Prefixes: when, with, without
|
105
|
-
RSpec/ContextWording:
|
106
|
-
Exclude:
|
107
|
-
- 'spec/restful_resource/http_client_configuration_spec.rb'
|
108
|
-
- 'spec/restful_resource/rails_validations_spec.rb'
|
109
|
-
- 'spec/restful_resource/request_spec.rb'
|
110
|
-
|
111
117
|
# Offense count: 1
|
112
118
|
RSpec/DescribeMethod:
|
113
119
|
Exclude:
|
114
120
|
- 'spec/restful_resource/base_authorization_spec.rb'
|
115
121
|
|
116
|
-
# Offense count:
|
122
|
+
# Offense count: 2
|
117
123
|
# Configuration parameters: Max.
|
118
124
|
RSpec/ExampleLength:
|
119
125
|
Exclude:
|
120
126
|
- 'spec/restful_resource/base_spec.rb'
|
121
|
-
- 'spec/restful_resource/http_client_configuration_spec.rb'
|
122
|
-
- 'spec/restful_resource/http_client_spec.rb'
|
123
127
|
- 'spec/restful_resource/open_object_spec.rb'
|
124
|
-
- 'spec/restful_resource/rails_validations_spec.rb'
|
125
|
-
- 'spec/restful_resource/redirections_spec.rb'
|
126
128
|
|
127
|
-
# Offense count:
|
129
|
+
# Offense count: 71
|
128
130
|
# Configuration parameters: AssignmentOnly.
|
129
131
|
RSpec/InstanceVariable:
|
130
132
|
Exclude:
|
@@ -134,7 +136,13 @@ RSpec/InstanceVariable:
|
|
134
136
|
- 'spec/restful_resource/rails_validations_spec.rb'
|
135
137
|
- 'spec/restful_resource/redirections_spec.rb'
|
136
138
|
|
137
|
-
# Offense count:
|
139
|
+
# Offense count: 6
|
140
|
+
RSpec/LeakyConstantDeclaration:
|
141
|
+
Exclude:
|
142
|
+
- 'spec/restful_resource/base_authorization_spec.rb'
|
143
|
+
- 'spec/restful_resource/http_client_configuration_spec.rb'
|
144
|
+
|
145
|
+
# Offense count: 17
|
138
146
|
# Configuration parameters: EnforcedStyle.
|
139
147
|
# SupportedStyles: have_received, receive
|
140
148
|
RSpec/MessageSpies:
|
@@ -143,27 +151,38 @@ RSpec/MessageSpies:
|
|
143
151
|
- 'spec/restful_resource/redirections_spec.rb'
|
144
152
|
- 'spec/spec_helper.rb'
|
145
153
|
|
146
|
-
# Offense count:
|
147
|
-
# Configuration parameters: AggregateFailuresByDefault.
|
154
|
+
# Offense count: 24
|
148
155
|
RSpec/MultipleExpectations:
|
149
156
|
Max: 7
|
150
157
|
|
151
|
-
# Offense count:
|
158
|
+
# Offense count: 1
|
159
|
+
# Configuration parameters: AllowSubject.
|
160
|
+
RSpec/MultipleMemoizedHelpers:
|
161
|
+
Max: 10
|
162
|
+
|
163
|
+
# Offense count: 13
|
164
|
+
# Configuration parameters: IgnoreSharedExamples.
|
152
165
|
RSpec/NamedSubject:
|
153
166
|
Exclude:
|
167
|
+
- 'spec/restful_resource/rails_validations_spec.rb'
|
154
168
|
- 'spec/restful_resource/redirections_spec.rb'
|
155
169
|
|
156
|
-
# Offense count:
|
170
|
+
# Offense count: 12
|
157
171
|
RSpec/NestedGroups:
|
158
172
|
Max: 5
|
159
173
|
|
160
|
-
# Offense count:
|
174
|
+
# Offense count: 4
|
161
175
|
RSpec/RepeatedDescription:
|
162
176
|
Exclude:
|
163
177
|
- 'spec/restful_resource/base_spec.rb'
|
164
178
|
|
165
|
-
# Offense count:
|
166
|
-
|
179
|
+
# Offense count: 10
|
180
|
+
RSpec/StubbedMock:
|
181
|
+
Exclude:
|
182
|
+
- 'spec/spec_helper.rb'
|
183
|
+
|
184
|
+
# Offense count: 4
|
185
|
+
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
167
186
|
RSpec/VerifiedDoubles:
|
168
187
|
Exclude:
|
169
188
|
- 'spec/restful_resource/base_spec.rb'
|
@@ -176,28 +195,58 @@ Style/AsciiComments:
|
|
176
195
|
Exclude:
|
177
196
|
- 'lib/restful_resource/instrumentation.rb'
|
178
197
|
|
198
|
+
# Offense count: 3
|
199
|
+
# Cop supports --auto-correct.
|
200
|
+
# Configuration parameters: Keywords.
|
201
|
+
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
|
202
|
+
Style/CommentAnnotation:
|
203
|
+
Exclude:
|
204
|
+
- 'spec/restful_resource/http_client_spec.rb'
|
205
|
+
|
179
206
|
# Offense count: 1
|
180
|
-
|
207
|
+
# Cop supports --auto-correct.
|
208
|
+
# Configuration parameters: EnforcedStyle.
|
209
|
+
# SupportedStyles: braces, no_braces
|
210
|
+
Style/HashAsLastArrayItem:
|
181
211
|
Exclude:
|
182
|
-
- 'lib/restful_resource/
|
212
|
+
- 'lib/restful_resource/base.rb'
|
183
213
|
|
184
214
|
# Offense count: 1
|
185
215
|
Style/MissingRespondToMissing:
|
186
216
|
Exclude:
|
187
217
|
- 'lib/restful_resource/open_object.rb'
|
188
218
|
|
219
|
+
# Offense count: 2
|
220
|
+
# Configuration parameters: AllowedMethods.
|
221
|
+
# AllowedMethods: respond_to_missing?
|
222
|
+
Style/OptionalBooleanParameter:
|
223
|
+
Exclude:
|
224
|
+
- 'lib/restful_resource/open_object.rb'
|
225
|
+
|
189
226
|
# Offense count: 1
|
190
227
|
# Cop supports --auto-correct.
|
191
|
-
|
192
|
-
|
193
|
-
|
228
|
+
Style/RedundantFileExtensionInRequire:
|
229
|
+
Exclude:
|
230
|
+
- 'lib/restful_resource.rb'
|
231
|
+
|
232
|
+
# Offense count: 2
|
233
|
+
# Cop supports --auto-correct.
|
234
|
+
Style/StringConcatenation:
|
194
235
|
Exclude:
|
236
|
+
- 'lib/restful_resource/authorization.rb'
|
195
237
|
- 'lib/restful_resource/base.rb'
|
196
238
|
|
197
239
|
# Offense count: 1
|
198
240
|
# Cop supports --auto-correct.
|
199
|
-
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods,
|
200
|
-
#
|
241
|
+
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
|
242
|
+
# AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
|
201
243
|
Style/TrivialAccessors:
|
202
244
|
Exclude:
|
203
245
|
- 'lib/restful_resource/base.rb'
|
246
|
+
|
247
|
+
# Offense count: 29
|
248
|
+
# Cop supports --auto-correct.
|
249
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
250
|
+
# URISchemes: http, https
|
251
|
+
Layout/LineLength:
|
252
|
+
Max: 201
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
2.10.0
|
4
|
+
---
|
5
|
+
|
6
|
+
- Support Faraday v1 (#85)
|
7
|
+
|
8
|
+
2.9.0
|
9
|
+
---
|
10
|
+
|
11
|
+
- Add support for DELETE in RestfulResource::RailsValidations (#73)
|
12
|
+
|
13
|
+
2.8.1
|
14
|
+
---
|
15
|
+
|
16
|
+
- Looser Faraday requirement >= 0.15, < 1.1
|
17
|
+
|
18
|
+
2.8.0
|
19
|
+
---
|
20
|
+
|
21
|
+
- Make params hash in methods consistent, and always optional (#61)
|
22
|
+
|
3
23
|
2.7.0
|
4
24
|
---
|
5
25
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,100 +1,110 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
restful_resource (2.
|
5
|
-
activesupport
|
6
|
-
faraday (
|
7
|
-
faraday-cdn-metrics
|
4
|
+
restful_resource (2.12.0)
|
5
|
+
activesupport (~> 6.0)
|
6
|
+
faraday (~> 1.0)
|
7
|
+
faraday-cdn-metrics (~> 0.2)
|
8
8
|
faraday-encoding
|
9
|
-
faraday-http-cache
|
10
|
-
faraday_middleware
|
9
|
+
faraday-http-cache (~> 2.2)
|
10
|
+
faraday_middleware (~> 1.0)
|
11
11
|
link_header
|
12
|
-
rack
|
13
|
-
typhoeus
|
12
|
+
rack (~> 2.2)
|
13
|
+
typhoeus (~> 1.4)
|
14
14
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activesupport (6.
|
18
|
+
activesupport (6.1.3.1)
|
19
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
|
-
i18n (>=
|
21
|
-
minitest (
|
22
|
-
tzinfo (~>
|
23
|
-
zeitwerk (~> 2.
|
24
|
-
ast (2.4.
|
25
|
-
carwow_rubocop (3.
|
26
|
-
rubocop (>= 0.
|
20
|
+
i18n (>= 1.6, < 2)
|
21
|
+
minitest (>= 5.1)
|
22
|
+
tzinfo (~> 2.0)
|
23
|
+
zeitwerk (~> 2.3)
|
24
|
+
ast (2.4.1)
|
25
|
+
carwow_rubocop (3.4.1)
|
26
|
+
rubocop (>= 0.93)
|
27
27
|
rubocop-performance
|
28
28
|
rubocop-rspec
|
29
|
-
coderay (1.1.
|
30
|
-
concurrent-ruby (1.1.
|
31
|
-
diff-lcs (1.
|
29
|
+
coderay (1.1.3)
|
30
|
+
concurrent-ruby (1.1.8)
|
31
|
+
diff-lcs (1.4.4)
|
32
32
|
ethon (0.12.0)
|
33
33
|
ffi (>= 1.3.0)
|
34
|
-
faraday (
|
34
|
+
faraday (1.3.0)
|
35
|
+
faraday-net_http (~> 1.0)
|
35
36
|
multipart-post (>= 1.2, < 3)
|
36
|
-
|
37
|
-
|
37
|
+
ruby2_keywords
|
38
|
+
faraday-cdn-metrics (0.2.0)
|
39
|
+
faraday (~> 1)
|
38
40
|
faraday-encoding (0.0.5)
|
39
41
|
faraday
|
40
|
-
faraday-http-cache (2.
|
41
|
-
faraday (
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
faraday-http-cache (2.2.0)
|
43
|
+
faraday (>= 0.8)
|
44
|
+
faraday-net_http (1.0.1)
|
45
|
+
faraday_middleware (1.0.0)
|
46
|
+
faraday (~> 1.0)
|
47
|
+
ffi (1.15.0)
|
48
|
+
i18n (1.8.9)
|
46
49
|
concurrent-ruby (~> 1.0)
|
47
|
-
jaro_winkler (1.5.4)
|
48
50
|
link_header (0.0.8)
|
49
|
-
method_source (0.
|
50
|
-
minitest (5.14.
|
51
|
+
method_source (1.0.0)
|
52
|
+
minitest (5.14.4)
|
51
53
|
multipart-post (2.1.1)
|
52
|
-
parallel (1.
|
53
|
-
parser (2.7.0
|
54
|
-
ast (~> 2.4.
|
55
|
-
pry (0.
|
56
|
-
coderay (~> 1.1
|
57
|
-
method_source (~>
|
58
|
-
rack (2.
|
54
|
+
parallel (1.20.0)
|
55
|
+
parser (2.7.2.0)
|
56
|
+
ast (~> 2.4.1)
|
57
|
+
pry (0.14.0)
|
58
|
+
coderay (~> 1.1)
|
59
|
+
method_source (~> 1.0)
|
60
|
+
rack (2.2.3)
|
59
61
|
rainbow (3.0.0)
|
60
|
-
rake (13.0.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
rspec-
|
65
|
-
|
66
|
-
rspec-
|
67
|
-
rspec-
|
62
|
+
rake (13.0.3)
|
63
|
+
regexp_parser (1.8.2)
|
64
|
+
rexml (3.2.4)
|
65
|
+
rspec (3.10.0)
|
66
|
+
rspec-core (~> 3.10.0)
|
67
|
+
rspec-expectations (~> 3.10.0)
|
68
|
+
rspec-mocks (~> 3.10.0)
|
69
|
+
rspec-core (3.10.0)
|
70
|
+
rspec-support (~> 3.10.0)
|
71
|
+
rspec-expectations (3.10.0)
|
68
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
-
rspec-support (~> 3.
|
73
|
+
rspec-support (~> 3.10.0)
|
70
74
|
rspec-its (1.3.0)
|
71
75
|
rspec-core (>= 3.0.0)
|
72
76
|
rspec-expectations (>= 3.0.0)
|
73
|
-
rspec-mocks (3.
|
77
|
+
rspec-mocks (3.10.0)
|
74
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-support (3.
|
79
|
+
rspec-support (~> 3.10.0)
|
80
|
+
rspec-support (3.10.0)
|
77
81
|
rspec_junit_formatter (0.4.1)
|
78
82
|
rspec-core (>= 2, < 4, != 2.12.0)
|
79
|
-
rubocop (
|
80
|
-
jaro_winkler (~> 1.5.1)
|
83
|
+
rubocop (1.3.0)
|
81
84
|
parallel (~> 1.10)
|
82
|
-
parser (>= 2.7.
|
85
|
+
parser (>= 2.7.1.5)
|
83
86
|
rainbow (>= 2.2.2, < 4.0)
|
87
|
+
regexp_parser (>= 1.8)
|
88
|
+
rexml
|
89
|
+
rubocop-ast (>= 1.1.1)
|
84
90
|
ruby-progressbar (~> 1.7)
|
85
|
-
unicode-display_width (>= 1.4.0, <
|
86
|
-
rubocop-
|
87
|
-
|
88
|
-
rubocop-
|
89
|
-
rubocop (>= 0.
|
91
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
92
|
+
rubocop-ast (1.1.1)
|
93
|
+
parser (>= 2.7.1.5)
|
94
|
+
rubocop-performance (1.8.1)
|
95
|
+
rubocop (>= 0.87.0)
|
96
|
+
rubocop-ast (>= 0.4.0)
|
97
|
+
rubocop-rspec (2.0.0)
|
98
|
+
rubocop (~> 1.0)
|
99
|
+
rubocop-ast (>= 1.1.0)
|
90
100
|
ruby-progressbar (1.10.1)
|
91
|
-
|
92
|
-
typhoeus (1.
|
101
|
+
ruby2_keywords (0.0.4)
|
102
|
+
typhoeus (1.4.0)
|
93
103
|
ethon (>= 0.9.0)
|
94
|
-
tzinfo (
|
95
|
-
|
96
|
-
unicode-display_width (1.
|
97
|
-
zeitwerk (2.
|
104
|
+
tzinfo (2.0.4)
|
105
|
+
concurrent-ruby (~> 1.0)
|
106
|
+
unicode-display_width (1.7.0)
|
107
|
+
zeitwerk (2.4.2)
|
98
108
|
|
99
109
|
PLATFORMS
|
100
110
|
ruby
|
data/lib/restful_resource.rb
CHANGED
@@ -8,12 +8,13 @@ require 'faraday_cdn_metrics'
|
|
8
8
|
require 'faraday/encoding'
|
9
9
|
require 'active_support'
|
10
10
|
require 'active_support/all'
|
11
|
-
require 'resolv-replace
|
11
|
+
require 'resolv-replace'
|
12
12
|
require_relative 'restful_resource/version'
|
13
13
|
require_relative 'restful_resource/null_logger'
|
14
14
|
require_relative 'restful_resource/paginated_array'
|
15
15
|
require_relative 'restful_resource/parameter_missing_error'
|
16
16
|
require_relative 'restful_resource/resource_id_missing_error'
|
17
|
+
require_relative 'restful_resource/strict_open_struct'
|
17
18
|
require_relative 'restful_resource/open_object'
|
18
19
|
require_relative 'restful_resource/response'
|
19
20
|
require_relative 'restful_resource/request'
|
@@ -34,58 +34,58 @@ module RestfulResource
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.find(id, **params)
|
37
|
-
params_without_options, options = format_params(params)
|
37
|
+
params_without_options, options = format_params(**params)
|
38
38
|
|
39
|
-
response = http.get(member_url(id, params_without_options), **options)
|
39
|
+
response = http.get(member_url(id, **params_without_options), **options)
|
40
40
|
new(parse_json(response.body))
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.where(**params)
|
44
|
-
params_without_options, options = format_params(params)
|
44
|
+
params_without_options, options = format_params(**params)
|
45
45
|
|
46
|
-
url = collection_url(params_without_options)
|
46
|
+
url = collection_url(**params_without_options)
|
47
47
|
response = http.get(url, **options)
|
48
48
|
paginate_response(response)
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.get(**params)
|
52
|
-
params_without_options, options = format_params(params)
|
52
|
+
params_without_options, options = format_params(**params)
|
53
53
|
|
54
|
-
response = http.get(collection_url(params_without_options), **options)
|
54
|
+
response = http.get(collection_url(**params_without_options), **options)
|
55
55
|
new(parse_json(response.body))
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.delete(id, **params)
|
59
|
-
params_without_options, options = format_params(params)
|
60
|
-
response = http.delete(member_url(id, params_without_options), **options)
|
59
|
+
params_without_options, options = format_params(**params)
|
60
|
+
response = http.delete(member_url(id, **params_without_options), **options)
|
61
61
|
new(parse_json(response.body))
|
62
62
|
end
|
63
63
|
|
64
64
|
def self.patch(id, data: {}, headers: {}, **params)
|
65
|
-
params_without_options, options = format_params(params)
|
65
|
+
params_without_options, options = format_params(**params)
|
66
66
|
options.delete(:headers)
|
67
67
|
|
68
|
-
url = member_url(id, params_without_options)
|
68
|
+
url = member_url(id, **params_without_options)
|
69
69
|
|
70
70
|
response = http.patch(url, data: data, headers: headers, **options)
|
71
71
|
new(parse_json(response.body))
|
72
72
|
end
|
73
73
|
|
74
74
|
def self.put(id, data: {}, headers: {}, **params)
|
75
|
-
params_without_options, options = format_params(params)
|
75
|
+
params_without_options, options = format_params(**params)
|
76
76
|
options.delete(:headers)
|
77
77
|
|
78
|
-
url = member_url(id, params_without_options)
|
78
|
+
url = member_url(id, **params_without_options)
|
79
79
|
|
80
80
|
response = http.put(url, data: data, headers: headers, **options)
|
81
81
|
new(parse_json(response.body))
|
82
82
|
end
|
83
83
|
|
84
84
|
def self.post(data: {}, headers: {}, **params)
|
85
|
-
params_without_options, options = format_params(params)
|
85
|
+
params_without_options, options = format_params(**params)
|
86
86
|
options.delete(:headers)
|
87
87
|
|
88
|
-
url = collection_url(params_without_options)
|
88
|
+
url = collection_url(**params_without_options)
|
89
89
|
|
90
90
|
response = http.post(url, data: data, headers: headers, **options)
|
91
91
|
|
@@ -93,7 +93,7 @@ module RestfulResource
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def self.all(**params)
|
96
|
-
where(params)
|
96
|
+
where(**params)
|
97
97
|
end
|
98
98
|
|
99
99
|
def self.action(action_name)
|
@@ -119,8 +119,6 @@ module RestfulResource
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
protected
|
123
|
-
|
124
122
|
def self.http
|
125
123
|
@http || superclass.http
|
126
124
|
end
|
@@ -135,11 +133,9 @@ module RestfulResource
|
|
135
133
|
|
136
134
|
def self.collection_url(**params)
|
137
135
|
url = merge_url_paths(base_url, @resource_path, @action_prefix)
|
138
|
-
replace_parameters(url, params)
|
136
|
+
replace_parameters(url, **params)
|
139
137
|
end
|
140
138
|
|
141
|
-
private
|
142
|
-
|
143
139
|
def self.format_params(**params)
|
144
140
|
headers = params.delete(:headers) || {}
|
145
141
|
|
@@ -147,7 +143,7 @@ module RestfulResource
|
|
147
143
|
open_timeout = params.delete(:open_timeout)
|
148
144
|
timeout = params.delete(:timeout)
|
149
145
|
|
150
|
-
[params, headers: headers, open_timeout: open_timeout, timeout: timeout]
|
146
|
+
[params, { headers: headers, open_timeout: open_timeout, timeout: timeout }]
|
151
147
|
end
|
152
148
|
|
153
149
|
def self.merge_url_paths(uri, *paths)
|
@@ -158,7 +154,7 @@ module RestfulResource
|
|
158
154
|
raise ResourceIdMissingError if id.blank?
|
159
155
|
|
160
156
|
url = merge_url_paths(base_url, @resource_path, CGI.escape(id.to_s), @action_prefix)
|
161
|
-
replace_parameters(url, params)
|
157
|
+
replace_parameters(url, **params)
|
162
158
|
end
|
163
159
|
|
164
160
|
def self.new_collection(json)
|
@@ -177,7 +173,7 @@ module RestfulResource
|
|
177
173
|
missing_params = []
|
178
174
|
params = params.with_indifferent_access
|
179
175
|
|
180
|
-
url_params = url.scan(
|
176
|
+
url_params = url.scan(%r{:([A-Za-z][^/]*)}).flatten
|
181
177
|
url_params.each do |key|
|
182
178
|
value = params.delete(key)
|
183
179
|
if value.nil?
|
@@ -265,6 +265,11 @@ module RestfulResource
|
|
265
265
|
response = e.response
|
266
266
|
raise ClientError, request unless response
|
267
267
|
|
268
|
+
handle_error(request, response)
|
269
|
+
rescue Faraday::ServerError => e
|
270
|
+
response = e.response
|
271
|
+
raise ClientError, request unless response
|
272
|
+
|
268
273
|
handle_error(request, response)
|
269
274
|
end
|
270
275
|
|
@@ -9,15 +9,17 @@ module RestfulResource
|
|
9
9
|
def self.included(base)
|
10
10
|
base.instance_eval do
|
11
11
|
def post(data: {}, delay: 1.0, max_attempts: 10, headers: {}, open_timeout: nil, timeout: nil, **params)
|
12
|
-
url = collection_url(params)
|
12
|
+
url = collection_url(**params)
|
13
13
|
|
14
|
-
response = accept_redirected_result(
|
14
|
+
response = accept_redirected_result(
|
15
|
+
response: http.post(url, data: data, headers: headers, open_timeout: nil, timeout: nil),
|
16
|
+
delay: delay,
|
17
|
+
max_attempts: max_attempts
|
18
|
+
)
|
15
19
|
|
16
20
|
new(parse_json(response.body))
|
17
21
|
end
|
18
22
|
|
19
|
-
private
|
20
|
-
|
21
23
|
def self.accept_redirected_result(response:, delay:, max_attempts:)
|
22
24
|
new_response = response
|
23
25
|
if response.status == 303
|
data/restful_resource.gemspec
CHANGED
@@ -16,22 +16,23 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
|
-
spec.required_ruby_version = '>= 2.4'
|
19
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
|
20
20
|
|
21
21
|
spec.add_development_dependency 'bundler'
|
22
22
|
spec.add_development_dependency 'carwow_rubocop'
|
23
|
+
spec.add_development_dependency 'pry'
|
23
24
|
spec.add_development_dependency 'rake'
|
24
25
|
spec.add_development_dependency 'rspec'
|
25
|
-
spec.add_development_dependency 'rspec_junit_formatter'
|
26
26
|
spec.add_development_dependency 'rspec-its'
|
27
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
27
28
|
|
28
|
-
spec.add_dependency 'activesupport'
|
29
|
-
spec.add_dependency 'faraday', '
|
30
|
-
spec.add_dependency 'faraday-cdn-metrics'
|
29
|
+
spec.add_dependency 'activesupport', '~> 6.0'
|
30
|
+
spec.add_dependency 'faraday', '~> 1.0'
|
31
|
+
spec.add_dependency 'faraday-cdn-metrics', '~> 0.2'
|
31
32
|
spec.add_dependency 'faraday-encoding'
|
32
|
-
spec.add_dependency 'faraday-http-cache'
|
33
|
-
spec.add_dependency 'faraday_middleware'
|
33
|
+
spec.add_dependency 'faraday-http-cache', '~> 2.2'
|
34
|
+
spec.add_dependency 'faraday_middleware', '~> 1.0'
|
34
35
|
spec.add_dependency 'link_header'
|
35
|
-
spec.add_dependency 'rack'
|
36
|
-
spec.add_dependency 'typhoeus'
|
36
|
+
spec.add_dependency 'rack', '~> 2.2'
|
37
|
+
spec.add_dependency 'typhoeus', '~> 1.4'
|
37
38
|
end
|
@@ -11,7 +11,6 @@ describe RestfulResource::Associations do
|
|
11
11
|
{ first_name: 'David', second_name: 'Doe' },
|
12
12
|
{ first_name: 'Mary', second_name: 'Doe' }
|
13
13
|
]
|
14
|
-
|
15
14
|
)
|
16
15
|
end
|
17
16
|
|
@@ -39,7 +38,6 @@ describe RestfulResource::Associations do
|
|
39
38
|
@child = ComplicatedModule::Child.new(
|
40
39
|
first_name: 'David', second_name: 'Smith',
|
41
40
|
parent: { name: 'John Smith' }
|
42
|
-
|
43
41
|
)
|
44
42
|
end
|
45
43
|
|
@@ -365,17 +365,17 @@ RSpec.describe RestfulResource::Base do
|
|
365
365
|
end
|
366
366
|
|
367
367
|
it 'does not return inner object table' do
|
368
|
-
expect(@makes.first.as_json).to eq
|
368
|
+
expect(@makes.first.as_json).to eq({ 'name' => 'Audi', 'slug' => 'Audi-Slug' })
|
369
369
|
end
|
370
370
|
|
371
371
|
it 'returns inner object table on selected fields' do
|
372
|
-
expect(@makes.last.as_json(only: [:name])).to eq
|
372
|
+
expect(@makes.last.as_json(only: [:name])).to eq({ 'name' => 'Fiat' })
|
373
373
|
end
|
374
374
|
end
|
375
375
|
|
376
376
|
describe '.member_url' do
|
377
377
|
it 'requires a member ID' do
|
378
|
-
expect { described_class.member_url(''
|
378
|
+
expect { described_class.member_url('') }.to raise_error(RestfulResource::ResourceIdMissingError)
|
379
379
|
end
|
380
380
|
end
|
381
381
|
|
@@ -406,17 +406,17 @@ RSpec.describe RestfulResource::Base do
|
|
406
406
|
)
|
407
407
|
|
408
408
|
client.configure(base_url: 'http://foo.bar',
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
409
|
+
username: username,
|
410
|
+
password: password,
|
411
|
+
auth_token: auth_token,
|
412
|
+
logger: logger,
|
413
|
+
cache_store: cache_store,
|
414
|
+
instrumentation: instrumentation,
|
415
|
+
timeout: timeout,
|
416
|
+
open_timeout: open_timeout,
|
417
|
+
faraday_config: faraday_config,
|
418
|
+
faraday_options: faraday_options
|
419
|
+
)
|
420
420
|
end
|
421
421
|
end
|
422
422
|
|
@@ -19,7 +19,7 @@ describe RestfulResource::HttpClient do
|
|
19
19
|
|
20
20
|
describe 'Builder configuration' do
|
21
21
|
it 'uses the typhoeus adapter' do
|
22
|
-
expect(
|
22
|
+
expect(connection.adapter).to eq Faraday::Adapter::Typhoeus
|
23
23
|
end
|
24
24
|
|
25
25
|
it 'url_encodes requests' do
|
@@ -81,13 +81,13 @@ describe RestfulResource::HttpClient do
|
|
81
81
|
described_class.new(instrumentation: { app_name: 'rails', api_name: 'api', metric_class: FakeMetrics })
|
82
82
|
|
83
83
|
expect(RestfulResource::Instrumentation).to have_received(:new)
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
84
|
+
.with(app_name: 'rails',
|
85
|
+
api_name: 'api',
|
86
|
+
request_instrument_name: 'http.api',
|
87
|
+
cache_instrument_name: 'http_cache.api',
|
88
|
+
server_cache_instrument_name: 'cdn_metrics.api',
|
89
|
+
metric_class: FakeMetrics
|
90
|
+
)
|
91
91
|
end
|
92
92
|
|
93
93
|
it 'subscribes to the notifications' do
|
@@ -17,7 +17,7 @@ RSpec.describe RestfulResource::HttpClient do
|
|
17
17
|
|
18
18
|
describe 'Basic HTTP' do
|
19
19
|
shared_examples 'error codes throw exception' do |verb, status, exception_class|
|
20
|
-
it "
|
20
|
+
it "raises an error #{status}" do
|
21
21
|
url = "http://httpbin.org/status/#{status}"
|
22
22
|
|
23
23
|
connection = faraday_connection do |stubs|
|
@@ -58,7 +58,7 @@ RSpec.describe RestfulResource::HttpClient do
|
|
58
58
|
|
59
59
|
it 'executes patch' do
|
60
60
|
connection = faraday_connection do |stubs|
|
61
|
-
#
|
61
|
+
# NOTE: request body is serialized as url-encoded so the stub body must be in the same format to match
|
62
62
|
stubs.patch('http://httpbin.org/patch', 'name=Alfred') { |_env| [200, {}, nil] }
|
63
63
|
end
|
64
64
|
|
@@ -71,7 +71,7 @@ RSpec.describe RestfulResource::HttpClient do
|
|
71
71
|
include_examples 'raise an exception on error responses', :put
|
72
72
|
it 'executes put' do
|
73
73
|
connection = faraday_connection do |stubs|
|
74
|
-
#
|
74
|
+
# NOTE: request body is serialized as url-encoded so the stub body must be in the same format to match
|
75
75
|
stubs.put('http://httpbin.org/put', 'name=Alfred') { |_env| [200, {}, nil] }
|
76
76
|
end
|
77
77
|
|
@@ -84,7 +84,7 @@ RSpec.describe RestfulResource::HttpClient do
|
|
84
84
|
include_examples 'raise an exception on error responses', :post
|
85
85
|
it 'executes post' do
|
86
86
|
connection = faraday_connection do |stubs|
|
87
|
-
#
|
87
|
+
# NOTE: request body is serialized as url-encoded so the stub body must be in the same format to match
|
88
88
|
stubs.post('http://httpbin.org/post', 'name=Alfred') { |_env| [200, {}, %("name": "Alfred")] }
|
89
89
|
end
|
90
90
|
|
@@ -219,10 +219,10 @@ RSpec.describe RestfulResource::HttpClient do
|
|
219
219
|
conn
|
220
220
|
end
|
221
221
|
|
222
|
-
|
223
222
|
context 'when explicit timeout set on connection' do
|
224
223
|
let(:timeout) { 5 }
|
225
224
|
let(:required_headers) { { 'X-Client-Timeout' => 5 } }
|
225
|
+
|
226
226
|
it 'sets X-Client-Timeout correctly' do
|
227
227
|
response = http_client.get('http://httpbin.org/get')
|
228
228
|
|
@@ -7,7 +7,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
7
7
|
allow(Dealer).to receive(:http).and_return(@mock_http)
|
8
8
|
end
|
9
9
|
|
10
|
-
|
10
|
+
describe '#patch without errors' do
|
11
11
|
before do
|
12
12
|
data = { name: 'Barak' }
|
13
13
|
expected_response = RestfulResource::Response.new(body: { name: 'Barak' }.to_json)
|
@@ -25,7 +25,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
describe '#patch with errors' do
|
29
29
|
before do
|
30
30
|
data = { name: 'Leonardo' }
|
31
31
|
@error = 'Cannot use Ninja Turtles names'
|
@@ -72,7 +72,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
|
75
|
+
describe '#put without errors' do
|
76
76
|
before do
|
77
77
|
data = { name: 'Barak' }
|
78
78
|
expected_response = RestfulResource::Response.new(body: { name: 'Barak' }.to_json)
|
@@ -90,7 +90,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
|
93
|
+
describe '#put with errors' do
|
94
94
|
before do
|
95
95
|
data = { name: 'Leonardo' }
|
96
96
|
@error = 'Cannot use Ninja Turtles names'
|
@@ -137,7 +137,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
|
140
|
+
describe '#post without errors' do
|
141
141
|
before do
|
142
142
|
data = { name: 'Barak' }
|
143
143
|
expected_response = RestfulResource::Response.new(body: { name: 'Barak' }.to_json)
|
@@ -155,7 +155,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
-
|
158
|
+
describe '#post with errors' do
|
159
159
|
before do
|
160
160
|
data = { name: 'Leonardo' }
|
161
161
|
@error = 'Cannot use Ninja Turtles names'
|
@@ -192,7 +192,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
192
192
|
end
|
193
193
|
end
|
194
194
|
|
195
|
-
|
195
|
+
describe '#get without errors' do
|
196
196
|
before do
|
197
197
|
expected_response = RestfulResource::Response.new(body: { name: 'Barak' }.to_json)
|
198
198
|
expect_get('http://api.carwow.co.uk/dealers', expected_response)
|
@@ -209,7 +209,7 @@ RSpec.describe RestfulResource::RailsValidations do
|
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
-
|
212
|
+
describe '#get with errors' do
|
213
213
|
before do
|
214
214
|
@error = 'Missing parameter'
|
215
215
|
expected_response = RestfulResource::Response.new(body: { errors: [@error] }.to_json)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restful_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Santoro
|
8
8
|
- Federico Rebora
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: pry
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: rspec
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
@@ -96,13 +96,13 @@ dependencies:
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: rspec_junit_formatter
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
|
-
type: :
|
105
|
+
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
@@ -110,39 +110,47 @@ dependencies:
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
113
|
+
name: activesupport
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0.15'
|
119
|
-
- - "<"
|
116
|
+
- - "~>"
|
120
117
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
118
|
+
version: '6.0'
|
122
119
|
type: :runtime
|
123
120
|
prerelease: false
|
124
121
|
version_requirements: !ruby/object:Gem::Requirement
|
125
122
|
requirements:
|
126
|
-
- - "
|
123
|
+
- - "~>"
|
127
124
|
- !ruby/object:Gem::Version
|
128
|
-
version: '0
|
129
|
-
|
125
|
+
version: '6.0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: faraday
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
130
131
|
- !ruby/object:Gem::Version
|
131
|
-
version: '1.
|
132
|
+
version: '1.0'
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '1.0'
|
132
140
|
- !ruby/object:Gem::Dependency
|
133
141
|
name: faraday-cdn-metrics
|
134
142
|
requirement: !ruby/object:Gem::Requirement
|
135
143
|
requirements:
|
136
|
-
- - "
|
144
|
+
- - "~>"
|
137
145
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
146
|
+
version: '0.2'
|
139
147
|
type: :runtime
|
140
148
|
prerelease: false
|
141
149
|
version_requirements: !ruby/object:Gem::Requirement
|
142
150
|
requirements:
|
143
|
-
- - "
|
151
|
+
- - "~>"
|
144
152
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
153
|
+
version: '0.2'
|
146
154
|
- !ruby/object:Gem::Dependency
|
147
155
|
name: faraday-encoding
|
148
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,30 +169,30 @@ dependencies:
|
|
161
169
|
name: faraday-http-cache
|
162
170
|
requirement: !ruby/object:Gem::Requirement
|
163
171
|
requirements:
|
164
|
-
- - "
|
172
|
+
- - "~>"
|
165
173
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
174
|
+
version: '2.2'
|
167
175
|
type: :runtime
|
168
176
|
prerelease: false
|
169
177
|
version_requirements: !ruby/object:Gem::Requirement
|
170
178
|
requirements:
|
171
|
-
- - "
|
179
|
+
- - "~>"
|
172
180
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
181
|
+
version: '2.2'
|
174
182
|
- !ruby/object:Gem::Dependency
|
175
183
|
name: faraday_middleware
|
176
184
|
requirement: !ruby/object:Gem::Requirement
|
177
185
|
requirements:
|
178
|
-
- - "
|
186
|
+
- - "~>"
|
179
187
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
188
|
+
version: '1.0'
|
181
189
|
type: :runtime
|
182
190
|
prerelease: false
|
183
191
|
version_requirements: !ruby/object:Gem::Requirement
|
184
192
|
requirements:
|
185
|
-
- - "
|
193
|
+
- - "~>"
|
186
194
|
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
195
|
+
version: '1.0'
|
188
196
|
- !ruby/object:Gem::Dependency
|
189
197
|
name: link_header
|
190
198
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,30 +211,30 @@ dependencies:
|
|
203
211
|
name: rack
|
204
212
|
requirement: !ruby/object:Gem::Requirement
|
205
213
|
requirements:
|
206
|
-
- - "
|
214
|
+
- - "~>"
|
207
215
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
216
|
+
version: '2.2'
|
209
217
|
type: :runtime
|
210
218
|
prerelease: false
|
211
219
|
version_requirements: !ruby/object:Gem::Requirement
|
212
220
|
requirements:
|
213
|
-
- - "
|
221
|
+
- - "~>"
|
214
222
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
223
|
+
version: '2.2'
|
216
224
|
- !ruby/object:Gem::Dependency
|
217
225
|
name: typhoeus
|
218
226
|
requirement: !ruby/object:Gem::Requirement
|
219
227
|
requirements:
|
220
|
-
- - "
|
228
|
+
- - "~>"
|
221
229
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
230
|
+
version: '1.4'
|
223
231
|
type: :runtime
|
224
232
|
prerelease: false
|
225
233
|
version_requirements: !ruby/object:Gem::Requirement
|
226
234
|
requirements:
|
227
|
-
- - "
|
235
|
+
- - "~>"
|
228
236
|
- !ruby/object:Gem::Version
|
229
|
-
version: '
|
237
|
+
version: '1.4'
|
230
238
|
description: A simple activerecord inspired rest resource base class implemented using
|
231
239
|
rest-client
|
232
240
|
email:
|
@@ -263,6 +271,7 @@ files:
|
|
263
271
|
- lib/restful_resource/request.rb
|
264
272
|
- lib/restful_resource/resource_id_missing_error.rb
|
265
273
|
- lib/restful_resource/response.rb
|
274
|
+
- lib/restful_resource/strict_open_struct.rb
|
266
275
|
- lib/restful_resource/version.rb
|
267
276
|
- restful_resource.gemspec
|
268
277
|
- spec/fixtures.rb
|
@@ -280,7 +289,7 @@ homepage: http://www.github.com/carwow/restful_resource
|
|
280
289
|
licenses:
|
281
290
|
- MIT
|
282
291
|
metadata: {}
|
283
|
-
post_install_message:
|
292
|
+
post_install_message:
|
284
293
|
rdoc_options: []
|
285
294
|
require_paths:
|
286
295
|
- lib
|
@@ -288,15 +297,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
288
297
|
requirements:
|
289
298
|
- - ">="
|
290
299
|
- !ruby/object:Gem::Version
|
291
|
-
version:
|
300
|
+
version: 2.4.0
|
292
301
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
293
302
|
requirements:
|
294
303
|
- - ">="
|
295
304
|
- !ruby/object:Gem::Version
|
296
305
|
version: '0'
|
297
306
|
requirements: []
|
298
|
-
rubygems_version: 3.
|
299
|
-
signing_key:
|
307
|
+
rubygems_version: 3.1.4
|
308
|
+
signing_key:
|
300
309
|
specification_version: 4
|
301
310
|
summary: A simple activerecord inspired rest resource base class implemented using
|
302
311
|
rest-client
|