authlogic 3.8.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/.github/triage.md +87 -0
  3. data/.gitignore +2 -1
  4. data/.rubocop.yml +62 -6
  5. data/.rubocop_todo.yml +51 -267
  6. data/.travis.yml +4 -26
  7. data/CHANGELOG.md +226 -2
  8. data/CONTRIBUTING.md +15 -5
  9. data/Gemfile +2 -2
  10. data/README.md +183 -91
  11. data/Rakefile +1 -1
  12. data/UPGRADING.md +20 -0
  13. data/authlogic.gemspec +25 -16
  14. data/lib/authlogic.rb +45 -45
  15. data/lib/authlogic/acts_as_authentic/base.rb +18 -11
  16. data/lib/authlogic/acts_as_authentic/email.rb +32 -28
  17. data/lib/authlogic/acts_as_authentic/logged_in_status.rb +1 -1
  18. data/lib/authlogic/acts_as_authentic/login.rb +32 -42
  19. data/lib/authlogic/acts_as_authentic/magic_columns.rb +6 -6
  20. data/lib/authlogic/acts_as_authentic/password.rb +53 -31
  21. data/lib/authlogic/acts_as_authentic/perishable_token.rb +18 -17
  22. data/lib/authlogic/acts_as_authentic/persistence_token.rb +7 -12
  23. data/lib/authlogic/acts_as_authentic/queries/find_with_case.rb +64 -0
  24. data/lib/authlogic/acts_as_authentic/restful_authentication.rb +11 -3
  25. data/lib/authlogic/acts_as_authentic/session_maintenance.rb +30 -10
  26. data/lib/authlogic/acts_as_authentic/single_access_token.rb +4 -4
  27. data/lib/authlogic/authenticates_many/association.rb +3 -3
  28. data/lib/authlogic/authenticates_many/base.rb +2 -2
  29. data/lib/authlogic/config.rb +0 -1
  30. data/lib/authlogic/controller_adapters/abstract_adapter.rb +11 -4
  31. data/lib/authlogic/controller_adapters/rack_adapter.rb +7 -3
  32. data/lib/authlogic/controller_adapters/rails_adapter.rb +2 -0
  33. data/lib/authlogic/crypto_providers/aes256.rb +1 -1
  34. data/lib/authlogic/crypto_providers/bcrypt.rb +1 -1
  35. data/lib/authlogic/crypto_providers/scrypt.rb +6 -6
  36. data/lib/authlogic/crypto_providers/sha1.rb +10 -5
  37. data/lib/authlogic/crypto_providers/sha256.rb +11 -8
  38. data/lib/authlogic/crypto_providers/wordpress.rb +2 -2
  39. data/lib/authlogic/i18n.rb +4 -2
  40. data/lib/authlogic/random.rb +10 -28
  41. data/lib/authlogic/regex.rb +11 -8
  42. data/lib/authlogic/session/activation.rb +6 -3
  43. data/lib/authlogic/session/active_record_trickery.rb +13 -9
  44. data/lib/authlogic/session/base.rb +15 -4
  45. data/lib/authlogic/session/brute_force_protection.rb +14 -7
  46. data/lib/authlogic/session/callbacks.rb +53 -30
  47. data/lib/authlogic/session/cookies.rb +57 -16
  48. data/lib/authlogic/session/existence.rb +21 -11
  49. data/lib/authlogic/session/foundation.rb +56 -10
  50. data/lib/authlogic/session/http_auth.rb +15 -8
  51. data/lib/authlogic/session/klass.rb +7 -5
  52. data/lib/authlogic/session/magic_columns.rb +24 -11
  53. data/lib/authlogic/session/magic_states.rb +11 -4
  54. data/lib/authlogic/session/params.rb +6 -2
  55. data/lib/authlogic/session/password.rb +46 -73
  56. data/lib/authlogic/session/persistence.rb +11 -7
  57. data/lib/authlogic/session/priority_record.rb +7 -4
  58. data/lib/authlogic/session/scopes.rb +15 -6
  59. data/lib/authlogic/session/session.rb +20 -10
  60. data/lib/authlogic/session/timeout.rb +2 -2
  61. data/lib/authlogic/session/unauthorized_record.rb +1 -1
  62. data/lib/authlogic/session/validation.rb +1 -1
  63. data/lib/authlogic/test_case.rb +65 -2
  64. data/lib/authlogic/test_case/mock_controller.rb +5 -4
  65. data/lib/authlogic/test_case/mock_cookie_jar.rb +11 -2
  66. data/lib/authlogic/test_case/mock_request.rb +5 -1
  67. data/lib/authlogic/test_case/rails_request_adapter.rb +3 -2
  68. data/lib/authlogic/version.rb +16 -0
  69. data/test/acts_as_authentic_test/email_test.rb +33 -34
  70. data/test/acts_as_authentic_test/logged_in_status_test.rb +1 -1
  71. data/test/acts_as_authentic_test/login_test.rb +73 -78
  72. data/test/acts_as_authentic_test/password_test.rb +30 -18
  73. data/test/acts_as_authentic_test/perishable_token_test.rb +9 -3
  74. data/test/acts_as_authentic_test/persistence_token_test.rb +4 -0
  75. data/test/acts_as_authentic_test/session_maintenance_test.rb +66 -14
  76. data/test/adapter_test.rb +21 -0
  77. data/test/gemfiles/Gemfile.rails-4.2.x +2 -2
  78. data/test/gemfiles/Gemfile.rails-5.0.x +2 -2
  79. data/test/gemfiles/Gemfile.rails-master +6 -0
  80. data/test/i18n_test.rb +1 -1
  81. data/test/libs/company.rb +2 -2
  82. data/test/random_test.rb +7 -37
  83. data/test/session_test/active_record_trickery_test.rb +4 -3
  84. data/test/session_test/brute_force_protection_test.rb +8 -8
  85. data/test/session_test/callbacks_test.rb +1 -1
  86. data/test/session_test/cookies_test.rb +27 -4
  87. data/test/session_test/existence_test.rb +15 -4
  88. data/test/session_test/foundation_test.rb +16 -0
  89. data/test/session_test/http_auth_test.rb +3 -1
  90. data/test/session_test/magic_columns_test.rb +10 -12
  91. data/test/session_test/params_test.rb +4 -1
  92. data/test/session_test/password_test.rb +7 -7
  93. data/test/session_test/persistence_test.rb +1 -0
  94. data/test/session_test/scopes_test.rb +7 -7
  95. data/test/session_test/session_test.rb +2 -2
  96. data/test/session_test/timeout_test.rb +1 -1
  97. data/test/session_test/unauthorized_record_test.rb +1 -1
  98. data/test/test_helper.rb +111 -103
  99. metadata +68 -64
  100. data/test/gemfiles/Gemfile.rails-3.2.x +0 -7
  101. data/test/gemfiles/Gemfile.rails-4.0.x +0 -7
  102. data/test/gemfiles/Gemfile.rails-4.1.x +0 -7
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 01513a841f9c0e5be7c9c2f641d0beaa30aef05b76ba736938343901bad249da
4
+ data.tar.gz: f4e55611a93e2f3d3957bfaf200602217949d857f01a99d05443d94ba1bf6d40
5
+ SHA512:
6
+ metadata.gz: 84ab5533d3b8e87cffc450b5de009b16537bb52119fd3049df865a39c4fb0e06c82ed0d7678f956569d51f3181fd5d9a7fbd3190dacfa66c2d010e1b2cdcdf19
7
+ data.tar.gz: a11379da2cf5d69792a7cacc8fe8efdb75e8e42fca2c690941bd9e8410f8fcb1cae9ff2c99affc721151aaa01e5a02802594d487e323063f54de45f80e593933
@@ -0,0 +1,87 @@
1
+ # Triage
2
+
3
+ Common responses to issues.
4
+
5
+ ## Usage question we were able to answer
6
+
7
+ ```
8
+ If that doesn't answer your question, please ask a new question
9
+ on [stackoverflow][1]. Unfortunatley, we just don't have enough volunteers to
10
+ handle usage questions on github.
11
+
12
+ Also, please check the [reference documentation][2]. You might find something
13
+ there that's not in the readme.
14
+
15
+ Thanks!
16
+
17
+ [1]: http://stackoverflow.com/questions/tagged/authlogic
18
+ [2]: https://github.com/binarylogic/authlogic#1c-reference-documentation
19
+ ```
20
+
21
+ ## Old issue, generic
22
+
23
+ ```
24
+ Hello, I'm going through old authlogic issues and seeing what to do with them.
25
+ Skimming through this, it's unclear if it's a usage question, a feature request,
26
+ or a bug report.
27
+
28
+ If this is a bug report, and you can still reproduce this issue with a clean
29
+ install of the latest version of authlogic and rails (currently 3.6.0 and 5.1.4
30
+ respectively), please create a git repo with a sample app that reproduces the
31
+ problem, and open a new issue.
32
+
33
+ If this is a feature request, it's still relevant, and you are committed to
34
+ implementing it, please open a new issue and we can discuss your implementation
35
+ plan.
36
+
37
+ If this is a usage question, please ask it on [stackoverflow][1]. Unfortunatley,
38
+ we just don't have enough volunteers to handle usage questions on github. Also,
39
+ please check the [reference documentation][2]. You might find something there
40
+ that's not in the readme.
41
+
42
+ Thanks!
43
+
44
+ [1]: http://stackoverflow.com/questions/tagged/authlogic
45
+ [2]: https://github.com/binarylogic/authlogic#1c-reference-documentation
46
+ ```
47
+
48
+ ## Old issue, usage question / feature request
49
+
50
+ ```
51
+ Hello, I'm going through old authlogic issues and seeing what to do with them.
52
+ This one looks a bit like a usage question and a bit like a feature request.
53
+
54
+ If this is a feature request, it's still relevant, and you are committed to
55
+ implementing it, please open a new issue and we can discuss your implementation
56
+ plan.
57
+
58
+ If this is a usage question, please ask it on [stackoverflow][1]. Unfortunatley,
59
+ we just don't have enough volunteers to handle usage questions on github. Also,
60
+ please check the [reference documentation][2]. You might find something there
61
+ that's not in the readme.
62
+
63
+ Thanks!
64
+
65
+ [1]: http://stackoverflow.com/questions/tagged/authlogic
66
+ [2]: https://github.com/binarylogic/authlogic#1c-reference-documentation
67
+ ```
68
+
69
+ ## Old issue, bug report
70
+
71
+ ```
72
+ Hello, I'm going through old authlogic issues and seeing what to do with them.
73
+ This one looks like a bug report.
74
+
75
+ If you can still reproduce this issue with a clean install of the latest
76
+ version of authlogic and rails (currently 3.6.0 and 5.1.4 respectively), please
77
+ create a git repo with a sample app that reproduces the problem, and open a new
78
+ issue.
79
+
80
+ If this was more of a usage question than a bug report, please ask your question
81
+ on [stackoverflow][1]. Unfortunatley, we just don't have enough volunteers to
82
+ handle usage questions on github.
83
+
84
+ Thanks!
85
+
86
+ [1]: http://stackoverflow.com/questions/tagged/authlogic
87
+ ```
data/.gitignore CHANGED
@@ -11,4 +11,5 @@ test/gemfiles/Gemfile*.lock
11
11
  .bundle
