minfraud 2.9.0 → 2.11.0

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +46 -35
  5. data/lib/minfraud/assessments.rb +1 -1
  6. data/lib/minfraud/components/account.rb +1 -1
  7. data/lib/minfraud/components/addressable.rb +46 -11
  8. data/lib/minfraud/components/base.rb +11 -13
  9. data/lib/minfraud/components/billing.rb +1 -1
  10. data/lib/minfraud/components/credit_card.rb +8 -7
  11. data/lib/minfraud/components/custom_inputs.rb +1 -1
  12. data/lib/minfraud/components/device.rb +9 -1
  13. data/lib/minfraud/components/email.rb +28 -4
  14. data/lib/minfraud/components/event.rb +3 -3
  15. data/lib/minfraud/components/order.rb +2 -2
  16. data/lib/minfraud/components/payment.rb +6 -1
  17. data/lib/minfraud/components/report/transaction.rb +8 -4
  18. data/lib/minfraud/components/shipping.rb +1 -3
  19. data/lib/minfraud/components/shopping_cart.rb +1 -1
  20. data/lib/minfraud/components/shopping_cart_item.rb +4 -4
  21. data/lib/minfraud/enum.rb +33 -9
  22. data/lib/minfraud/http_service/response.rb +4 -2
  23. data/lib/minfraud/model/abstract.rb +3 -0
  24. data/lib/minfraud/model/device.rb +1 -1
  25. data/lib/minfraud/model/email.rb +2 -1
  26. data/lib/minfraud/model/email_domain.rb +3 -2
  27. data/lib/minfraud/model/email_domain_visit.rb +10 -7
  28. data/lib/minfraud/model/factors.rb +1 -1
  29. data/lib/minfraud/model/geoip2_location.rb +1 -1
  30. data/lib/minfraud/model/insights.rb +1 -1
  31. data/lib/minfraud/model/ip_address.rb +1 -1
  32. data/lib/minfraud/model/reason.rb +1 -1
  33. data/lib/minfraud/model/risk_score_reason.rb +2 -2
  34. data/lib/minfraud/model/shipping_address.rb +3 -1
  35. data/lib/minfraud/model/warning.rb +13 -2
  36. data/lib/minfraud/report.rb +1 -1
  37. data/lib/minfraud/validates.rb +223 -32
  38. data/lib/minfraud/version.rb +1 -1
  39. metadata +20 -19
  40. data/.rspec +0 -2
  41. data/.rubocop.yml +0 -113
  42. data/CLAUDE.md +0 -443
  43. data/CODE_OF_CONDUCT.md +0 -49
  44. data/Gemfile +0 -5
  45. data/README.dev.md +0 -28
  46. data/Rakefile +0 -12
  47. data/bin/console +0 -15
  48. data/bin/setup +0 -8
  49. data/minfraud.gemspec +0 -42
@@ -4,28 +4,70 @@ require 'date'
4
4
  require 'ipaddr'
5
5
  require 'uri'
6
6
 
7
- # rubocop:disable Metrics/ModuleLength
8
7
  module Minfraud
9
8
  # @!visibility private
9
+ # Validates provides validation helper methods for component input values.
10
+ # These methods are used internally when validation is enabled via
11
+ # Minfraud.enable_validation.
12
+ #
13
+ # rubocop:disable Metrics/ModuleLength
10
14
  module Validates
15
+ RFC3339_REGEX = /
16
+ \A(\d{4})-(\d{2})-(\d{2})
17
+ T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?
18
+ (?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)\z
19
+ /x
20
+ private_constant :RFC3339_REGEX
21
+
22
+ # Validates that a string value does not exceed a maximum length.
23
+ #
24
+ # @param field [String] The field name for error messages.
25
+ # @param length [Integer] The maximum allowed length.
26
+ # @param value [String, nil] The value to validate.
27
+ #
28
+ # @raise [InvalidInputError] If the value exceeds the maximum length.
29
+ #
30
+ # @return [nil]
11
31
  def validate_string(field, length, value)
12
- return if !value
32
+ return if value.nil?
33
+
34
+ validate_not_boolean(field, value)
13
35
 
14
36
  if value.to_s.length > length
