solidus_auth_devise 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_auth_devise might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +326 -0
- data/CHANGELOG.md +250 -163
- data/Gemfile +4 -5
- data/README.md +22 -5
- data/Rakefile +2 -0
- data/app/mailers/spree/user_mailer.rb +4 -2
- data/app/models/spree/auth_configuration.rb +2 -0
- data/app/models/spree/user.rb +19 -19
- data/config/initializers/devise.rb +11 -3
- data/config/initializers/warden.rb +4 -2
- data/config/locales/en.yml +3 -1
- data/config/routes.rb +5 -11
- data/db/default/users.rb +10 -8
- data/db/migrate/20101026184949_create_users.rb +9 -7
- data/db/migrate/20101026184950_rename_columns_for_devise.rb +3 -0
- data/db/migrate/20101214150824_convert_user_remember_field.rb +2 -0
- data/db/migrate/20120203010234_add_reset_password_sent_at_to_spree_users.rb +2 -0
- data/db/migrate/20120605211305_make_users_email_index_unique.rb +4 -2
- data/db/migrate/20140904000425_add_deleted_at_to_users.rb +2 -0
- data/db/migrate/20141002154641_add_confirmable_to_users.rb +2 -0
- data/db/migrate/20190125170630_add_reset_password_token_index_to_spree_users.rb +4 -2
- data/db/seeds.rb +2 -0
- data/lib/controllers/backend/spree/admin/base_controller_decorator.rb +20 -0
- data/lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb +11 -8
- data/lib/controllers/backend/spree/admin/user_passwords_controller.rb +4 -2
- data/lib/controllers/backend/spree/admin/user_sessions_controller.rb +11 -8
- data/lib/controllers/frontend/spree/checkout_controller_decorator.rb +29 -19
- data/lib/controllers/frontend/spree/user_confirmations_controller.rb +2 -0
- data/lib/controllers/frontend/spree/user_passwords_controller.rb +4 -1
- data/lib/controllers/frontend/spree/user_registrations_controller.rb +4 -0
- data/lib/controllers/frontend/spree/user_sessions_controller.rb +2 -0
- data/lib/controllers/frontend/spree/users_controller.rb +17 -14
- data/lib/generators/solidus/auth/install/install_generator.rb +4 -2
- data/lib/generators/solidus/auth/install/templates/config/initializers/devise.rb +2 -0
- data/lib/solidus/auth.rb +2 -0
- data/lib/solidus_auth_devise.rb +2 -0
- data/lib/spree/auth/devise.rb +3 -1
- data/lib/spree/auth/engine.rb +3 -1
- data/lib/spree/auth/version.rb +1 -1
- data/lib/spree/authentication_helpers.rb +5 -11
- data/lib/tasks/auth.rake +3 -1
- data/lib/views/backend/spree/admin/shared/_navigation_footer.html.erb +1 -1
- data/lib/views/backend/spree/admin/user_passwords/new.html.erb +1 -3
- data/lib/views/backend/spree/admin/user_sessions/new.html.erb +1 -1
- data/lib/views/frontend/spree/shared/_login_bar_items.html.erb +1 -1
- data/lib/views/frontend/spree/user_passwords/new.html.erb +1 -3
- data/solidus_auth_devise.gemspec +16 -6
- data/spec/controllers/spree/admin/user_passwords_controller_spec.rb +2 -0
- data/spec/controllers/spree/checkout_controller_spec.rb +5 -9
- data/spec/controllers/spree/products_controller_spec.rb +2 -1
- data/spec/controllers/spree/user_passwords_controller_spec.rb +4 -3
- data/spec/controllers/spree/user_registrations_controller_spec.rb +3 -2
- data/spec/controllers/spree/user_sessions_controller_spec.rb +14 -0
- data/spec/controllers/spree/users_controller_spec.rb +2 -2
- data/spec/factories/confirmed_user.rb +5 -3
- data/spec/features/account_spec.rb +4 -3
- data/spec/features/admin/orders_spec.rb +2 -1
- data/spec/features/admin/password_reset_spec.rb +23 -10
- data/spec/features/admin/products_spec.rb +2 -1
- data/spec/features/admin/sign_in_spec.rb +2 -1
- data/spec/features/admin/sign_out_spec.rb +2 -1
- data/spec/features/admin_permissions_spec.rb +2 -1
- data/spec/features/change_email_spec.rb +3 -2
- data/spec/features/checkout_spec.rb +15 -13
- data/spec/features/confirmation_spec.rb +2 -0
- data/spec/features/order_spec.rb +2 -1
- data/spec/features/password_reset_spec.rb +23 -10
- data/spec/features/sign_in_spec.rb +2 -1
- data/spec/features/sign_out_spec.rb +4 -3
- data/spec/features/sign_up_spec.rb +2 -1
- data/spec/mailers/user_mailer_spec.rb +2 -1
- data/spec/models/order_spec.rb +2 -1
- data/spec/models/user_spec.rb +2 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/support/ability.rb +3 -1
- data/spec/support/authentication_helpers.rb +2 -0
- data/spec/support/confirm_helpers.rb +4 -2
- data/spec/support/email.rb +2 -0
- data/spec/support/preferences.rb +10 -2
- data/spec/support/spree.rb +2 -0
- metadata +94 -35
- data/.travis.yml +0 -18
- data/lib/controllers/backend/spree/admin/admin_controller_decorator.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a2eba838fc8a03ef6bdf7a6d113c00c1a2c76f55fc3237e73bc6cee1dcf11f7
|
4
|
+
data.tar.gz: c23c24fd0f9f60c4e60058905d46b56b31e57c4b4b307cefe688a5b1f7a6883f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 571cf2a517b9d84e73731352c36dbba9a78d0325d28ca4247b3ae221067202616f6d11a3993bbcfb621cf8f388ce7edaa938ff7bfa941bb9035027b3d4f97b39
|
7
|
+
data.tar.gz: 916b836223e7d1bf6fe9872ff2616939e763d9f403c0f0148b13a16e73d58d36bbaa913c87f314fe4bf537a8ef8620dfbcb56af5693cb17a45344feaab383a2e
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,326 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rails
|
4
|
+
|
5
|
+
# Relaxed.Ruby.Style
|
6
|
+
|
7
|
+
AllCops:
|
8
|
+
Exclude:
|
9
|
+
- 'spec/dummy/**/*'
|
10
|
+
- 'app/overrides/*'
|
11
|
+
- 'bin/**'
|
12
|
+
TargetRubyVersion: 2.3
|
13
|
+
|
14
|
+
|
15
|
+
Rails/Output:
|
16
|
+
Exclude:
|
17
|
+
- 'db/default/users.rb'
|
18
|
+
|
19
|
+
# Sometimes I believe this reads better
|
20
|
+
# This also causes spacing issues on multi-line fixes
|
21
|
+
Style/BracesAroundHashParameters:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
# We use class vars and will have to continue doing so for compatability
|
25
|
+
Style/ClassVars:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
# We need these names for backwards compatability
|
29
|
+
Naming/PredicateName:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Naming/AccessorMethodName:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
# This has been used for customization
|
36
|
+
Style/MutableConstant:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/ClassAndModuleChildren:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Style/EmptyElse:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Style/GuardClause:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Style/Next:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/NumericPredicate:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/WordArray:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Style/ConditionalAssignment:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
Style/RaiseArgs:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Naming/BinaryOperatorParameterName:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
# We can use good judgement here
|
67
|
+
Style/RegexpLiteral:
|
68
|
+
Enabled: false
|
69
|
+
|
70
|
+
# Unicode comments are useful
|
71
|
+
Style/AsciiComments:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Layout/EndAlignment:
|
75
|
+
Enabled: false
|
76
|
+
|
77
|
+
Layout/ElseAlignment:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
Layout/IndentationWidth:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
Layout/AlignParameters:
|
84
|
+
Enabled: false
|
85
|
+
|
86
|
+
Layout/ClosingParenthesisIndentation:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
Layout/MultilineMethodCallIndentation:
|
90
|
+
Enabled: false
|
91
|
+
|
92
|
+
Layout/IndentFirstArrayElement:
|
93
|
+
Enabled: false
|
94
|
+
|
95
|
+
Layout/IndentFirstHashElement:
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
Layout/AlignHash:
|
99
|
+
Enabled: false
|
100
|
+
|
101
|
+
Style/TrailingCommaInArguments:
|
102
|
+
Enabled: false
|
103
|
+
|
104
|
+
Style/TrailingCommaInArrayLiteral:
|
105
|
+
Enabled: false
|
106
|
+
|
107
|
+
Style/TrailingCommaInHashLiteral:
|
108
|
+
Enabled: false
|
109
|
+
|
110
|
+
# Symbol Arrays are ok and the %i syntax widely unknown
|
111
|
+
Style/SymbolArray:
|
112
|
+
Enabled: false
|
113
|
+
|
114
|
+
Rails/DynamicFindBy:
|
115
|
+
Whitelist:
|
116
|
+
- find_by_param
|
117
|
+
- find_by_param!
|
118
|
+
|
119
|
+
# We use a lot of
|
120
|
+
#
|
121
|
+
# expect {
|
122
|
+
# something
|
123
|
+
# }.to { happen }
|
124
|
+
#
|
125
|
+
# syntax in the specs files.
|
126
|
+
Lint/AmbiguousBlockAssociation:
|
127
|
+
Exclude:
|
128
|
+
- '*/spec/**/*'
|
129
|
+
- 'spec/**/*' # For the benefit of apps that inherit from this config
|
130
|
+
|
131
|
+
# We use eval to add common_spree_dependencies into the Gemfiles of each of our gems
|
132
|
+
Security/Eval:
|
133
|
+
Exclude:
|
134
|
+
- 'Gemfile'
|
135
|
+
- 'common_spree_dependencies.rb'
|
136
|
+
- '*/Gemfile'
|
137
|
+
|
138
|
+
Naming/VariableNumber:
|
139
|
+
Enabled: false
|
140
|
+
|
141
|
+
# Write empty methods as you wish.
|
142
|
+
Style/EmptyMethod:
|
143
|
+
Enabled: false
|
144
|
+
|
145
|
+
# From http://relaxed.ruby.style/
|
146
|
+
|
147
|
+
Style/Alias:
|
148
|
+
Enabled: false
|
149
|
+
StyleGuide: http://relaxed.ruby.style/#stylealias
|
150
|
+
|
151
|
+
Style/BeginBlock:
|
152
|
+
Enabled: false
|
153
|
+
StyleGuide: http://relaxed.ruby.style/#stylebeginblock
|
154
|
+
|
155
|
+
Style/BlockDelimiters:
|
156
|
+
Enabled: false
|
157
|
+
StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
|
158
|
+
|
159
|
+
Style/Documentation:
|
160
|
+
Enabled: false
|
161
|
+
StyleGuide: http://relaxed.ruby.style/#styledocumentation
|
162
|
+
|
163
|
+
Layout/DotPosition:
|
164
|
+
Enabled: false
|
165
|
+
StyleGuide: http://relaxed.ruby.style/#styledotposition
|
166
|
+
|
167
|
+
Style/DoubleNegation:
|
168
|
+
Enabled: false
|
169
|
+
StyleGuide: http://relaxed.ruby.style/#styledoublenegation
|
170
|
+
|
171
|
+
Style/EndBlock:
|
172
|
+
Enabled: false
|
173
|
+
StyleGuide: http://relaxed.ruby.style/#styleendblock
|
174
|
+
|
175
|
+
Style/FormatString:
|
176
|
+
Enabled: false
|
177
|
+
StyleGuide: http://relaxed.ruby.style/#styleformatstring
|
178
|
+
|
179
|
+
Style/IfUnlessModifier:
|
180
|
+
Enabled: false
|
181
|
+
StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
|
182
|
+
|
183
|
+
Style/Lambda:
|
184
|
+
Enabled: false
|
185
|
+
StyleGuide: http://relaxed.ruby.style/#stylelambda
|
186
|
+
|
187
|
+
Style/ModuleFunction:
|
188
|
+
Enabled: false
|
189
|
+
StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
|
190
|
+
|
191
|
+
Style/MultilineBlockChain:
|
192
|
+
Enabled: false
|
193
|
+
StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
|
194
|
+
|
195
|
+
Style/NegatedIf:
|
196
|
+
Enabled: false
|
197
|
+
StyleGuide: http://relaxed.ruby.style/#stylenegatedif
|
198
|
+
|
199
|
+
Style/NegatedWhile:
|
200
|
+
Enabled: false
|
201
|
+
StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
|
202
|
+
|
203
|
+
Style/ParallelAssignment:
|
204
|
+
Enabled: false
|
205
|
+
StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
|
206
|
+
|
207
|
+
Style/PercentLiteralDelimiters:
|
208
|
+
Enabled: false
|
209
|
+
StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
|
210
|
+
|
211
|
+
Style/PerlBackrefs:
|
212
|
+
Enabled: false
|
213
|
+
StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
|
214
|
+
|
215
|
+
Style/Semicolon:
|
216
|
+
Enabled: false
|
217
|
+
StyleGuide: http://relaxed.ruby.style/#stylesemicolon
|
218
|
+
|
219
|
+
Style/SignalException:
|
220
|
+
Enabled: false
|
221
|
+
StyleGuide: http://relaxed.ruby.style/#stylesignalexception
|
222
|
+
|
223
|
+
Style/SingleLineBlockParams:
|
224
|
+
Enabled: false
|
225
|
+
StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
|
226
|
+
|
227
|
+
Style/SingleLineMethods:
|
228
|
+
Enabled: false
|
229
|
+
StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
|
230
|
+
|
231
|
+
Layout/SpaceBeforeBlockBraces:
|
232
|
+
Enabled: false
|
233
|
+
StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
|
234
|
+
|
235
|
+
Layout/SpaceInsideParens:
|
236
|
+
Enabled: false
|
237
|
+
StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
|
238
|
+
|
239
|
+
Style/SpecialGlobalVars:
|
240
|
+
Enabled: false
|
241
|
+
StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
|
242
|
+
|
243
|
+
Style/StringLiterals:
|
244
|
+
Enabled: false
|
245
|
+
StyleGuide: http://relaxed.ruby.style/#stylestringliterals
|
246
|
+
|
247
|
+
Style/SymbolProc:
|
248
|
+
Enabled: false
|
249
|
+
|
250
|
+
Style/TernaryParentheses:
|
251
|
+
Enabled: false
|
252
|
+
|
253
|
+
Style/WhileUntilModifier:
|
254
|
+
Enabled: false
|
255
|
+
StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
|
256
|
+
|
257
|
+
Lint/AmbiguousRegexpLiteral:
|
258
|
+
Enabled: false
|
259
|
+
StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
|
260
|
+
|
261
|
+
Lint/AssignmentInCondition:
|
262
|
+
Enabled: false
|
263
|
+
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
|
264
|
+
|
265
|
+
Metrics/AbcSize:
|
266
|
+
Enabled: false
|
267
|
+
|
268
|
+
Metrics/BlockNesting:
|
269
|
+
Enabled: false
|
270
|
+
|
271
|
+
Metrics/ClassLength:
|
272
|
+
Enabled: false
|
273
|
+
|
274
|
+
Metrics/ModuleLength:
|
275
|
+
Enabled: false
|
276
|
+
|
277
|
+
Metrics/BlockLength:
|
278
|
+
Enabled: false
|
279
|
+
|
280
|
+
Metrics/CyclomaticComplexity:
|
281
|
+
Enabled: false
|
282
|
+
|
283
|
+
Metrics/LineLength:
|
284
|
+
Enabled: false
|
285
|
+
|
286
|
+
Metrics/MethodLength:
|
287
|
+
Enabled: false
|
288
|
+
|
289
|
+
Metrics/ParameterLists:
|
290
|
+
Enabled: false
|
291
|
+
|
292
|
+
Metrics/PerceivedComplexity:
|
293
|
+
Enabled: false
|
294
|
+
|
295
|
+
Bundler/OrderedGems:
|
296
|
+
Enabled: false
|
297
|
+
|
298
|
+
Style/NumericLiterals:
|
299
|
+
Enabled: false
|
300
|
+
|
301
|
+
Style/FrozenStringLiteralComment:
|
302
|
+
Enabled: true
|
303
|
+
EnforcedStyle: always
|
304
|
+
|
305
|
+
# json.() is idiomatic in jbuilder files
|
306
|
+
Style/LambdaCall:
|
307
|
+
Enabled: false
|
308
|
+
|
309
|
+
Naming/UncommunicativeMethodParamName:
|
310
|
+
AllowedNames:
|
311
|
+
- id
|
312
|
+
- to
|
313
|
+
- _
|
314
|
+
|
315
|
+
# Rubocop doesn't understand side-effects
|
316
|
+
Style/IdenticalConditionalBranches:
|
317
|
+
Enabled: false
|
318
|
+
|
319
|
+
Naming/MemoizedInstanceVariableName:
|
320
|
+
Enabled: false
|
321
|
+
|
322
|
+
Lint/UselessComparison:
|
323
|
+
Enabled: false
|
324
|
+
|
325
|
+
Lint/HandleExceptions:
|
326
|
+
Enabled: false
|