authlogic 3.8.0 → 4.5.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 (143) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
  3. data/.github/ISSUE_TEMPLATE/feature_proposal.md +32 -0
  4. data/.github/triage.md +86 -0
  5. data/.gitignore +4 -3
  6. data/.rubocop.yml +109 -9
  7. data/.rubocop_todo.yml +38 -355
  8. data/.travis.yml +11 -35
  9. data/CHANGELOG.md +345 -2
  10. data/CONTRIBUTING.md +45 -14
  11. data/Gemfile +3 -2
  12. data/README.md +244 -90
  13. data/Rakefile +10 -10
  14. data/UPGRADING.md +22 -0
  15. data/authlogic.gemspec +34 -21
  16. data/doc/use_normal_rails_validation.md +82 -0
  17. data/gemfiles/Gemfile.rails-4.2.x +6 -0
  18. data/{test/gemfiles → gemfiles}/Gemfile.rails-5.1.x +2 -2
  19. data/{test/gemfiles → gemfiles}/Gemfile.rails-5.2.x +2 -2
  20. data/lib/authlogic/acts_as_authentic/base.rb +36 -24
  21. data/lib/authlogic/acts_as_authentic/email.rb +65 -31
  22. data/lib/authlogic/acts_as_authentic/logged_in_status.rb +14 -9
  23. data/lib/authlogic/acts_as_authentic/login.rb +61 -45
  24. data/lib/authlogic/acts_as_authentic/magic_columns.rb +6 -6
  25. data/lib/authlogic/acts_as_authentic/password.rb +267 -146
  26. data/lib/authlogic/acts_as_authentic/perishable_token.rb +24 -19
  27. data/lib/authlogic/acts_as_authentic/persistence_token.rb +10 -15
  28. data/lib/authlogic/acts_as_authentic/queries/find_with_case.rb +67 -0
  29. data/lib/authlogic/acts_as_authentic/restful_authentication.rb +50 -14
  30. data/lib/authlogic/acts_as_authentic/session_maintenance.rb +88 -60
  31. data/lib/authlogic/acts_as_authentic/single_access_token.rb +23 -11
  32. data/lib/authlogic/acts_as_authentic/validations_scope.rb +9 -6
  33. data/lib/authlogic/authenticates_many/association.rb +7 -7
  34. data/lib/authlogic/authenticates_many/base.rb +37 -21
  35. data/lib/authlogic/config.rb +21 -10
  36. data/lib/authlogic/controller_adapters/abstract_adapter.rb +38 -11
  37. data/lib/authlogic/controller_adapters/rack_adapter.rb +9 -5
  38. data/lib/authlogic/controller_adapters/rails_adapter.rb +12 -7
  39. data/lib/authlogic/controller_adapters/sinatra_adapter.rb +2 -2
  40. data/lib/authlogic/crypto_providers/aes256.rb +37 -32
  41. data/lib/authlogic/crypto_providers/bcrypt.rb +21 -15
  42. data/lib/authlogic/crypto_providers/md5.rb +4 -2
  43. data/lib/authlogic/crypto_providers/scrypt.rb +22 -17
  44. data/lib/authlogic/crypto_providers/sha1.rb +11 -5
  45. data/lib/authlogic/crypto_providers/sha256.rb +13 -9
  46. data/lib/authlogic/crypto_providers/sha512.rb +0 -21
  47. data/lib/authlogic/crypto_providers/wordpress.rb +32 -3
  48. data/lib/authlogic/crypto_providers.rb +91 -0
  49. data/lib/authlogic/i18n.rb +26 -19
  50. data/lib/authlogic/random.rb +10 -28
  51. data/lib/authlogic/regex.rb +59 -28
  52. data/lib/authlogic/session/activation.rb +10 -7
  53. data/lib/authlogic/session/active_record_trickery.rb +13 -9
  54. data/lib/authlogic/session/base.rb +15 -4
  55. data/lib/authlogic/session/brute_force_protection.rb +40 -33
  56. data/lib/authlogic/session/callbacks.rb +94 -46
  57. data/lib/authlogic/session/cookies.rb +130 -45
  58. data/lib/authlogic/session/existence.rb +21 -11
  59. data/lib/authlogic/session/foundation.rb +64 -14
  60. data/lib/authlogic/session/http_auth.rb +35 -28
  61. data/lib/authlogic/session/id.rb +9 -4
  62. data/lib/authlogic/session/klass.rb +15 -12
  63. data/lib/authlogic/session/magic_columns.rb +58 -55
  64. data/lib/authlogic/session/magic_states.rb +25 -19
  65. data/lib/authlogic/session/params.rb +42 -28
  66. data/lib/authlogic/session/password.rb +130 -120
  67. data/lib/authlogic/session/perishable_token.rb +5 -4
  68. data/lib/authlogic/session/persistence.rb +18 -12
  69. data/lib/authlogic/session/priority_record.rb +15 -12
  70. data/lib/authlogic/session/scopes.rb +51 -32
  71. data/lib/authlogic/session/session.rb +38 -28
  72. data/lib/authlogic/session/timeout.rb +13 -13
  73. data/lib/authlogic/session/unauthorized_record.rb +18 -13
  74. data/lib/authlogic/session/validation.rb +9 -9
  75. data/lib/authlogic/test_case/mock_controller.rb +5 -4
  76. data/lib/authlogic/test_case/mock_cookie_jar.rb +47 -3
  77. data/lib/authlogic/test_case/mock_request.rb +6 -3
  78. data/lib/authlogic/test_case/rails_request_adapter.rb +3 -2
  79. data/lib/authlogic/test_case.rb +70 -2
  80. data/lib/authlogic/version.rb +21 -0
  81. data/lib/authlogic.rb +51 -49
  82. data/test/acts_as_authentic_test/base_test.rb +3 -1
  83. data/test/acts_as_authentic_test/email_test.rb +43 -42
  84. data/test/acts_as_authentic_test/logged_in_status_test.rb +6 -4
  85. data/test/acts_as_authentic_test/login_test.rb +77 -80
  86. data/test/acts_as_authentic_test/magic_columns_test.rb +3 -1
  87. data/test/acts_as_authentic_test/password_test.rb +51 -37
  88. data/test/acts_as_authentic_test/perishable_token_test.rb +13 -5
  89. data/test/acts_as_authentic_test/persistence_token_test.rb +7 -1
  90. data/test/acts_as_authentic_test/restful_authentication_test.rb +14 -3
  91. data/test/acts_as_authentic_test/session_maintenance_test.rb +69 -15
  92. data/test/acts_as_authentic_test/single_access_test.rb +3 -1
  93. data/test/adapter_test.rb +23 -0
  94. data/test/authenticates_many_test.rb +3 -1
  95. data/test/config_test.rb +11 -9
  96. data/test/crypto_provider_test/aes256_test.rb +3 -1
  97. data/test/crypto_provider_test/bcrypt_test.rb +3 -1
  98. data/test/crypto_provider_test/scrypt_test.rb +3 -1
  99. data/test/crypto_provider_test/sha1_test.rb +3 -1
  100. data/test/crypto_provider_test/sha256_test.rb +3 -1
  101. data/test/crypto_provider_test/sha512_test.rb +3 -1
  102. data/test/crypto_provider_test/wordpress_test.rb +26 -0
  103. data/test/fixtures/companies.yml +2 -2
  104. data/test/fixtures/employees.yml +1 -1
  105. data/test/i18n_test.rb +6 -4
  106. data/test/libs/affiliate.rb +2 -0
  107. data/test/libs/company.rb +4 -2
  108. data/test/libs/employee.rb +2 -0
  109. data/test/libs/employee_session.rb +2 -0
  110. data/test/libs/ldaper.rb +2 -0
  111. data/test/libs/project.rb +2 -0
  112. data/test/libs/user.rb +2 -0
  113. data/test/libs/user_session.rb +4 -2
  114. data/test/random_test.rb +10 -38
  115. data/test/session_test/activation_test.rb +3 -1
  116. data/test/session_test/active_record_trickery_test.rb +7 -4
  117. data/test/session_test/brute_force_protection_test.rb +11 -9
  118. data/test/session_test/callbacks_test.rb +12 -4
  119. data/test/session_test/cookies_test.rb +48 -5
  120. data/test/session_test/existence_test.rb +18 -5
  121. data/test/session_test/foundation_test.rb +19 -1
  122. data/test/session_test/http_auth_test.rb +11 -7
  123. data/test/session_test/id_test.rb +3 -1
  124. data/test/session_test/klass_test.rb +3 -1
  125. data/test/session_test/magic_columns_test.rb +13 -13
  126. data/test/session_test/magic_states_test.rb +3 -1
  127. data/test/session_test/params_test.rb +13 -5
  128. data/test/session_test/password_test.rb +10 -8
  129. data/test/session_test/perishability_test.rb +3 -1
  130. data/test/session_test/persistence_test.rb +4 -1
  131. data/test/session_test/scopes_test.rb +16 -8
  132. data/test/session_test/session_test.rb +6 -4
  133. data/test/session_test/timeout_test.rb +4 -2
  134. data/test/session_test/unauthorized_record_test.rb +4 -2
  135. data/test/session_test/validation_test.rb +3 -1
  136. data/test/test_helper.rb +84 -45
  137. metadata +87 -73
  138. data/.github/ISSUE_TEMPLATE.md +0 -13
  139. data/test/gemfiles/Gemfile.rails-3.2.x +0 -7
  140. data/test/gemfiles/Gemfile.rails-4.0.x +0 -7
  141. data/test/gemfiles/Gemfile.rails-4.1.x +0 -7
  142. data/test/gemfiles/Gemfile.rails-4.2.x +0 -7
  143. data/test/gemfiles/Gemfile.rails-5.0.x +0 -6