15
37
  raise InvalidInputError, "The #{field} value is not valid. The maximum length is #{length}."
16
38
  end
17
39
  end
18
40
 
41
+ # Validates that a value is a valid MD5 hash string.
42
+ #
43
+ # @param field [String] The field name for error messages.
44
+ # @param value [String, nil] The value to validate.
45
+ #
46
+ # @raise [InvalidInputError] If the value is not a valid MD5 hash.
47
+ #
48
+ # @return [nil]
19
49
  def validate_md5(field, value)
20
- return if !value
50
+ return if value.nil?
51
+
52
+ validate_not_boolean(field, value)
21
53
 
22
54
  if !value.to_s.match(/\A[a-fA-F0-9]{32}\z/)
23
55
  raise InvalidInputError, "The #{field} value is not valid. It must be an MD5 hash as a string."
24
56
  end
25
57
  end
26
58
 
59
+ # Validates that a value is a valid UUID string.
60
+ #
61
+ # @param field [String] The field name for error messages.
62
+ # @param value [String, nil] The value to validate.
63
+ #
64
+ # @raise [InvalidInputError] If the value is not a valid UUID.
65
+ #
66
+ # @return [nil]
27
67
  def validate_uuid(field, value)
28
- return if !value
68
+ return if value.nil?
69
+
70
+ validate_not_boolean(field, value)
29
71
 
30
72
  stripped_value = value.to_s.delete('-')
31
73
 
@@ -37,40 +79,92 @@ module Minfraud
37
79
  end
38
80
  end
39
81
 
82
+ # Validates that a value is a valid ISO 3166-2 subdivision code.
83
+ #
84
+ # @param field [String] The field name for error messages.
85
+ # @param value [String, nil] The value to validate.
86
+ #
87
+ # @raise [InvalidInputError] If the value is not a valid subdivision code.
88
+ #
89
+ # @return [nil]
40
90
  def validate_subdivision_code(field, value)
41
- return if !value
91
+ return if value.nil?
92
+
93
+ validate_not_boolean(field, value)
42
94
 
43
95
  if !value.to_s.match(/\A[0-9A-Z]{1,4}\z/)
44
96
  raise InvalidInputError, "The #{field} value is not valid. It must be an ISO 3166-2 subdivision code."
45
97
  end
46
98
  end
47
99
 
100
+ # Validates that a value is a valid ISO 3166-1 alpha-2 country code.
101
+ #
102
+ # @param field [String] The field name for error messages.
103
+ # @param value [String, nil] The value to validate.
104
+ #
105
+ # @raise [InvalidInputError] If the value is not a valid country code.
106
+ #
107
+ # @return [nil]
48
108
  def validate_country_code(field, value)
49
- return if !value
109
+ return if value.nil?
110
+
111
+ validate_not_boolean(field, value)
50
112
 
51
113
  if !value.to_s.match(/\A[A-Z]{2}\z/)
52
114
  raise InvalidInputError, "The #{field} value is not valid. It must be an ISO 3166-1 alpha-2 country code."
53
115
  end
54
116
  end
55
117
 
118
+ # Validates that a value is a valid telephone country code (1-4 digits).
119
+ #
120
+ # @param field [String] The field name for error messages.
121
+ # @param value [String, nil] The value to validate.
122
+ #
123
+ # @raise [InvalidInputError] If the value is not a valid telephone country
124
+ # code.
125
+ #
126
+ # @return [nil]
56
127
  def validate_telephone_country_code(field, value)
57
- return if !value
128
+ return if value.nil?
129
+
130
+ validate_not_boolean(field, value)
58
131
 
59
132
  if !value.to_s.match(/\A[0-9]{1,4}\z/)
60
133
  raise InvalidInputError, "The #{field} value is not valid. It must be at most 4 digits."
61
134
  end
62
135
  end
63
136
 
137
+ # Validates that a value matches a regular expression pattern.
138
+ #
139
+ # @param field [String] The field name for error messages.
140
+ # @param regex [Regexp] The regular expression pattern to match.
141
+ # @param value [String, nil] The value to validate.
142
+ #
143
+ # @raise [InvalidInputError] If the value does not match the pattern.
144
+ #
145
+ # @return [nil]
64
146
  def validate_regex(field, regex, value)