12
12
  Gemfile.lock
13
13
  .ruby-gemset
14
- .ruby-version
14
+ .ruby-version
15
+ .byebug_history
@@ -4,11 +4,7 @@ AllCops:
4
4
  # You can run the authlogic test suite with any supported version of MRI, but the
5
5
  # linter will only care about this `TargetRubyVersion`. This should be set to the
6
6
  # lowest version of MRI that authlogic supports.
7
- TargetRubyVersion: 1.9
8
-
9
- # Compared to metrics like AbcSize, MethodLength has questionable value.
10
- Metrics/MethodLength:
11
- Enabled: false
7
+ TargetRubyVersion: 2.1
12
8
 
13
9
  # Please use normal indentation when aligning parameters.
14
10
  #
@@ -29,5 +25,65 @@ Metrics/MethodLength:
29
25
  # b)
30
26
  #
31
27
  # The latter is harder to maintain and uses too much horizontal space.
32
- Style/AlignParameters:
28
+ Layout/AlignParameters:
33
29
  EnforcedStyle: with_fixed_indentation
30
+
31
+ # This project uses rails-style method indentation, ie. indent after `private`.
32
+ Layout/IndentationConsistency:
33
+ EnforcedStyle: rails
34
+
35
+ Layout/MultilineOperationIndentation:
36
+ EnforcedStyle: indented
37
+
38
+ # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
39
+ Metrics/BlockLength:
40
+ Enabled: false
41
+
42
+ # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
43
+ Metrics/ClassLength:
44
+ Enabled: false
45
+
46
+ # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
47
+ Metrics/MethodLength:
48
+ Enabled: false
49
+
50
+ # Questionable value compared to metrics like AbcSize or CyclomaticComplexity.
51
+ Metrics/ModuleLength:
52
+ Enabled: false
53
+
54
+ # Sometimes prefixing a method name with get_ or set_ is a reasonable choice.
55
+ Naming/AccessorMethodName:
56
+ Enabled: false
57
+
58
+ # Having a consistent delimiter, like EOS, improves reading speed. The delimiter
59
+ # is syntactic noise, just like a quotation mark, and inconsistent naming would
60
+ # hurt reading speed, just as inconsistent quoting would.
61
+ Naming/HeredocDelimiterNaming:
62
+ Enabled: false
63
+
64
+ # Avoid single-line method definitions.
65
+ Style/EmptyMethod:
66
+ EnforcedStyle: expanded
67
+
68
+ # Too subtle to lint. Guard clauses are great, use them if they help.
69
+ Style/GuardClause:
70
+ Enabled: false
71
+
72
+ # Too subtle to lint. A multi-line conditional may improve readability, even if
73
+ # a postfix conditional would satisfy `Metrics/LineLength`.
74
+ Style/IfUnlessModifier:
75
+ Enabled: false
76
+
77
+ # Too subtle to lint. Use semantic style, but prefer `}.x` over `end.x`.
78
+ Style/BlockDelimiters:
79
+ Enabled: false
80
+
81
+ # Use the nested style because it is safer. It is easier to make mistakes with
82
+ # the compact style.
83
+ Style/ClassAndModuleChildren:
84
+ EnforcedStyle: nested
85
+
86
+ # Both `module_function` and `extend_self` are legitimate. Most importantly,
87
+ # they are different (http://bit.ly/2hSQAGm)
88
+ Style/ModuleFunction:
89
+ Enabled: false
@@ -1,323 +1,90 @@
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 2017-11-08 17:51:32 -0500 using RuboCop version 0.51.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: 58
70
10
  Metrics/AbcSize:
71
- Max: 82
72
-
73
- Metrics/ClassLength:
74
- Enabled: false
11
+ Max: 43
75
12
 
13
+ # Offense count: 4
76
14
  Metrics/CyclomaticComplexity:
77
- Max: 12
15
+ Max: 8
78
16
 
79
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
17
+ # Offense count: 579
18
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
80
19
  # URISchemes: http, https
81
20
  Metrics/LineLength:
82
- Max: 130
83
-
84
- Metrics/ModuleLength:
85
- Enabled: false
21
+ Max: 110
86
22
 
23
+ # Offense count: 3
87
24
  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'
25
+ Max: 8
99
26
 
27
+ # Offense count: 60
100
28
  # Cop supports --auto-correct.
101
29
  # Configuration parameters: EnforcedStyle, SupportedStyles.
102
30
  # SupportedStyles: prefer_alias, prefer_alias_method
103
31
  Style/Alias:
104
32
  Enabled: false
105
33
 
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
-
34
+ # Offense count: 5
154
35
  Style/ClassVars:
155
36
  Exclude:
156
37
  - 'lib/authlogic/i18n.rb'
157
38
 
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
-
39
+ # Offense count: 31
168
40
  Style/Documentation:
169
41
  Enabled: false
170
42
 
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:
43
+ # Offense count: 4
44
+ Style/MethodMissing:
216
45
  Exclude:
217
- - 'test/test_helper.rb'
218
-
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'
46
+ - 'lib/authlogic/controller_adapters/abstract_adapter.rb'
47
+ - 'lib/authlogic/controller_adapters/sinatra_adapter.rb'
48
+ - 'lib/authlogic/test_case/mock_request.rb'
277
49
 
278
- # Cop supports --auto-correct.
279
- Style/NegatedIf:
50
+ # Offense count: 1
51
+ Style/MixinUsage:
280
52
  Exclude:
281
53
  - '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'
286
- - 'lib/authlogic/session/active_record_trickery.rb'
287
- - 'lib/authlogic/session/cookies.rb'
288
- - 'lib/authlogic/session/klass.rb'
289
- - 'lib/authlogic/session/params.rb'
290
- - 'lib/authlogic/session/password.rb'
291
- - 'lib/authlogic/session/persistence.rb'
292
54
 
55
+ # Offense count: 2
293
56
  # Cop supports --auto-correct.
294
57
  # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
295
58
  # SupportedStyles: skip_modifier_ifs, always
296
59
  Style/Next:
297
- Enabled: false
60
+ Exclude:
61
+ - 'lib/authlogic/acts_as_authentic/password.rb'
62
+ - 'lib/authlogic/session/magic_states.rb'
298
63
 
64
+ # Offense count: 1
299
65
  # Cop supports --auto-correct.
300
66
  Style/Not:
301
67
  Exclude:
302
68
  - 'lib/authlogic/acts_as_authentic/login.rb'
303
69
 
70
+ # Offense count: 2
304
71
  # Cop supports --auto-correct.
305
- Style/ParallelAssignment:
72
+ # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
73
+ # SupportedStyles: predicate, comparison
74
+ Style/NumericPredicate:
306
75
  Exclude:
307
- - 'test/random_test.rb'
76
+ - 'spec/**/*'
77
+ - 'lib/authlogic/acts_as_authentic/password.rb'
78
+ - 'lib/authlogic/session/brute_force_protection.rb'
308
79
 