data/.rubocop_todo.yml CHANGED
@@ -1,391 +1,74 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-07-18 00:47:31 -0400 using RuboCop version 0.41.2.
3
+ # on 2018-05-22 23:50:03 -0400 using RuboCop version 0.56.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
- Lint/AmbiguousOperator:
10
- Exclude:
11
- - 'lib/authlogic/acts_as_authentic/password.rb'
12
- - 'lib/authlogic/session/callbacks.rb'
13
-
14
- # Configuration parameters: AllowSafeAssignment.
15
- Lint/AssignmentInCondition:
16
- Exclude:
17
- - 'lib/authlogic/test_case/mock_cookie_jar.rb'
18
-
19
- # Cop supports --auto-correct.
20
- # Configuration parameters: AlignWith, SupportedStyles.
21
- # SupportedStyles: either, start_of_block, start_of_line
22
- Lint/BlockAlignment:
23
- Exclude:
24
- - 'lib/authlogic.rb'
25
-
26
- # Cop supports --auto-correct.
27
- # Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
28
- # SupportedStyles: keyword, variable, start_of_line
29
- Lint/EndAlignment:
30
- Exclude:
31
- - 'lib/authlogic/acts_as_authentic/login.rb'
32
- - 'lib/authlogic/session/scopes.rb'
33
-
34
- Lint/Loop:
35
- Exclude:
36
- - 'lib/authlogic/acts_as_authentic/persistence_token.rb'
37
-
38
- Lint/ShadowingOuterLocalVariable:
39
- Exclude:
40
- - 'lib/authlogic/session/cookies.rb'
41
- - 'lib/authlogic/session/password.rb'
42
-
43
- # Cop supports --auto-correct.
44
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
45
- Lint/UnusedBlockArgument:
46
- Exclude:
47
- - 'lib/authlogic/crypto_providers/wordpress.rb'
48
- - 'lib/authlogic/random.rb'
49
- - 'lib/authlogic/session/callbacks.rb'
50
-
51
- # Cop supports --auto-correct.
52
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
53
- Lint/UnusedMethodArgument:
54
- Exclude:
55
- - 'lib/authlogic/acts_as_authentic/base.rb'
56
- - 'lib/authlogic/acts_as_authentic/password.rb'
57
- - 'lib/authlogic/session/activation.rb'
58
- - 'lib/authlogic/session/active_record_trickery.rb'
59
- - 'lib/authlogic/session/existence.rb'
60
- - 'lib/authlogic/session/scopes.rb'
61
- - 'lib/authlogic/test_case/mock_controller.rb'
62
- - 'lib/authlogic/test_case/mock_cookie_jar.rb'
63
- - 'test/i18n_test.rb'
64
- - 'test/test_helper.rb'
65
-
66
- Lint/UselessAccessModifier:
67
- Exclude:
68
- - 'lib/authlogic/acts_as_authentic/password.rb'
69
-
9
+ # Offense count: 10
70
10
  Metrics/AbcSize:
71
- Max: 82
72
-
73
- Metrics/ClassLength:
74
- Enabled: false
75
-
76
- Metrics/CyclomaticComplexity:
77
- Max: 12
78
-
79
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
80
- # URISchemes: http, https
81
- Metrics/LineLength:
82
- Max: 130
83
-
84
- Metrics/ModuleLength:
85
- Enabled: false
86
-
87
- Metrics/PerceivedComplexity:
88
- Max: 13
89
-
90
- # Cop supports --auto-correct.
91
- Performance/RedundantBlockCall:
92
- Exclude:
93
- - 'lib/authlogic/controller_adapters/abstract_adapter.rb'
94
-
95
- Style/AccessorMethodName:
96
- Exclude:
97
- - 'lib/authlogic/acts_as_authentic/session_maintenance.rb'
98
- - 'test/test_helper.rb'
11
+ Max: 18.5
99
12
 
13
+ # Offense count: 59
100
14
  # Cop supports --auto-correct.
101
- # Configuration parameters: EnforcedStyle, SupportedStyles.
15
+ # Configuration parameters: EnforcedStyle.
102
16
  # SupportedStyles: prefer_alias, prefer_alias_method
103
17
  Style/Alias:
104
18
  Enabled: false
105
19
 
106
- # Cop supports --auto-correct.
107
- Style/AlignArray:
108
- Exclude:
109
- - 'test/acts_as_authentic_test/email_test.rb'
110
-
111
- # Cop supports --auto-correct.
112
- # Configuration parameters: EnforcedStyle, SupportedStyles.
113
- # SupportedStyles: always, conditionals
114
- Style/AndOr:
115
- Exclude:
116
- - 'lib/authlogic/controller_adapters/abstract_adapter.rb'
117
- - 'test/acts_as_authentic_test/password_test.rb'
118
-
119
- # Cop supports --auto-correct.
120
- # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
121
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
122
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
123
- # FunctionalMethods: let, let!, subject, watch
124
- # IgnoredMethods: lambda, proc, it
125
- Style/BlockDelimiters:
126
- Exclude:
127
- - 'test/config_test.rb'
128
-
129
- # Cop supports --auto-correct.
130
- # Configuration parameters: EnforcedStyle, SupportedStyles.
131
- # SupportedStyles: braces, no_braces, context_dependent
132
- Style/BracesAroundHashParameters:
133
- Exclude:
134
- - 'lib/authlogic/acts_as_authentic/email.rb'
135
- - 'lib/authlogic/acts_as_authentic/login.rb'
136
- - 'lib/authlogic/acts_as_authentic/password.rb'
137
- - 'lib/authlogic/session/active_record_trickery.rb'
138
- - 'test/acts_as_authentic_test/email_test.rb'
139
- - 'test/acts_as_authentic_test/login_test.rb'
140
-
141
- # Configuration parameters: EnforcedStyle, SupportedStyles.
142
- # SupportedStyles: nested, compact
143
- Style/ClassAndModuleChildren:
144
- Exclude:
145
- - 'test/test_helper.rb'
146
-
147
- # Cop supports --auto-correct.
148
- # Configuration parameters: EnforcedStyle, SupportedStyles.
149
- # SupportedStyles: is_a?, kind_of?
150
- Style/ClassCheck:
151
- Exclude:
152
- - 'test/acts_as_authentic_test/email_test.rb'
153
-
20
+ # Offense count: 5
154
21
  Style/ClassVars:
155
22
  Exclude:
156
23
  - 'lib/authlogic/i18n.rb'
157
24
 
158
- # Cop supports --auto-correct.
159
- # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
160
- # SupportedStyles: assign_to_condition, assign_inside_condition
161
- Style/ConditionalAssignment:
162
- Enabled: false
163
-
164
- Style/ConstantName:
165
- Exclude:
166
- - 'lib/authlogic/random.rb'
167
-
25
+ # Offense count: 22
168
26
  Style/Documentation:
169
- Enabled: false
170
-
171
- # Cop supports --auto-correct.
172
- Style/ElseAlignment:
173
- Exclude:
174
- - 'lib/authlogic/acts_as_authentic/login.rb'
175
- - 'lib/authlogic/session/scopes.rb'
176
-
177
- # Cop supports --auto-correct.
178
- # Configuration parameters: EnforcedStyle, SupportedStyles.
179
- # SupportedStyles: empty, nil, both
180
- Style/EmptyElse:
181
- Exclude:
182
- - 'lib/authlogic/session/persistence.rb'
183
-
184
- # Cop supports --auto-correct.
185
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
186
- Style/ExtraSpacing:
187
- Exclude:
188
- - 'test/acts_as_authentic_test/email_test.rb'
189
-
190
- # Cop supports --auto-correct.
191
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
192
- # SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
193
- Style/FirstParameterIndentation:
194
- Exclude:
195
- - 'lib/authlogic/session/brute_force_protection.rb'
196
-
197
- # Cop supports --auto-correct.
198
- # Configuration parameters: EnforcedStyle, SupportedStyles.
199
- # SupportedStyles: when_needed, always
200
- Style/FrozenStringLiteralComment:
201
- Enabled: false
202
-
203
- # Configuration parameters: MinBodyLength.
204
- Style/GuardClause:
205
- Enabled: false
206
-
207
- # Cop supports --auto-correct.
208
- # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
209
- # SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
210
- Style/HashSyntax:
211
- Enabled: false
212
-
213
- # Cop supports --auto-correct.
214
- # Configuration parameters: MaxLineLength.
215
- Style/IfUnlessModifier:
216
27
  Exclude:
217
- - 'test/test_helper.rb'
28
+ # Permanent
29
+ - 'test/**/*'
218
30
 
219
- # Cop supports --auto-correct.
220
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
221
- # SupportedStyles: special_inside_parentheses, consistent, align_brackets
222
- Style/IndentArray:
223
- Exclude:
224
- - 'lib/authlogic.rb'
225
-
226
- # Cop supports --auto-correct.
227
- # Configuration parameters: IndentationWidth.
228
- Style/IndentAssignment:
229
- Exclude:
230
- - 'lib/authlogic/session/password.rb'
231
-
232
- # Cop supports --auto-correct.
233
- # Configuration parameters: EnforcedStyle, SupportedStyles.
234
- # SupportedStyles: normal, rails
235
- Style/IndentationConsistency:
236
- Enabled: false
237
-
238
- # Cop supports --auto-correct.
239
- # Configuration parameters: Width.
240
- Style/IndentationWidth:
241
- Exclude:
242
- - 'lib/authlogic/acts_as_authentic/login.rb'
243
- - 'lib/authlogic/session/scopes.rb'
244
- - 'test/session_test/callbacks_test.rb'
245
-
246
- # Cop supports --auto-correct.
247
- # Configuration parameters: EnforcedStyle, SupportedStyles.
248
- # SupportedStyles: line_count_dependent, lambda, literal
249
- Style/Lambda:
250
- Exclude:
251
- - 'lib/authlogic/acts_as_authentic/logged_in_status.rb'
252
-
253
- # Configuration parameters: EnforcedStyle, SupportedStyles.
254
- # SupportedStyles: module_function, extend_self
255
- Style/ModuleFunction:
256
- Exclude:
257
- - 'lib/authlogic/random.rb'
258
-
259
- Style/MultilineOperationIndentation:
260
- Enabled: false
261
-
262
- Style/MultilineTernaryOperator:
263
- Exclude:
264
- - 'lib/authlogic/acts_as_authentic/password.rb'
265
- - 'lib/authlogic/session/password.rb'
266
- - 'lib/authlogic/session/session.rb'
267
-
268
- # Cop supports --auto-correct.
269
- Style/MutableConstant:
270
- Exclude:
271
- - 'lib/authlogic/acts_as_authentic/password.rb'
272
- - 'lib/authlogic/crypto_providers/scrypt.rb'
273
- - 'lib/authlogic/crypto_providers/wordpress.rb'
274
- - 'lib/authlogic/session/callbacks.rb'
275
- - 'test/acts_as_authentic_test/email_test.rb'
276
- - 'test/acts_as_authentic_test/logged_in_status_test.rb'
277
-
278
- # Cop supports --auto-correct.
279
- Style/NegatedIf:
280
- Exclude:
281
- - 'lib/authlogic/acts_as_authentic/base.rb'
282
- - 'lib/authlogic/acts_as_authentic/logged_in_status.rb'
283
- - 'lib/authlogic/acts_as_authentic/perishable_token.rb'
284
- - 'lib/authlogic/acts_as_authentic/restful_authentication.rb'
285
- - 'lib/authlogic/acts_as_authentic/single_access_token.rb'
31
+ # TODO
32
+ - 'lib/authlogic/config.rb'
33
+ - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
34
+ - 'lib/authlogic/crypto_providers.rb'
35
+ - 'lib/authlogic/i18n/translator.rb'
36
+ - 'lib/authlogic/session/activation.rb'
286
37
  - 'lib/authlogic/session/active_record_trickery.rb'