65
- return if !value
147
+ return if value.nil?
148
+
149
+ validate_not_boolean(field, value)
66
150
 
67
151
  if !regex.match(value.to_s)
68
152
  raise InvalidInputError, "The #{field} value is not valid. It must match the pattern #{regex}."
69
153
  end
70
154
  end
71
155
 
156
+ # Validates that a value is a valid credit card token.
157
+ #
158
+ # @param field [String] The field name for error messages.
159
+ # @param value [String, nil] The value to validate.
160
+ #
161
+ # @raise [InvalidInputError] If the value is not a valid credit card token.
162
+ #
163
+ # @return [nil]
72
164
  def validate_credit_card_token(field, value)
73
- return if !value
165
+ return if value.nil?
166
+
167
+ validate_not_boolean(field, value)
74
168
 
75
169
  s = value.to_s
76
170
 
@@ -83,12 +177,18 @@ module Minfraud
83
177
  end
84
178
  end
85
179
 
180
+ # Validates a custom input value (boolean, numeric, or string).
181
+ #
182
+ # @param field [String] The field name for error messages.
183
+ # @param value [Boolean, Numeric, String, nil] The value to validate.
184
+ #
185
+ # @raise [InvalidInputError] If the value is not valid.
186
+ #
187
+ # @return [nil]
86
188
  def validate_custom_input_value(field, value)
87
- return if !value
189
+ return if value.nil?
88
190
 
89
- if [true, false].include?(value)
90
- return
91
- end
191
+ return if boolean?(value)
92
192
 
93
193
  if value.is_a? Numeric
94
194
  if value < -1e13 + 1 || value > 1e13 - 1
@@ -101,27 +201,47 @@ module Minfraud
101
201
  validate_string(field, 255, value)
102
202
  end
103
203
 
204
+ # Validates that a value is a valid IPv4 or IPv6 address.
205
+ #
206
+ # @param field [String] The field name for error messages.
207
+ # @param value [String, nil] The value to validate.
208
+ #
209
+ # @raise [InvalidInputError] If the value is not a valid IP address.
210
+ #
211
+ # @return [nil]
104
212
  def validate_ip(field, value)
105
- return if !value
213
+ return if value.nil?
214
+
215
+ validate_not_boolean(field, value)
106
216
 
107
217
  s = value.to_s
108
218
  if s.include? '/'
109
219
  raise InvalidInputError, "The #{field} value is not valid. It must be an individual IP address."
110
220
  end
111
221
 
112
- # rubocop:disable Style/RescueStandardError
222
+ # rubocop:disable-next Style/RescueStandardError
113
223
  begin
114
224
  IPAddr.new(s)
115
225
  rescue
116
226
  raise InvalidInputError, "The #{field} value is not valid. It must be an IPv4 or IPv6 address."
117
227
  end
118
- # rubocop:enable Style/RescueStandardError
119
228
 
120
229
  nil
121
230
  end
122
231
 
232
+ # Validates that a value is a non-negative number within range.
233
+ #
234
+ # @param field [String] The field name for error messages.
235
+ # @param value [Numeric, nil] The value to validate.
236
+ #
237
+ # @raise [InvalidInputError] If the value is not a valid non-negative
238
+ # number.
239
+ #
240
+ # @return [nil]
123
241
  def validate_nonnegative_number(field, value)
124
- return if !value
242
+ return if value.nil?
243
+
244
+ validate_not_boolean(field, value)
125
245
 
126
246
  if !value.is_a? Numeric
127
247
  raise InvalidInputError, "The #{field} value is not valid. It must be numeric."
@@ -132,8 +252,19 @@ module Minfraud
132
252
  end
133
253
  end
134
254
 
255
+ # Validates that a value is a non-negative integer within range.
256
+ #
257
+ # @param field [String] The field name for error messages.
258
+ # @param value [Integer, nil] The value to validate.
259
+ #
260
+ # @raise [InvalidInputError] If the value is not a valid non-negative
261
+ # integer.
262
+ #
263
+ # @return [nil]
135
264
  def validate_nonnegative_integer(field, value)