80
+ # Offense count: 1
309
81
  # Cop supports --auto-correct.
310
82
  # Configuration parameters: AllowSafeAssignment.
311
83
  Style/ParenthesesAroundCondition:
312
84
  Exclude:
313
85
  - 'test/test_helper.rb'
314
86
 
315
- # Cop supports --auto-correct.
316
- # Configuration parameters: PreferredDelimiters.
317
- Style/PercentLiteralDelimiters:
318
- Exclude:
319
- - 'authlogic.gemspec'
320
-
87
+ # Offense count: 3
321
88
  # Cop supports --auto-correct.
322
89
  Style/Proc:
323
90
  Exclude:
@@ -325,12 +92,14 @@ Style/Proc:
325
92
  - 'lib/authlogic/session/http_auth.rb'
326
93
  - 'test/acts_as_authentic_test/email_test.rb'
327
94
 
95
+ # Offense count: 7
328
96
  # Cop supports --auto-correct.
329
97
  # Configuration parameters: SupportedStyles.
330
98
  # SupportedStyles: compact, exploded
331
99
  Style/RaiseArgs:
332
100
  EnforcedStyle: compact
333
101
 
102
+ # Offense count: 3
334
103
  # Cop supports --auto-correct.
335
104
  Style/RedundantBegin:
336
105
  Exclude:
@@ -338,6 +107,7 @@ Style/RedundantBegin:
338
107
  - 'lib/authlogic/crypto_providers/bcrypt.rb'
339
108
  - 'lib/authlogic/crypto_providers/scrypt.rb'
340
109
 
110
+ # Offense count: 4
341
111
  # Cop supports --auto-correct.
342
112
  # Configuration parameters: AllowMultipleReturnValues.
343
113
  Style/RedundantReturn:
@@ -345,6 +115,7 @@ Style/RedundantReturn:
345
115
  - 'lib/authlogic/acts_as_authentic/session_maintenance.rb'
346
116
  - 'test/libs/user_session.rb'
347
117
 
118
+ # Offense count: 3
348
119
  # Cop supports --auto-correct.
349
120
  Style/RedundantSelf:
350
121
  Exclude:
@@ -352,23 +123,27 @@ Style/RedundantSelf:
352
123
  - 'lib/authlogic/acts_as_authentic/restful_authentication.rb'
353
124
  - 'lib/authlogic/controller_adapters/rack_adapter.rb'
354
125
 
126
+ # Offense count: 1
355
127
  # Cop supports --auto-correct.
356
128
  Style/RescueModifier:
357
129
  Exclude:
358
130
  - 'lib/authlogic/acts_as_authentic/session_maintenance.rb'
359
131
 
132
+ # Offense count: 1
360
133
  # Cop supports --auto-correct.
361
134
  # Configuration parameters: SupportedStyles.
362
135
  # SupportedStyles: use_perl_names, use_english_names
363
136
  Style/SpecialGlobalVars:
364
137
  EnforcedStyle: use_perl_names
365
138
 
139
+ # Offense count: 507
366
140
  # Cop supports --auto-correct.
367
141
  # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
368
142
  # SupportedStyles: single_quotes, double_quotes
369
143
  Style/StringLiterals:
370
144
  Enabled: false
371
145
 
146
+ # Offense count: 2
372
147
  # Cop supports --auto-correct.
373
148
  # Configuration parameters: EnforcedStyle, SupportedStyles.
374
149
  # SupportedStyles: single_quotes, double_quotes
@@ -377,6 +152,14 @@ Style/StringLiteralsInInterpolation:
377
152
  - 'lib/authlogic/authenticates_many/base.rb'
378
153
  - 'lib/authlogic/session/foundation.rb'
379
154
 
155
+ # Offense count: 8
156
+ # Cop supports --auto-correct.
157
+ # Configuration parameters: MinSize, SupportedStyles.
158
+ # SupportedStyles: percent, brackets
159
+ Style/SymbolArray:
160
+ EnforcedStyle: brackets
161
+
162
+ # Offense count: 1
380
163
  # Cop supports --auto-correct.
381
164
  # Configuration parameters: IgnoredMethods.
382
165
  # IgnoredMethods: respond_to, define_method
@@ -384,6 +167,7 @@ Style/SymbolProc:
384
167
  Exclude:
385
168
  - 'lib/authlogic/acts_as_authentic/persistence_token.rb'
386
169
 
170
+ # Offense count: 2
387
171
  # Cop supports --auto-correct.
388
172
  # Configuration parameters: SupportedStyles, MinSize, WordRegex.
389
173
  # SupportedStyles: percent, brackets