restful_resource 2.7.0 → 2.10.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3102663d7afdbed68734466795d237a1b90c16a37cf9001d41511d8949a53545
4
- data.tar.gz: cc440e90343ddcccdac145f6c8a5c9180f22aacec6c19464af5b14e17bca7f30
3
+ metadata.gz: 68a4372ef797bce4031a74263c47edd86898a4f10c7a3516d08cfecdb52b59c5
4
+ data.tar.gz: 46ebcfbb5dbdda37c06c678369e838bdf646f0b3e4d6ea103ddd25407e3e98bb
5
5
  SHA512:
6
- metadata.gz: 9a854369276af2c44a1c6630994cc7024ab24de35b1a01269492ca41b4f3da85d1df4406ab0d60a202c46b5eddb1d0a4c14b5341a26c40d8baaedf2bebd77d95
7
- data.tar.gz: c4a34be5f465dfc0186febab93f24c94ea0039a0eb2b8bc700c9e58a02ae38bf0a96c6f3c24d9b57876fe1ab42d73471cacbc00c9b799b5d4dfe0e805b763601
6
+ metadata.gz: 58bec55b531529a570598f66ab67c7fd113a9315ee7f8fa1cbb9219b7ac326c734a43f8697feb81debb59cb02447c9853d37e8b630a7f0d477c6ce388261c4a8
7
+ data.tar.gz: 7dd64a01a76e08587f2c1f9b122648b2a00a0436b4dc8233b8fb94f3677c96e21e03ff829f829e7c8450dbb8c8536c2c2851cb717c0c89239aa0ea9b56dcaa7c
@@ -2,7 +2,7 @@ version: 2
2
2
  jobs:
3
3
  build:
4
4
  docker:
5
- - image: circleci/ruby:2.6
5
+ - image: circleci/ruby:2.7
6
6
  steps:
7
7
  - checkout
8
8
  - run:
@@ -1,130 +1,132 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-09-11 09:24:50 +0000 using RuboCop version 0.59.0.
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: 10
16
- Lint/IneffectiveAccessModifier:
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
- - 'lib/restful_resource/base.rb'
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/ParenthesesAsGroupedExpression:
56
+ Lint/MissingSuper:
27
57
  Exclude:
28
- - 'spec/restful_resource/base_spec.rb'
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: 3
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: 101
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: 162
84
+ Max: 195
66
85
 
67
- # Offense count: 2
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: 8
96
+ # Offense count: 9
83
97
  # Configuration parameters: CountKeywordArgs.
84
98
  Metrics/ParameterLists:
85
- Max: 10
99
+ Max: 11
86
100
 
87
- # Offense count: 1
101
+ # Offense count: 2
102
+ # Configuration parameters: IgnoredMethods.
88
103
  Metrics/PerceivedComplexity:
89
- Max: 8
104
+ Max: 11
90
105
 
91
106
  # Offense count: 2
92
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
107
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
93
108
  # NamePrefix: is_, has_, have_
94
- # NamePrefixBlacklist: is_, has_, have_
95
- # NameWhitelist: is_a?
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: 19
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: 53
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: 14
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: 22
147
- # Configuration parameters: AggregateFailuresByDefault.
154
+ # Offense count: 24
148
155
  RSpec/MultipleExpectations:
149
156
  Max: 7
150
157
 
151
- # Offense count: 6
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: 10
170
+ # Offense count: 12
157
171
  RSpec/NestedGroups:
158
172
  Max: 5
159
173
 
160
- # Offense count: 2
174
+ # Offense count: 4
161
175
  RSpec/RepeatedDescription:
162
176
  Exclude:
163
177
  - 'spec/restful_resource/base_spec.rb'
164
178
 
165
- # Offense count: 3
166
- # Configuration parameters: IgnoreSymbolicNames.
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
- Style/MethodMissingSuper:
207
+ # Cop supports --auto-correct.
208
+ # Configuration parameters: EnforcedStyle.
209
+ # SupportedStyles: braces, no_braces
210
+ Style/HashAsLastArrayItem:
181
211
  Exclude:
182
- - 'lib/restful_resource/open_object.rb'
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
- # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
192
- # SupportedStyles: slashes, percent_r, mixed
193
- Style/RegexpLiteral:
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, Whitelist.
200
- # Whitelist: 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
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
@@ -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
@@ -1,5 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- gem 'pry'
@@ -1,100 +1,109 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- restful_resource (2.7.0)
5
- activesupport
6
- faraday (~> 0.15.0)
7
- faraday-cdn-metrics
4
+ restful_resource (2.10.3)
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.0.0)
18
+ activesupport (6.0.3.4)
19
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
20
20
  i18n (>= 0.7, < 2)
21
21
  minitest (~> 5.1)
22
22
  tzinfo (~> 1.1)
23
- zeitwerk (~> 2.1, >= 2.1.8)
24
- ast (2.4.0)
25
- carwow_rubocop (3.0.3)
26
- rubocop (>= 0.68)
23
+ zeitwerk (~> 2.2, >= 2.2.2)
24
+ ast (2.4.1)
25
+ carwow_rubocop (3.4.1)
26
+ rubocop (>= 0.93)
27
27
  rubocop-performance
28
28
  rubocop-rspec
29
29
  coderay (1.1.2)
30
- concurrent-ruby (1.1.5)
31
- diff-lcs (1.3)
30
+ concurrent-ruby (1.1.7)
31
+ diff-lcs (1.4.4)
32
32
  ethon (0.12.0)