136
- return if !value
265
+ return if value.nil?
266
+
267
+ validate_not_boolean(field, value)
137
268
 
138
269
  if !value.is_a? Integer
139
270
  raise InvalidInputError, "The #{field} is not valid. It must be an integer."
@@ -144,10 +275,18 @@ module Minfraud
144
275
  end
145
276
  end
146
277
 
278
+ # Validates that a value is a valid email address or MD5 hash of one.
279
+ #
280
+ # @param field [String] The field name for error messages.
281
+ # @param value [String, nil] The value to validate.
282
+ #
283
+ # @raise [InvalidInputError] If the value is not a valid email or MD5 hash.
284
+ #
285
+ # @return [nil]
147
286
  def validate_email(field, value)
148
- return if !value
287
+ return if value.nil?
149
288
 
150
- if /.@./.match?(value)
289
+ if /.@./.match?(value.to_s)
151
290
  validate_string(field, 255, value)
152
291
  return
153
292
  end
@@ -155,36 +294,65 @@ module Minfraud
155
294
  validate_md5(field, value)
156
295
  end
157
296
 
297
+ # Validates that a value is in RFC 3339 date-time format.
298
+ #
299
+ # @param field [String] The field name for error messages.
300
+ # @param value [String, nil] The value to validate.
301
+ #
302
+ # @raise [InvalidInputError] If the value is not in RFC 3339 format.
303
+ #
304
+ # @return [nil]
158
305
  def validate_rfc3339(field, value)
159
- return if !value
306
+ return if value.nil?
160
307
 
161
- # rubocop:disable Style/RescueStandardError
162
- begin
163
- DateTime.rfc3339(value)
164
- rescue
308
+ validate_not_boolean(field, value)
309
+
310
+ # The regex checks the format, time, and offset that the web service
311
+ # requires. valid_date? rejects dates that do not exist, such as
312
+ # February 30. The web service uses the Gregorian calendar for all
313
+ # years.
314
+ match = RFC3339_REGEX.match(value.to_s)
315
+ if !match || !Date.valid_date?(match[1].to_i, match[2].to_i, match[3].to_i, Date::GREGORIAN)
165
316
  raise InvalidInputError, "The #{field} value is not valid. It must be in the RFC 3339 date-time format."
166
317
  end
167
- # rubocop:enable Style/RescueStandardError
168
318
 
169
319
  nil
170
320
  end
171
321
 
322
+ # Validates that a value is a boolean.
323
+ #
324
+ # @param field [String] The field name for error messages.
325
+ # @param value [Boolean, nil] The value to validate.
326
+ #
327
+ # @raise [InvalidInputError] If the value is not a boolean.
328
+ #
329
+ # @return [nil]
172
330
  def validate_boolean(field, value)
173
- return if !value
331
+ return if value.nil?
174
332
 
175
- if ![false, true].include? value
333
+ if !boolean?(value)
176
334
  raise InvalidInputError, "The #{field} value is not valid. It must be boolean."
177
335
  end
178
336
  end
179
337
 
338
+ # Validates that a value is a valid absolute URI.
339
+ #
340
+ # @param field [String] The field name for error messages.
341
+ # @param value [String, nil] The value to validate.
342
+ #
343
+ # @raise [InvalidInputError] If the value is not a valid absolute URI.
344
+ #
345
+ # @return [nil]
180
346
  def validate_uri(field, value)
181
- return if !value
347
+ return if value.nil?
348
+
349
+ validate_not_boolean(field, value)
182
350
 
183
351
  if value.to_s.length > 1_024
184
352
  raise InvalidInputError, "The #{field} value is not valid. It must not exceed 1024 characters."
185
353
  end
186
354
 
187
- # rubocop:disable Style/RescueStandardError
355
+ # rubocop:disable-next Style/RescueStandardError
188
356
  begin
189
357
  u = URI(value)
190
358
  if !u.scheme
@@ -193,8 +361,31 @@ module Minfraud
193
361
  rescue
194
362
  raise InvalidInputError, "The #{field} value is not valid. It must be an absolute URI."
195
363
  end
196
- # rubocop:enable Style/RescueStandardError
197
364
  end