287
- - 'lib/authlogic/session/cookies.rb'
38
+ - 'lib/authlogic/session/existence.rb'
39
+ - 'lib/authlogic/session/foundation.rb'
288
40
  - 'lib/authlogic/session/klass.rb'
289
- - 'lib/authlogic/session/params.rb'
290
- - 'lib/authlogic/session/password.rb'
291
41
  - 'lib/authlogic/session/persistence.rb'
42
+ - 'lib/authlogic/session/scopes.rb'
43
+ - 'lib/authlogic/test_case.rb'
44
+ - 'lib/authlogic/test_case/mock_cookie_jar.rb'
45
+ - 'lib/authlogic/version.rb'
292
46
 
293
- # Cop supports --auto-correct.
294
- # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
295
- # SupportedStyles: skip_modifier_ifs, always
296
- Style/Next:
297
- Enabled: false
298
-
299
- # Cop supports --auto-correct.
300
- Style/Not:
47
+ Style/FrozenStringLiteralComment:
301
48
  Exclude:
302
- - 'lib/authlogic/acts_as_authentic/login.rb'
49
+ # Freezing strings in lib would be a breaking change. We'll have to wait
50
+ # for the next major version.
51
+ - lib/**/*
303
52
 
304
- # Cop supports --auto-correct.
305
- Style/ParallelAssignment:
53
+ # Offense count: 4
54
+ Style/MethodMissingSuper:
306
55
  Exclude:
307
- - 'test/random_test.rb'
56
+ - 'lib/authlogic/controller_adapters/abstract_adapter.rb'
57
+ - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
58
+ - 'lib/authlogic/test_case/mock_request.rb'
308
59
 
309
- # Cop supports --auto-correct.
310
- # Configuration parameters: AllowSafeAssignment.
311
- Style/ParenthesesAroundCondition:
60
+ # Offense count: 3
61
+ Style/MissingRespondToMissing:
312
62
  Exclude:
313
- - 'test/test_helper.rb'
63
+ - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
64
+ - 'lib/authlogic/test_case/mock_request.rb'
314
65
 
315
- # Cop supports --auto-correct.
316
- # Configuration parameters: PreferredDelimiters.
317
- Style/PercentLiteralDelimiters:
318
- Exclude:
319
- - 'authlogic.gemspec'
320
-
321
- # Cop supports --auto-correct.
322
- Style/Proc:
323
- Exclude:
324
- - 'lib/authlogic/acts_as_authentic/email.rb'
325
- - 'lib/authlogic/session/http_auth.rb'
326
- - 'test/acts_as_authentic_test/email_test.rb'
66
+ Style/NumericPredicate:
67
+ Enabled: false
327
68
 
69
+ # Offense count: 10
328
70
  # Cop supports --auto-correct.
329
- # Configuration parameters: SupportedStyles.
71
+ # Configuration parameters: .
330
72
  # SupportedStyles: compact, exploded
331
73
  Style/RaiseArgs:
332
74
  EnforcedStyle: compact