33
33
  ffi (>= 1.3.0)
34
- faraday (0.15.4)
34
+ faraday (1.1.0)
35
35
  multipart-post (>= 1.2, < 3)
36
- faraday-cdn-metrics (0.1.0)
37
- faraday (~> 0.11)
36
+ ruby2_keywords
37
+ faraday-cdn-metrics (0.2.0)
38
+ faraday (~> 1)
38
39
  faraday-encoding (0.0.5)
39
40
  faraday
40
- faraday-http-cache (2.0.0)
41
- faraday (~> 0.8)
42
- faraday_middleware (0.13.1)
43
- faraday (>= 0.7.4, < 1.0)
44
- ffi (1.11.1)
45
- i18n (1.7.0)
41
+ faraday-http-cache (2.2.0)
42
+ faraday (>= 0.8)
43
+ faraday_middleware (1.0.0)
44
+ faraday (~> 1.0)
45
+ ffi (1.13.1)
46
+ i18n (1.8.5)
46
47
  concurrent-ruby (~> 1.0)
47
- jaro_winkler (1.5.3)
48
48
  link_header (0.0.8)
49
- method_source (0.9.2)
50
- minitest (5.12.2)
49
+ method_source (1.0.0)
50
+ minitest (5.14.2)
51
51
  multipart-post (2.1.1)
52
- parallel (1.17.0)
53
- parser (2.6.3.0)
54
- ast (~> 2.4.0)
55
- pry (0.12.2)
56
- coderay (~> 1.1.0)
57
- method_source (~> 0.9.0)
58
- rack (2.0.7)
52
+ parallel (1.20.0)
53
+ parser (2.7.2.0)
54
+ ast (~> 2.4.1)
55
+ pry (0.13.1)
56
+ coderay (~> 1.1)
57
+ method_source (~> 1.0)
58
+ rack (2.2.3)
59
59
  rainbow (3.0.0)
60
- rake (12.3.3)
61
- rspec (3.8.0)
62
- rspec-core (~> 3.8.0)
63
- rspec-expectations (~> 3.8.0)
64
- rspec-mocks (~> 3.8.0)
65
- rspec-core (3.8.2)
66
- rspec-support (~> 3.8.0)
67
- rspec-expectations (3.8.4)
60
+ rake (13.0.1)
61
+ regexp_parser (1.8.2)
62
+ rexml (3.2.4)
63
+ rspec (3.10.0)
64
+ rspec-core (~> 3.10.0)
65
+ rspec-expectations (~> 3.10.0)
66
+ rspec-mocks (~> 3.10.0)
67
+ rspec-core (3.10.0)
68
+ rspec-support (~> 3.10.0)
69
+ rspec-expectations (3.10.0)
68
70
  diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.8.0)
71
+ rspec-support (~> 3.10.0)
70
72
  rspec-its (1.3.0)
71
73
  rspec-core (>= 3.0.0)
72
74
  rspec-expectations (>= 3.0.0)
73
- rspec-mocks (3.8.1)
75
+ rspec-mocks (3.10.0)
74
76
  diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.8.0)
76
- rspec-support (3.8.2)
77
+ rspec-support (~> 3.10.0)
78
+ rspec-support (3.10.0)
77
79
  rspec_junit_formatter (0.4.1)
78
80
  rspec-core (>= 2, < 4, != 2.12.0)
79
- rubocop (0.73.0)
80
- jaro_winkler (~> 1.5.1)
81
+ rubocop (1.3.0)
81
82
  parallel (~> 1.10)
82
- parser (>= 2.6)
83
+ parser (>= 2.7.1.5)
83
84
  rainbow (>= 2.2.2, < 4.0)
85
+ regexp_parser (>= 1.8)
86
+ rexml
87
+ rubocop-ast (>= 1.1.1)
84
88
  ruby-progressbar (~> 1.7)
85
- unicode-display_width (>= 1.4.0, < 1.7)
86
- rubocop-performance (1.4.1)
87
- rubocop (>= 0.71.0)
88
- rubocop-rspec (1.34.1)
89
- rubocop (>= 0.60.0)
89
+ unicode-display_width (>= 1.4.0, < 2.0)
90
+ rubocop-ast (1.1.1)
91
+ parser (>= 2.7.1.5)
92
+ rubocop-performance (1.8.1)
93
+ rubocop (>= 0.87.0)
94
+ rubocop-ast (>= 0.4.0)
95
+ rubocop-rspec (2.0.0)
96
+ rubocop (~> 1.0)
97
+ rubocop-ast (>= 1.1.0)
90
98
  ruby-progressbar (1.10.1)
99
+ ruby2_keywords (0.0.2)
91
100
  thread_safe (0.3.6)
92
- typhoeus (1.3.1)
101
+ typhoeus (1.4.0)
93
102
  ethon (>= 0.9.0)
94
- tzinfo (1.2.5)
103
+ tzinfo (1.2.7)
95
104
  thread_safe (~> 0.1)
96
- unicode-display_width (1.6.0)
97
- zeitwerk (2.2.0)
105
+ unicode-display_width (1.7.0)
106
+ zeitwerk (2.4.0)
98
107
 
99
108
  PLATFORMS
100
109
  ruby
@@ -110,4 +119,4 @@ DEPENDENCIES
110
119
  rspec_junit_formatter
111
120
 
112
121
  BUNDLED WITH
113
- 2.0.2
122
+ 2.1.4