365
+
366
+ # Validates that a value is not a boolean.
367
+ #
368
+ # @param field [String] The field name for error messages.
369
+ # @param value [Object] The value to validate.
370
+ #
371
+ # @raise [InvalidInputError] If the value is true or false.
372
+ #
373
+ # @return [nil]
374
+ def validate_not_boolean(field, value)
375
+ if boolean?(value)
376
+ raise InvalidInputError, "The #{field} value is not valid. It must not be a boolean."
377
+ end
378
+ end
379
+
380
+ # Returns true if the value is true or false.
381
+ #
382
+ # @param value [Object] The value to check.
383
+ #
384
+ # @return [Boolean]
385
+ def boolean?(value)
386
+ [true, false].include?(value)
387
+ end
388
+ module_function :boolean?
389
+ # rubocop:enable Metrics/ModuleLength
198
390
  end
199
391
  end
200
- # rubocop:enable Metrics/ModuleLength
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Minfraud
4
4
  # The Gem version.
5
- VERSION = '2.9.0'
5
+ VERSION = '2.11.0'
6
6
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minfraud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kushnir.yb
8
8
  - William Storey
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
11
  date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
@@ -14,16 +14,22 @@ dependencies:
14
14
  name: connection_pool
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '4.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '4.0'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: http
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -33,7 +39,7 @@ dependencies:
33
39
  version: '4.3'
34
40
  - - "<"
35
41
  - !ruby/object:Gem::Version
36
- version: '6.0'
42
+ version: '7.0'
37
43
  type: :runtime
38
44
  prerelease: false
39
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,21 +49,21 @@ dependencies:
43
49
  version: '4.3'
44
50
  - - "<"
45
51
  - !ruby/object:Gem::Version
46
- version: '6.0'
52
+ version: '7.0'
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: maxmind-geoip2
49
55
  requirement: !ruby/object:Gem::Requirement
50
56
  requirements:
51
57
  - - "~>"
52
58
  - !ruby/object:Gem::Version
53
- version: '1.4'
59
+ version: '1.7'
54
60
  type: :runtime
55
61
  prerelease: false
56
62
  version_requirements: !ruby/object:Gem::Requirement
57
63
  requirements:
58
64
  - - "~>"
59
65
  - !ruby/object:Gem::Version
60
- version: '1.4'
66
+ version: '1.7'
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: simpleidn
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -210,18 +216,9 @@ executables: []
210
216
  extensions: []
211
217
  extra_rdoc_files: []
212
218
  files:
213
- - ".rspec"
214
- - ".rubocop.yml"
215
219
  - CHANGELOG.md
216
- - CLAUDE.md
217
- - CODE_OF_CONDUCT.md
218
- - Gemfile
219
220
  - LICENSE.txt
220
- - README.dev.md
221
221
  - README.md
222
- - Rakefile
223
- - bin/console
224
- - bin/setup
225
222
  - lib/minfraud.rb
226
223
  - lib/minfraud/assessments.rb
227
224
  - lib/minfraud/components/account.rb
@@ -271,12 +268,16 @@ files:
271
268
  - lib/minfraud/resolver.rb
272
269
  - lib/minfraud/validates.rb
273
270
  - lib/minfraud/version.rb
274
- - minfraud.gemspec
275
271
  homepage: https://github.com/maxmind/minfraud-api-ruby
276
272
  licenses:
277
273
  - MIT
278
274
  metadata:
275
+ bug_tracker_uri: https://github.com/maxmind/minfraud-api-ruby/issues
276
+ changelog_uri: https://github.com/maxmind/minfraud-api-ruby/blob/main/CHANGELOG.md
277
+ documentation_uri: https://www.rubydoc.info/gems/minfraud
278
+ homepage_uri: https://github.com/maxmind/minfraud-api-ruby
279
279
  rubygems_mfa_required: 'true'
280
+ source_code_uri: https://github.com/maxmind/minfraud-api-ruby
280
281
  rdoc_options: []
281
282
  require_paths:
282
283
  - lib
@@ -291,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
292
  - !ruby/object:Gem::Version
292
293
  version: '0'
293
294
  requirements: []