333
-
334
- # Cop supports --auto-correct.
335
- Style/RedundantBegin:
336
- Exclude:
337
- - 'lib/authlogic/acts_as_authentic/base.rb'
338
- - 'lib/authlogic/crypto_providers/bcrypt.rb'
339
- - 'lib/authlogic/crypto_providers/scrypt.rb'
340
-
341
- # Cop supports --auto-correct.
342
- # Configuration parameters: AllowMultipleReturnValues.
343
- Style/RedundantReturn:
344
- Exclude:
345
- - 'lib/authlogic/acts_as_authentic/session_maintenance.rb'
346
- - 'test/libs/user_session.rb'
347
-
348
- # Cop supports --auto-correct.
349
- Style/RedundantSelf:
350
- Exclude:
351
- - 'lib/authlogic/acts_as_authentic/perishable_token.rb'
352
- - 'lib/authlogic/acts_as_authentic/restful_authentication.rb'
353
- - 'lib/authlogic/controller_adapters/rack_adapter.rb'
354
-
355
- # Cop supports --auto-correct.
356
- Style/RescueModifier:
357
- Exclude:
358
- - 'lib/authlogic/acts_as_authentic/session_maintenance.rb'
359
-
360
- # Cop supports --auto-correct.
361
- # Configuration parameters: SupportedStyles.
362
- # SupportedStyles: use_perl_names, use_english_names
363
- Style/SpecialGlobalVars:
364
- EnforcedStyle: use_perl_names
365
-
366
- # Cop supports --auto-correct.
367
- # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
368
- # SupportedStyles: single_quotes, double_quotes
369
- Style/StringLiterals:
370
- Enabled: false
371
-
372
- # Cop supports --auto-correct.
373
- # Configuration parameters: EnforcedStyle, SupportedStyles.
374
- # SupportedStyles: single_quotes, double_quotes
375
- Style/StringLiteralsInInterpolation:
376
- Exclude:
377
- - 'lib/authlogic/authenticates_many/base.rb'
378
- - 'lib/authlogic/session/foundation.rb'
379
-
380
- # Cop supports --auto-correct.
381
- # Configuration parameters: IgnoredMethods.
382
- # IgnoredMethods: respond_to, define_method
383
- Style/SymbolProc:
384
- Exclude:
385
- - 'lib/authlogic/acts_as_authentic/persistence_token.rb'
386
-
387
- # Cop supports --auto-correct.
388
- # Configuration parameters: SupportedStyles, MinSize, WordRegex.
389
- # SupportedStyles: percent, brackets
390
- Style/WordArray:
391
- EnforcedStyle: brackets
data/.travis.yml CHANGED
@@ -1,48 +1,24 @@
1
1
  language: ruby
2
-
3
- # cache: bundler
4
- # We would like to enable travis' bundler cache (cache: bundler) but for some reason
5
- # travis installs our bundle under the test directory (test/vendor/bundle/*) and, as a
6
- # result, travis tries to run all of the tests of all of our dependencies!
7
- # TODO: There's probably a way to configure the bundle path
2
+ cache: bundler
8
3
 
9
4
  before_install:
5
+ - gem update --system
10
6
  - gem update bundler
11
7
 
8
+ # We only test the oldest and the newest ruby versions that we support. We
9
+ # do not test intermediate versions.
12
10
  rvm:
13
- - 1.9.3
14
- - 2.1.10
15
- - 2.2.6
16
- - 2.3.3
11
+ - 2.3.7
12
+ - 2.5.1
17
13
 
14
+ # We only test living versions of rails, per the [rails maintenance
15
+ # policy](http://guides.rubyonrails.org/maintenance_policy.html)
18
16
  gemfile:
19
- - test/gemfiles/Gemfile.rails-3.2.x
20
- - test/gemfiles/Gemfile.rails-4.0.x
21
- - test/gemfiles/Gemfile.rails-4.1.x
22
- - test/gemfiles/Gemfile.rails-4.2.x
23
- - test/gemfiles/Gemfile.rails-5.0.x
24
- - test/gemfiles/Gemfile.rails-5.1.x
17
+ - gemfiles/Gemfile.rails-4.2.x
18
+ - gemfiles/Gemfile.rails-5.1.x
19
+ - gemfiles/Gemfile.rails-5.2.x
25
20
 
26
21
  matrix:
27
- exclude:
28
- - rvm: 1.9.3
29
- gemfile: test/gemfiles/Gemfile.rails-4.1.x
30
- - rvm: 1.9.3
31
- gemfile: test/gemfiles/Gemfile.rails-5.0.x
32
- - rvm: 1.9.3
33
- gemfile: test/gemfiles/Gemfile.rails-5.1.x
34
- - rvm: 1.9.3
35
- gemfile: test/gemfiles/Gemfile.rails-5.2.x
36
- - rvm: 2.1.10
37
- gemfile: test/gemfiles/Gemfile.rails-5.0.x
38
- - rvm: 2.1.10
39
- gemfile: test/gemfiles/Gemfile.rails-5.1.x
40
- - rvm: 2.1.10
41
- gemfile: test/gemfiles/Gemfile.rails-5.2.x
42
- - rvm: 2.2.6
43
- gemfile: test/gemfiles/Gemfile.rails-3.2.x
44
- - rvm: 2.3.3
45
- gemfile: test/gemfiles/Gemfile.rails-3.2.x
46
22
  fast_finish: true
47
23
 
48
24
  sudo: false