294
- rubygems_version: 3.6.9
295
+ rubygems_version: 4.0.20
295
296
  specification_version: 4
296
297
  summary: Ruby API for the minFraud Score, Insights, Factors, and Report Transactions
297
298
  services
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,113 +0,0 @@
1
- plugins:
2
- - rubocop-performance
3
- - rubocop-rake
4
- - rubocop-rspec
5
- - rubocop-thread_safety
6
-
7
- AllCops:
8
- TargetRubyVersion: '3.2'
9
- NewCops: enable
10
-
11
- # Metrics.
12
-
13
- Metrics/BlockLength:
14
- Enabled: false # Default is true, but mostly hit in tests.
15
-
16
- Metrics/AbcSize:
17
- Enabled: false # To allow for pre-existing code.
18
-
19
- Metrics/ClassLength:
20
- Enabled: false # To allow for pre-existing code.
21
-
22
- Metrics/CyclomaticComplexity:
23
- Enabled: false # To allow for pre-existing code.
24
-
25
- Metrics/MethodLength:
26
- Enabled: false # To allow for pre-existing code.
27
-
28
- Metrics/PerceivedComplexity:
29
- Enabled: false # To allow for pre-existing code.
30
-
31
- # Layout.
32
-
33
- Layout/LineLength:
34
- Max: 150 # Default is 120.
35
-
36
- Layout/HashAlignment:
37
- EnforcedHashRocketStyle: table # Default is key.
38
- EnforcedColonStyle: table # Default is key.
39
-
40
- Layout/ExtraSpacing:
41
- ForceEqualSignAlignment: true # Default is false.
42
-
43
- Layout/IndentationStyle:
44
- IndentationWidth: 2 # Default is <none>.
45
-
46
- # Style.
47
-
48
- Style/HashSyntax:
49
- EnforcedStyle: ruby19_no_mixed_keys # Default is ruby19. This one is better.
50
-
51
- Style/CollectionMethods:
52
- Enabled: true # Default is false.
53
-
54
- Style/NumericLiterals:
55
- MinDigits: 4 # Default is 5.
56
-
57
- Style/NegatedIf: # I disagree with this.
58
- Enabled: false
59
-
60
- Style/IfUnlessModifier: # This doesn't always make sense.
61
- Enabled: false
62
-
63
- # Trailing commas are often good.
64
- Style/TrailingCommaInArguments:
65
- Enabled: false
66
- Style/TrailingCommaInArrayLiteral:
67
- Enabled: false
68
- Style/TrailingCommaInHashLiteral:
69
- Enabled: false
70
-
71
- # Default is both which is probably fine, but it changes code and I don't want
72
- # to investigate any possible behavior change right now.
73
- Style/EmptyElse:
74
- EnforcedStyle: empty
75
-
76
- Style/ConditionalAssignment:
77
- Enabled: false # This produces kind of strange results.
78
-
79
- Style/GuardClause:
80
- Enabled: false # Doesn't always make sense.
81
-
82
- Style/FormatStringToken:
83
- Enabled: false # Seems unnecessary.
84
-
85
- # Seems unnecessary. Asks us to call super in a bunch of places when there's no
86
- # need.
87
- Lint/MissingSuper:
88
- Enabled: false
89
-
90
- # Naming.
91
-
92
- Naming/VariableNumber:
93
- Enabled: false # Doesn't always make sense.
94
-
95
- Gemspec/DevelopmentDependencies:
96
- Enabled: false
97
-
98
- # This might make sense, but I don't think it's worth moving things around for.
99
- RSpec/SpecFilePathFormat:
100
- Enabled: false
101
- # Sometimes it makes sense to have lots of assertions.
102
- RSpec/MultipleExpectations:
103
- Enabled: false
104
- # Sometimes it makes sense to have long tests.
105
- RSpec/ExampleLength:
106
- Enabled: false
107
- # This seems okay.
108
- RSpec/MultipleDescribes:
109
- Enabled: false
110
- # This seems to give a bunch of false positives. Specifically it's flagging
111
- # things where we are creating an object and checking no exception happens.
112
- RSpec/NoExpectationExample:
113
- Enabled: false