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.

Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +326 -0
  3. data/CHANGELOG.md +250 -163
  4. data/Gemfile +4 -5
  5. data/README.md +22 -5
  6. data/Rakefile +2 -0
  7. data/app/mailers/spree/user_mailer.rb +4 -2
  8. data/app/models/spree/auth_configuration.rb +2 -0
  9. data/app/models/spree/user.rb +19 -19
  10. data/config/initializers/devise.rb +11 -3
  11. data/config/initializers/warden.rb +4 -2
  12. data/config/locales/en.yml +3 -1
  13. data/config/routes.rb +5 -11
  14. data/db/default/users.rb +10 -8
  15. data/db/migrate/20101026184949_create_users.rb +9 -7
  16. data/db/migrate/20101026184950_rename_columns_for_devise.rb +3 -0
  17. data/db/migrate/20101214150824_convert_user_remember_field.rb +2 -0
  18. data/db/migrate/20120203010234_add_reset_password_sent_at_to_spree_users.rb +2 -0
  19. data/db/migrate/20120605211305_make_users_email_index_unique.rb +4 -2
  20. data/db/migrate/20140904000425_add_deleted_at_to_users.rb +2 -0
  21. data/db/migrate/20141002154641_add_confirmable_to_users.rb +2 -0
  22. data/db/migrate/20190125170630_add_reset_password_token_index_to_spree_users.rb +4 -2
  23. data/db/seeds.rb +2 -0
  24. data/lib/controllers/backend/spree/admin/base_controller_decorator.rb +20 -0
  25. data/lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb +11 -8
  26. data/lib/controllers/backend/spree/admin/user_passwords_controller.rb +4 -2
  27. data/lib/controllers/backend/spree/admin/user_sessions_controller.rb +11 -8
  28. data/lib/controllers/frontend/spree/checkout_controller_decorator.rb +29 -19
  29. data/lib/controllers/frontend/spree/user_confirmations_controller.rb +2 -0
  30. data/lib/controllers/frontend/spree/user_passwords_controller.rb +4 -1
  31. data/lib/controllers/frontend/spree/user_registrations_controller.rb +4 -0
  32. data/lib/controllers/frontend/spree/user_sessions_controller.rb +2 -0
  33. data/lib/controllers/frontend/spree/users_controller.rb +17 -14
  34. data/lib/generators/solidus/auth/install/install_generator.rb +4 -2
  35. data/lib/generators/solidus/auth/install/templates/config/initializers/devise.rb +2 -0
  36. data/lib/solidus/auth.rb +2 -0
  37. data/lib/solidus_auth_devise.rb +2 -0
  38. data/lib/spree/auth/devise.rb +3 -1
  39. data/lib/spree/auth/engine.rb +3 -1
  40. data/lib/spree/auth/version.rb +1 -1
  41. data/lib/spree/authentication_helpers.rb +5 -11
  42. data/lib/tasks/auth.rake +3 -1
  43. data/lib/views/backend/spree/admin/shared/_navigation_footer.html.erb +1 -1
  44. data/lib/views/backend/spree/admin/user_passwords/new.html.erb +1 -3
  45. data/lib/views/backend/spree/admin/user_sessions/new.html.erb +1 -1
  46. data/lib/views/frontend/spree/shared/_login_bar_items.html.erb +1 -1
  47. data/lib/views/frontend/spree/user_passwords/new.html.erb +1 -3
  48. data/solidus_auth_devise.gemspec +16 -6
  49. data/spec/controllers/spree/admin/user_passwords_controller_spec.rb +2 -0
  50. data/spec/controllers/spree/checkout_controller_spec.rb +5 -9
  51. data/spec/controllers/spree/products_controller_spec.rb +2 -1
  52. data/spec/controllers/spree/user_passwords_controller_spec.rb +4 -3
  53. data/spec/controllers/spree/user_registrations_controller_spec.rb +3 -2
  54. data/spec/controllers/spree/user_sessions_controller_spec.rb +14 -0
  55. data/spec/controllers/spree/users_controller_spec.rb +2 -2
  56. data/spec/factories/confirmed_user.rb +5 -3
  57. data/spec/features/account_spec.rb +4 -3
  58. data/spec/features/admin/orders_spec.rb +2 -1
  59. data/spec/features/admin/password_reset_spec.rb +23 -10
  60. data/spec/features/admin/products_spec.rb +2 -1
  61. data/spec/features/admin/sign_in_spec.rb +2 -1
  62. data/spec/features/admin/sign_out_spec.rb +2 -1
  63. data/spec/features/admin_permissions_spec.rb +2 -1
  64. data/spec/features/change_email_spec.rb +3 -2
  65. data/spec/features/checkout_spec.rb +15 -13
  66. data/spec/features/confirmation_spec.rb +2 -0
  67. data/spec/features/order_spec.rb +2 -1
  68. data/spec/features/password_reset_spec.rb +23 -10
  69. data/spec/features/sign_in_spec.rb +2 -1
  70. data/spec/features/sign_out_spec.rb +4 -3
  71. data/spec/features/sign_up_spec.rb +2 -1
  72. data/spec/mailers/user_mailer_spec.rb +2 -1
  73. data/spec/models/order_spec.rb +2 -1
  74. data/spec/models/user_spec.rb +2 -1
  75. data/spec/spec_helper.rb +3 -1
  76. data/spec/support/ability.rb +3 -1
  77. data/spec/support/authentication_helpers.rb +2 -0
  78. data/spec/support/confirm_helpers.rb +4 -2
  79. data/spec/support/email.rb +2 -0
  80. data/spec/support/preferences.rb +10 -2
  81. data/spec/support/spree.rb +2 -0
  82. metadata +94 -35
  83. data/.travis.yml +0 -18
  84. data/lib/controllers/backend/spree/admin/admin_controller_decorator.rb +0 -11
data/CHANGELOG.md CHANGED
@@ -1,184 +1,271 @@
1
- ## Master (unreleased)
1
+ # Change Log
2
+
3
+ ## [Unreleased](https://github.com/solidusio/solidus_auth_devise/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v2.2.0...HEAD)
6
+
7
+ **Closed issues:**
8
+
9
+ - Any plans to release to RubyGems? [\#147](https://github.com/solidusio/solidus_auth_devise/issues/147)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Fix CI issues [\#167](https://github.com/solidusio/solidus_auth_devise/pull/167) ([kennyadsl](https://github.com/kennyadsl))
14
+ - Stub preferences in specs instead of resetting [\#166](https://github.com/solidusio/solidus_auth_devise/pull/166) ([kennyadsl](https://github.com/kennyadsl))
15
+ - Add appropriate classes to admin login button [\#164](https://github.com/solidusio/solidus_auth_devise/pull/164) ([jacobeubanks](https://github.com/jacobeubanks))
16
+ - Extension maintenance [\#163](https://github.com/solidusio/solidus_auth_devise/pull/163) ([kennyadsl](https://github.com/kennyadsl))
17
+ - Fix minor grammar concerns in console messages [\#162](https://github.com/solidusio/solidus_auth_devise/pull/162) ([jacobherrington](https://github.com/jacobherrington))
18
+ - Logout with DELETE verb by default [\#161](https://github.com/solidusio/solidus_auth_devise/pull/161) ([kennyadsl](https://github.com/kennyadsl))
19
+ - Use secret\_key\_base for Rails 6 compatibility [\#160](https://github.com/solidusio/solidus_auth_devise/pull/160) ([aldesantis](https://github.com/aldesantis))
20
+ - Improve decorators [\#159](https://github.com/solidusio/solidus_auth_devise/pull/159) ([jacobherrington](https://github.com/jacobherrington))
21
+ - Add rubocop as a development dependency [\#158](https://github.com/solidusio/solidus_auth_devise/pull/158) ([jacobherrington](https://github.com/jacobherrington))
22
+ - Update confusing i18n translation [\#157](https://github.com/solidusio/solidus_auth_devise/pull/157) ([jacobherrington](https://github.com/jacobherrington))
23
+ - Remove flash errors from password recovery [\#156](https://github.com/solidusio/solidus_auth_devise/pull/156) ([jacobherrington](https://github.com/jacobherrington))
24
+ - Remove flash errors from admin password recovery [\#155](https://github.com/solidusio/solidus_auth_devise/pull/155) ([jacobherrington](https://github.com/jacobherrington))
25
+ - Introduce Rubocop for linting [\#148](https://github.com/solidusio/solidus_auth_devise/pull/148) ([aitbw](https://github.com/aitbw))
26
+
27
+ ## [v2.2.0](https://github.com/solidusio/solidus_auth_devise/tree/v2.2.0) (2019-06-13)
28
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v2.1.0...v2.2.0)
29
+
30
+ **Closed issues:**
31
+
32
+ - Any plan for replacing paranoia with discard? [\#129](https://github.com/solidusio/solidus_auth_devise/issues/129)
33
+ - rake task solidus\_auth:install:migrations [\#121](https://github.com/solidusio/solidus_auth_devise/issues/121)
34
+ - Issue redirecting to Spree routes [\#100](https://github.com/solidusio/solidus_auth_devise/issues/100)
35
+ - Requiring gem, on API only projects, throws LoadError \(sass/rails\) [\#88](https://github.com/solidusio/solidus_auth_devise/issues/88)
36
+ - db index on reset\_password\_token missing [\#83](https://github.com/solidusio/solidus_auth_devise/issues/83)
37
+ - Let's use more Devise defaults for routing [\#55](https://github.com/solidusio/solidus_auth_devise/issues/55)
38
+ - Fix confirmation\_spec [\#24](https://github.com/solidusio/solidus_auth_devise/issues/24)
2
39
 
3
- ## Solidus Auth Devise v2.2.0 (2019-06-13)
40
+ **Merged pull requests:**
4
41
 
5
- * Add DB index to `reset_password_token` field
6
- * Add missing pessimistic versioning
7
- * Add missing translation to `spree.change_my_password`
8
- * Allow Spree::Admin::UserPasswordsController to be accessed from admin
9
- * Disable backend footer profile edit link if role cannot edit users
10
- * Fix issue with redirections using routes like `new_spree_user_session_url`
11
- * Fix migration `20101026184950` `down` method
12
- * Fix to not reuse spree_current_user as `@user`
13
- * Replace Spree.t with I18n.t
14
- * Lock mysql2 to 0.4.x
15
- * Lock SQLite3 to version 1.3
16
- * Remove FactoryBot warnings
17
- * Configure CI to ensure support on ruby 2.3 + Solidus 2.4 - 2.8
42
+ - Add v2.2.0 CHANGELOG entries [\#153](https://github.com/solidusio/solidus_auth_devise/pull/153) ([kennyadsl](https://github.com/kennyadsl))
43
+ - Add gem-release support [\#152](https://github.com/solidusio/solidus_auth_devise/pull/152) ([kennyadsl](https://github.com/kennyadsl))
44
+ - Add missing pessimistic versioning [\#149](https://github.com/solidusio/solidus_auth_devise/pull/149) ([aitbw](https://github.com/aitbw))
45
+ - Remove CircleCI configuration file [\#145](https://github.com/solidusio/solidus_auth_devise/pull/145) ([kennyadsl](https://github.com/kennyadsl))
46
+ - Fix migration `20101026184950` `down` method [\#144](https://github.com/solidusio/solidus_auth_devise/pull/144) ([spaghetticode](https://github.com/spaghetticode))
47
+ - Run specs on CircleCi with shared configuration [\#143](https://github.com/solidusio/solidus_auth_devise/pull/143) ([kennyadsl](https://github.com/kennyadsl))
48
+ - Lock SQLite3 to version 1.3 [\#142](https://github.com/solidusio/solidus_auth_devise/pull/142) ([aitbw](https://github.com/aitbw))
49
+ - Add Solidus v2.8 to Travis config [\#141](https://github.com/solidusio/solidus_auth_devise/pull/141) ([aitbw](https://github.com/aitbw))
50
+ - Add DB index to `reset\_password\_token` field [\#140](https://github.com/solidusio/solidus_auth_devise/pull/140) ([spaghetticode](https://github.com/spaghetticode))
51
+ - Remove warnings [\#139](https://github.com/solidusio/solidus_auth_devise/pull/139) ([jtapia](https://github.com/jtapia))
52
+ - Add missing translation [\#137](https://github.com/solidusio/solidus_auth_devise/pull/137) ([spaghetticode](https://github.com/spaghetticode))
53
+ - Allow Spree::Admin::UserPasswordsController to be accessed from admin… [\#136](https://github.com/solidusio/solidus_auth_devise/pull/136) ([acreilly](https://github.com/acreilly))
54
+ - Fix typo of french locale [\#135](https://github.com/solidusio/solidus_auth_devise/pull/135) ([fho-wtag](https://github.com/fho-wtag))
55
+ - Remove Solidus v2.2 support from Travis config [\#134](https://github.com/solidusio/solidus_auth_devise/pull/134) ([aitbw](https://github.com/aitbw))
56
+ - Replace Spree.t with I18n.t [\#132](https://github.com/solidusio/solidus_auth_devise/pull/132) ([aitbw](https://github.com/aitbw))
57
+ - Fix to not reuse spree\_current\_user as `@user` [\#131](https://github.com/solidusio/solidus_auth_devise/pull/131) ([yono](https://github.com/yono))
58
+ - Fix factory girl dependency for Solidus \< 2.5 [\#130](https://github.com/solidusio/solidus_auth_devise/pull/130) ([tvdeyen](https://github.com/tvdeyen))
59
+ - Add Solidus v2.7 to .travis.yml [\#127](https://github.com/solidusio/solidus_auth_devise/pull/127) ([jacobherrington](https://github.com/jacobherrington))
60
+ - Fix spree routes [\#125](https://github.com/solidusio/solidus_auth_devise/pull/125) ([jtapia](https://github.com/jtapia))
61
+ - Remove unnecessary decorator [\#122](https://github.com/solidusio/solidus_auth_devise/pull/122) ([jhawthorn](https://github.com/jhawthorn))
62
+ - Disable backend footer profile edit link if role cannot edit users [\#120](https://github.com/solidusio/solidus_auth_devise/pull/120) ([gianlucarizzo](https://github.com/gianlucarizzo))
18
63
 
19
- ## Solidus Auth Devise v2.1.0 (2018-01-22)
64
+ ## [v2.1.0](https://github.com/solidusio/solidus_auth_devise/tree/v2.1.0) (2018-01-22)
65
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v2.0.0...v2.1.0)
20
66
 
21
- * Avoid requiring deface on Solidus 2.5+.
67
+ **Closed issues:**
22
68
 
23
- On older versions, you may need to add `gem 'deface'` to your gemfile.
69
+ - Error undefined method alias\_method\_chain [\#112](https://github.com/solidusio/solidus_auth_devise/issues/112)
24
70
 
25
- * Remove reference to unused admin tables helper removed from Solidus 2.5
71
+ **Merged pull requests:**
26
72
 
27
- ## Solidus Auth Devise v2.0.0 (2017-09-20)
73
+ - Remove unused helper include [\#118](https://github.com/solidusio/solidus_auth_devise/pull/118) ([jhawthorn](https://github.com/jhawthorn))
74
+ - update spec according new solidus behaviour for 404 [\#115](https://github.com/solidusio/solidus_auth_devise/pull/115) ([ccarruitero](https://github.com/ccarruitero))
75
+ - Don't require deface for solidus 2.5+ [\#114](https://github.com/solidusio/solidus_auth_devise/pull/114) ([jhawthorn](https://github.com/jhawthorn))
76
+ - Test that we are acting as paranoid not it's behaviour [\#113](https://github.com/solidusio/solidus_auth_devise/pull/113) ([tvdeyen](https://github.com/tvdeyen))
77
+ - Reset api key when assigning password [\#99](https://github.com/solidusio/solidus_auth_devise/pull/99) ([jhawthorn](https://github.com/jhawthorn))
78
+ - RFC: Support Backend-Only Stores [\#96](https://github.com/solidusio/solidus_auth_devise/pull/96) ([stewart](https://github.com/stewart))
28
79
 
29
- * Drop support for Solidus v1.0 and v1.1
30
- * Use `match` for Devise logout route
31
- * Remove references to dash
32
- * Leverage `*_available?` helpers from `solidus-support`
33
- * Use `spec_helper` from `solidus-support`
34
- * Correct `set_current_order` callback for newer versions of Solidus
80
+ ## [v2.0.0](https://github.com/solidusio/solidus_auth_devise/tree/v2.0.0) (2017-09-20)
81
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.6.4...v2.0.0)
35
82
 
36
- ## Solidus Auth Devise v1.6.4 (2017-07-24)
83
+ **Merged pull requests:**
37
84
 
38
- * Fix error trying to call helper_method in api-only applications
39
- * Fix deprecated devise `bypass` option
40
- * Pin development dependencies to minor versions
41
- * Update outdated development dependencies
42
- * Remove implicit dependency on highline
85
+ - Drop Solidus v1.0, v1.1 support [\#111](https://github.com/solidusio/solidus_auth_devise/pull/111) ([swcraig](https://github.com/swcraig))
86
+ - Stop raising an exception when callback in UsersController is undefined [\#110](https://github.com/solidusio/solidus_auth_devise/pull/110) ([swcraig](https://github.com/swcraig))
87
+ - Add ffaker dependency to gemspec [\#109](https://github.com/solidusio/solidus_auth_devise/pull/109) ([swcraig](https://github.com/swcraig))
88
+ - Remove has\_many orders [\#107](https://github.com/solidusio/solidus_auth_devise/pull/107) ([jhawthorn](https://github.com/jhawthorn))
89
+ - Use base spec\_helper from solidus\_support [\#106](https://github.com/solidusio/solidus_auth_devise/pull/106) ([jhawthorn](https://github.com/jhawthorn))
90
+ - Extract \*\_available? to solidus\_support [\#105](https://github.com/solidusio/solidus_auth_devise/pull/105) ([jhawthorn](https://github.com/jhawthorn))
91
+ - Remove references to dash [\#104](https://github.com/solidusio/solidus_auth_devise/pull/104) ([jhawthorn](https://github.com/jhawthorn))
92
+ - match logout route to devise configuration [\#103](https://github.com/solidusio/solidus_auth_devise/pull/103) ([BenMorganIO](https://github.com/BenMorganIO))
43
93
 
44
- ## Solidus Auth Devise v1.6.3 (2017-05-09)
94
+ ## [v1.6.4](https://github.com/solidusio/solidus_auth_devise/tree/v1.6.4) (2017-07-24)
95
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.6.3...v1.6.4)
96
+
97
+ **Closed issues:**
98
+
99
+ - Adding omniauthable to to Spree::User [\#98](https://github.com/solidusio/solidus_auth_devise/issues/98)
100
+ - Use of `helper\_method` should be wrapped in `respond\_to?` check [\#90](https://github.com/solidusio/solidus_auth_devise/issues/90)
101
+ - Deface Override requires solidus\_frontend [\#85](https://github.com/solidusio/solidus_auth_devise/issues/85)
45
102
 
46
- * Add missing translations for already_authenticated
47
- * Do not require core email validator
48
- * Remove dependency on `json`, `multi_json`
49
- * Remove unnecessary sass/coffeescript requires
50
- * Fix warnings on Rails 5, support Rails 5.1
51
- * Change deface dependency from `~> 1.0.0` to `~> 1.0`
103
+ **Merged pull requests:**
52
104
 
53
- ## Solidus Auth Devise v1.6.2 (2016-11-18)
105
+ - Seed improvements [\#102](https://github.com/solidusio/solidus_auth_devise/pull/102) ([cbrunsdon](https://github.com/cbrunsdon))
106
+ - Only apply frontend override if frontend present [\#95](https://github.com/solidusio/solidus_auth_devise/pull/95) ([stewart](https://github.com/stewart))
107
+ - Update outdated development dependencies [\#94](https://github.com/solidusio/solidus_auth_devise/pull/94) ([stewart](https://github.com/stewart))
108
+ - Remove use of deprecated `bypass` opt for sign\_in [\#93](https://github.com/solidusio/solidus_auth_devise/pull/93) ([stewart](https://github.com/stewart))
109
+ - Wrap use of `helper\_method` in `respond\_to?` [\#92](https://github.com/solidusio/solidus_auth_devise/pull/92) ([stewart](https://github.com/stewart))
110
+ - Remove unused line [\#75](https://github.com/solidusio/solidus_auth_devise/pull/75) ([Murph33](https://github.com/Murph33))
111
+
112
+ ## [v1.6.3](https://github.com/solidusio/solidus_auth_devise/tree/v1.6.3) (2017-05-09)
113
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.6.2...v1.6.3)
114
+
115
+ **Merged pull requests:**
116
+
117
+ - Remove dependency on json, multi\_json [\#91](https://github.com/solidusio/solidus_auth_devise/pull/91) ([jhawthorn](https://github.com/jhawthorn))
118
+ - Remove Unnecessary `require` statements. [\#89](https://github.com/solidusio/solidus_auth_devise/pull/89) ([stewart](https://github.com/stewart))
119
+ - Do not require core email validator [\#87](https://github.com/solidusio/solidus_auth_devise/pull/87) ([tvdeyen](https://github.com/tvdeyen))
120
+ - Fix warnings on Rails 5.0, support Rails 5.1 [\#86](https://github.com/solidusio/solidus_auth_devise/pull/86) ([jhawthorn](https://github.com/jhawthorn))
121
+ - Change deface dependency from `~\> 1.0.0` to `~\> 1.0` [\#81](https://github.com/solidusio/solidus_auth_devise/pull/81) ([jordan-brough](https://github.com/jordan-brough))
122
+ - Switch to rails 5 spec keyword request syntax [\#80](https://github.com/solidusio/solidus_auth_devise/pull/80) ([jhawthorn](https://github.com/jhawthorn))
123
+ - Add missing translations for already\_authenticated [\#79](https://github.com/solidusio/solidus_auth_devise/pull/79) ([vladstoick](https://github.com/vladstoick))
54
124
 
55
- * Fix an issue where invalid addresses could be persisted after starting a
56
- checkout as a guest and then returning to the cart page.
125
+ ## [v1.6.2](https://github.com/solidusio/solidus_auth_devise/tree/v1.6.2) (2016-11-18)
126
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.6.1...v1.6.2)
57
127
 
58
- ## Solidus Auth Devise v1.6.1 (2016-08-24)
128
+ **Fixed bugs:**
59
129
 
60
- * Replace usages of `before_filter` with `before_action` (#73)
130
+ - Don't save addresses inside update\_registration [\#76](https://github.com/solidusio/solidus_auth_devise/pull/76) ([jhawthorn](https://github.com/jhawthorn))
61
131
 
62
- ## Solidus Auth Devise v1.6.0 (2016-08-23)
132
+ **Closed issues:**
63
133
 
64
- * Loading of routes can be disabled through config (#71)
65
-
66
- * Support for Solidus 2.0 and Rails 5.0
134
+ - Install migration task not working [\#74](https://github.com/solidusio/solidus_auth_devise/issues/74)
67
135
 
68
- * Remove load-time manipulation of the Devise secret key (#67)
136
+ **Merged pull requests:**
69
137
 
70
- ## Solidus Auth Devise v1.5.0 (2016-07-18)
138
+ - Fix spec order dependencies and run in a random order [\#77](https://github.com/solidusio/solidus_auth_devise/pull/77) ([jhawthorn](https://github.com/jhawthorn))
71
139
 
72
- * Add call to set_current_order on sign in. This replaces a before filter that
73
- is being eliminated from Solidus controllers where set_current_order was
74
- called excessively.
75
-
76
- * Update backend views to only reference backend routes (#57)
77
-
78
- * Devise dependency updates
79
-
80
- The locked versions of Devise and Devise-Encryptable have been updated.
81
- Devise, in particular, has been bumped to a new major version, which removes
82
- support for the following:
83
-
84
- - Rails 3.2. and 4.0
85
- - Ruby 1.9 and 2.0
86
-
87
- These losses are deemed acceptable, as Solidus' core itself does not
88
- support any of these versions.
89
-
90
- For more details on the changes, see the Devise changelog:
91
- https://github.com/plataformatec/devise/blob/master/CHANGELOG.md
92
-
93
- Similar changes in `devise-encryptable`, with details in the changelog:
94
- https://github.com/plataformatec/devise-encryptable/blob/master/Changelog.md
95
-
96
- * Addition of Chinese translations (#64)
97
-
98
- ## Solidus Auth Devise v1.4.0 (2016-05-16)
99
-
100
- * Update hash syntax for routes.rb
101
- * Make route syntax consistent and modern
102
- * Make devise_for routes conditional
103
- * Test against solidus 1.3
104
- * check_authorization first in CheckoutController
105
- * Ensure current_order exists checking registration
106
- * Add vendor to .gitignore
107
- * Revert "ChcktController checks auth and registration first"
108
- * ChcktController checks auth and registration first
109
- * Remove obsolete regression test
110
- * Remove superfluous call to associate_user
111
- * Test and fix order association
112
- * Re-add Solidus 1.0 compatability
113
- * Improve readability of check_registration
114
- * Force registration when guest checkout not allowed
115
- * Improve check_registration spec for guest case
116
- * Add pg and mysql2 to Gemfile
117
- * Also test against v1.1 and v1.2
118
- * Allow https instead of git in gemfile
119
- * Ignore pkg directory
120
- * Update .travis.yml
121
- * Update README testing section
122
- * Fix specs now that order's store is required
123
- * Moved the encryptor setting for the User model into the devise config, allowing it to be easily overridden from the local devise config.
124
-
125
- ## Solidus Auth Devise v1.3.0 (2016-01-12)
126
-
127
- * Add capybara-screenshot
128
- * Remove restriction on sass-rails and coffee-rails
129
- * Remove the "Logged in as:" message
130
- * Correct use of font-awesome
131
- * Swap .inline-menu for specific hook
132
- * Add new template override
133
- * remove duplicate translation
134
- * add missing translations for German locale
135
-
136
- ## Solidus Auth Devise v1.2.3 (2015-11-30)
137
-
138
- * Add an explicit require to deface
139
- * Check if front/backend are available before decorating the controllers
140
- * Rename spree@example.com to admin@example.com
141
- * Skip the confirmation spec
142
- * Permit editing email
143
-
144
- ## Solidus Auth Devise v1.2.2 (2015-10-01)
145
-
146
- * Automatically regenerate a user's spree_api_key upon password change.
147
- * Inherit from Spree::Base
148
- * Explicitely add deface to gemfile
149
- * Remove some redundant includes
150
- * Remove unneeded monkey patching
151
- * Remove brittle spec
152
- * Pass store to from_address helper
153
- * Fix broken specs
154
-
155
- ## Solidus Auth Devise v1.2.0 (2015-07-22)
156
-
157
- * Use new extension point for access denied.
158
- * Explicitly include UserMethods on Spree::User
159
- * Bump rspec to 3.3 and remove minor patch restriction.
160
- * We no longer redirect to admin/orders by default.
161
- * Skip adding devise.rb if it already exists.
162
- * Fix checkout spec
163
- * Bump to RSpec 3.2
164
- * Use non-deprecated `deliver_now` in mailer spec.
165
- * Fix generator name.
166
-
167
- ## Solidus Auth Devise v1.1.0 (2015-06-03)
168
-
169
- * Updates for devise 3.5.1
170
- * Bump devise to ~> 3.5.1
171
- * Avoid stubbing to fix checkout spec
172
- * Minor update to README.md
173
- * Remove Spree::Core::ControllerHelpers::SSL
174
- * Add circle.yml
175
- * Use git+ssh for solidus gem
176
- * Remove dead code.
177
- * Refactor UserSessionsController and specs
178
- * Remove @user from UserRegistrationsController
179
- * Add specs for UserRegistrationsController
180
- * Remove empty overrides in registrations controller
181
-
182
- ## Solidus Auth Devise v1.0.0 (2015-05-26)
183
-
184
- * Initial Release
140
+ ## [v1.6.1](https://github.com/solidusio/solidus_auth_devise/tree/v1.6.1) (2016-08-24)
141
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.6.0...v1.6.1)
142
+
143
+ **Merged pull requests:**
144
+
145
+ - Replace before\_filter with before\_action [\#73](https://github.com/solidusio/solidus_auth_devise/pull/73) ([jhawthorn](https://github.com/jhawthorn))
146
+
147
+ ## [v1.6.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.6.0) (2016-08-23)
148
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.5.0...v1.6.0)
149
+
150
+ **Merged pull requests:**
151
+
152
+ - Solidus 2.0 and Rails 5 [\#72](https://github.com/solidusio/solidus_auth_devise/pull/72) ([jhawthorn](https://github.com/jhawthorn))
153
+ - Loading of routes can be disabled through config [\#71](https://github.com/solidusio/solidus_auth_devise/pull/71) ([gmacdougall](https://github.com/gmacdougall))
154
+ - Skip admin override for Solidus \>= 1.0 [\#69](https://github.com/solidusio/solidus_auth_devise/pull/69) ([jhawthorn](https://github.com/jhawthorn))
155
+ - Replace spree\_{get,post,put,delete} with normal methods [\#68](https://github.com/solidusio/solidus_auth_devise/pull/68) ([jhawthorn](https://github.com/jhawthorn))
156
+ - Remove load-time manipulation of the secret\_key [\#67](https://github.com/solidusio/solidus_auth_devise/pull/67) ([jhawthorn](https://github.com/jhawthorn))
157
+
158
+ ## [v1.5.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.5.0) (2016-07-18)
159
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.4.0...v1.5.0)
160
+
161
+ **Closed issues:**
162
+
163
+ - AuthenticationHelpers reference routes that may not exist [\#59](https://github.com/solidusio/solidus_auth_devise/issues/59)
164
+ - No CHANGELOG for this repo [\#54](https://github.com/solidusio/solidus_auth_devise/issues/54)
165
+ - Latest release on GitHub is out of date [\#53](https://github.com/solidusio/solidus_auth_devise/issues/53)
166
+
167
+ **Merged pull requests:**
168
+
169
+ - Flesh out installation instructions [\#66](https://github.com/solidusio/solidus_auth_devise/pull/66) ([stewart](https://github.com/stewart))
170
+ - Correct Deprecation Errors in CI [\#65](https://github.com/solidusio/solidus_auth_devise/pull/65) ([stewart](https://github.com/stewart))
171
+ - Add Chinese translations in zh-CN.yml [\#64](https://github.com/solidusio/solidus_auth_devise/pull/64) ([chrisradford](https://github.com/chrisradford))
172
+ - Loosen devise dependency to ~\> 4.1 [\#63](https://github.com/solidusio/solidus_auth_devise/pull/63) ([jhawthorn](https://github.com/jhawthorn))
173
+ - Use routes.draw [\#62](https://github.com/solidusio/solidus_auth_devise/pull/62) ([jhawthorn](https://github.com/jhawthorn))
174
+ - Add guard for frontend-based AuthenticationHelpers [\#60](https://github.com/solidusio/solidus_auth_devise/pull/60) ([stewart](https://github.com/stewart))
175
+ - Misc: Update Dependency Versions [\#58](https://github.com/solidusio/solidus_auth_devise/pull/58) ([stewart](https://github.com/stewart))
176
+ - Backend views should only reference backend routes [\#57](https://github.com/solidusio/solidus_auth_devise/pull/57) ([bbuchalter](https://github.com/bbuchalter))
177
+ - Refactor Spree::Auth::Engine [\#56](https://github.com/solidusio/solidus_auth_devise/pull/56) ([stewart](https://github.com/stewart))
178
+ - Backend views should only reference backend routes [\#52](https://github.com/solidusio/solidus_auth_devise/pull/52) ([bbuchalter](https://github.com/bbuchalter))
179
+ - Call set\_current\_order explicitly where we need it [\#51](https://github.com/solidusio/solidus_auth_devise/pull/51) ([Murph33](https://github.com/Murph33))
180
+ - Misc: Syntax Cleanup [\#50](https://github.com/solidusio/solidus_auth_devise/pull/50) ([stewart](https://github.com/stewart))
181
+
182
+ ## [v1.4.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.4.0) (2016-05-16)
183
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.3.0...v1.4.0)
184
+
185
+ **Merged pull requests:**
186
+
187
+ - Conditional routing [\#49](https://github.com/solidusio/solidus_auth_devise/pull/49) ([bbuchalter](https://github.com/bbuchalter))
188
+ - check\_authorization first in CheckoutController [\#47](https://github.com/solidusio/solidus_auth_devise/pull/47) ([bbuchalter](https://github.com/bbuchalter))
189
+ - Revert "ChcktController checks auth and registration first" [\#46](https://github.com/solidusio/solidus_auth_devise/pull/46) ([bbuchalter](https://github.com/bbuchalter))
190
+ - ChcktController checks auth and registration first [\#44](https://github.com/solidusio/solidus_auth_devise/pull/44) ([bbuchalter](https://github.com/bbuchalter))
191
+ - Remove obsolete regression test [\#43](https://github.com/solidusio/solidus_auth_devise/pull/43) ([jhawthorn](https://github.com/jhawthorn))
192
+ - Improve order association [\#42](https://github.com/solidusio/solidus_auth_devise/pull/42) ([mvz](https://github.com/mvz))
193
+ - Re-add Solidus 1.0 compatability [\#40](https://github.com/solidusio/solidus_auth_devise/pull/40) ([jhawthorn](https://github.com/jhawthorn))
194
+ - Update travis.yml [\#39](https://github.com/solidusio/solidus_auth_devise/pull/39) ([jhawthorn](https://github.com/jhawthorn))
195
+ - Honor guest checkout config [\#36](https://github.com/solidusio/solidus_auth_devise/pull/36) ([bbuchalter](https://github.com/bbuchalter))
196
+ - Update README testing section [\#35](https://github.com/solidusio/solidus_auth_devise/pull/35) ([bbuchalter](https://github.com/bbuchalter))
197
+ - Fix specs now that order's store is required [\#34](https://github.com/solidusio/solidus_auth_devise/pull/34) ([jhawthorn](https://github.com/jhawthorn))
198
+ - Moved the encryptor setting for the User model into the devise config [\#32](https://github.com/solidusio/solidus_auth_devise/pull/32) ([lukepfarrar](https://github.com/lukepfarrar))
199
+
200
+ ## [v1.3.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.3.0) (2016-01-12)
201
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.2.3...v1.3.0)
202
+
203
+ **Merged pull requests:**
204
+
205
+ - Add Capybara screenshot [\#30](https://github.com/solidusio/solidus_auth_devise/pull/30) ([jhawthorn](https://github.com/jhawthorn))
206
+ - Missing translations for German locale [\#29](https://github.com/solidusio/solidus_auth_devise/pull/29) ([pedropereira](https://github.com/pedropereira))
207
+ - Admin navigation sidebar [\#28](https://github.com/solidusio/solidus_auth_devise/pull/28) ([Sinetheta](https://github.com/Sinetheta))
208
+
209
+ ## [v1.2.3](https://github.com/solidusio/solidus_auth_devise/tree/v1.2.3) (2015-11-30)
210
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.2.2...v1.2.3)
211
+
212
+ **Closed issues:**
213
+
214
+ - How to access current\_user? [\#26](https://github.com/solidusio/solidus_auth_devise/issues/26)
215
+
216
+ **Merged pull requests:**
217
+
218
+ - Add an explicit require to deface [\#27](https://github.com/solidusio/solidus_auth_devise/pull/27) ([jhawthorn](https://github.com/jhawthorn))
219
+ - Check if front/backend are available before decorating the controllers [\#25](https://github.com/solidusio/solidus_auth_devise/pull/25) ([nwittstruck](https://github.com/nwittstruck))
220
+ - Rename spree@example.com to admin@example.com [\#23](https://github.com/solidusio/solidus_auth_devise/pull/23) ([jhawthorn](https://github.com/jhawthorn))
221
+ - Fix registration errors [\#22](https://github.com/solidusio/solidus_auth_devise/pull/22) ([jhawthorn](https://github.com/jhawthorn))
222
+
223
+ ## [v1.2.2](https://github.com/solidusio/solidus_auth_devise/tree/v1.2.2) (2015-10-01)
224
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.2.0...v1.2.2)
225
+
226
+ **Closed issues:**
227
+
228
+ - Should Spree::User inherit from Spree::Base [\#18](https://github.com/solidusio/solidus_auth_devise/issues/18)
229
+
230
+ **Merged pull requests:**
231
+
232
+ - Automatically regenerate a user's spree\_api\_key upon password change. [\#21](https://github.com/solidusio/solidus_auth_devise/pull/21) ([athal7](https://github.com/athal7))
233
+ - Inherit from Spree::Base [\#20](https://github.com/solidusio/solidus_auth_devise/pull/20) ([magnusvk](https://github.com/magnusvk))
234
+ - Explicitely add deface to gemfile [\#19](https://github.com/solidusio/solidus_auth_devise/pull/19) ([cbrunsdon](https://github.com/cbrunsdon))
235
+ - Version 1.2.1 [\#17](https://github.com/solidusio/solidus_auth_devise/pull/17) ([jordan-brough](https://github.com/jordan-brough))
236
+ - Remove some redundant includes [\#16](https://github.com/solidusio/solidus_auth_devise/pull/16) ([jordan-brough](https://github.com/jordan-brough))
237
+ - Remove brittle spec [\#15](https://github.com/solidusio/solidus_auth_devise/pull/15) ([adammathys](https://github.com/adammathys))
238
+ - Fix some specs [\#14](https://github.com/solidusio/solidus_auth_devise/pull/14) ([adammathys](https://github.com/adammathys))
239
+
240
+ ## [v1.2.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.2.0) (2015-07-22)
241
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.1.0...v1.2.0)
242
+
243
+ **Merged pull requests:**
244
+
245
+ - Fix spec failures after Solidus changes [\#13](https://github.com/solidusio/solidus_auth_devise/pull/13) ([Senjai](https://github.com/Senjai))
246
+ - Use new access denied extension point. [\#12](https://github.com/solidusio/solidus_auth_devise/pull/12) ([adammathys](https://github.com/adammathys))
247
+ - Skip adding devise.rb if it already exists. [\#11](https://github.com/solidusio/solidus_auth_devise/pull/11) ([adammathys](https://github.com/adammathys))
248
+ - Fix checkout spec [\#10](https://github.com/solidusio/solidus_auth_devise/pull/10) ([jhawthorn](https://github.com/jhawthorn))
249
+ - Minor tweaks and deprecation warning fixes. [\#9](https://github.com/solidusio/solidus_auth_devise/pull/9) ([adammathys](https://github.com/adammathys))
250
+
251
+ ## [v1.1.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.1.0) (2015-06-03)
252
+ [Full Changelog](https://github.com/solidusio/solidus_auth_devise/compare/v1.0.0...v1.1.0)
253
+
254
+ **Merged pull requests:**
255
+
256
+ - Version 1.1.0 [\#8](https://github.com/solidusio/solidus_auth_devise/pull/8) ([jhawthorn](https://github.com/jhawthorn))
257
+ - Fixes for latest solidus + add CircleCI [\#7](https://github.com/solidusio/solidus_auth_devise/pull/7) ([jhawthorn](https://github.com/jhawthorn))
258
+ - Use git+ssh for solidus gem [\#6](https://github.com/solidusio/solidus_auth_devise/pull/6) ([jhawthorn](https://github.com/jhawthorn))
259
+ - Remove dead code. [\#5](https://github.com/solidusio/solidus_auth_devise/pull/5) ([adammathys](https://github.com/adammathys))
260
+ - Clean-up frontend registrations and sessions controllers [\#4](https://github.com/solidusio/solidus_auth_devise/pull/4) ([forkata](https://github.com/forkata))
261
+ - Minor update to README.md [\#3](https://github.com/solidusio/solidus_auth_devise/pull/3) ([adammathys](https://github.com/adammathys))
262
+
263
+ ## [v1.0.0](https://github.com/solidusio/solidus_auth_devise/tree/v1.0.0) (2015-05-26)
264
+ **Merged pull requests:**
265
+
266
+ - Use solidus gem instead of spree [\#2](https://github.com/solidusio/solidus_auth_devise/pull/2) ([jhawthorn](https://github.com/jhawthorn))
267
+ - The rename! [\#1](https://github.com/solidusio/solidus_auth_devise/pull/1) ([adammathys](https://github.com/adammathys))
268
+
269
+
270
+
271
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
@@ -9,11 +11,8 @@ group :test do
9
11
  else
10
12
  gem "rails_test_params_backport"
11
13
  end
12
- if branch < "v2.5"
13
- gem 'factory_bot', '4.10.0'
14
- else
15
- gem 'factory_bot', '> 4.10.0'
16
- end
14
+
15
+ gem 'factory_bot', (branch < 'v2.5' ? '4.10.0' : '> 4.10.0')
17
16
  end
18
17
 
19
18
  if ENV['DB'] == 'mysql'
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Solidus Auth (Devise)
2
2
  =====================
3
3
 
4
+ [![CircleCI](https://circleci.com/gh/solidusio/solidus_auth_devise.svg?style=svg)](https://circleci.com/gh/solidusio/solidus_auth_devise)
5
+
4
6
  Provides authentication services for Solidus, using the Devise gem.
5
7
 
6
8
  Installation
@@ -94,8 +96,9 @@ Run the following to automatically build a dummy app if necessary and run the te
94
96
  bundle exec rake
95
97
  ```
96
98
 
97
- Releasing
98
- ---------
99
+ ## Releasing a new version
100
+
101
+ #### 1. Bump gem version and push to RubyGems
99
102
 
100
103
  We use [gem-release](https://github.com/svenfuchs/gem-release) to release this
101
104
  extension with ease.
@@ -104,7 +107,7 @@ Supposing you are on the master branch and you are working on a fork of this
104
107
  extension, `upstream` is the main remote and you have write access to it, you
105
108
  can simply run:
106
109
 
107
- ```
110
+ ```bash
108
111
  gem bump --version minor --tag --release
109
112
  ```
110
113
 
@@ -118,8 +121,22 @@ This command will:
118
121
 
119
122
  Or you can run these commands individually:
120
123
 
121
- ```
122
- gem bump --version minor
124
+ ```bash
125
+ gem bump --version minor
123
126
  gem tag
124
127
  gem release
125
128
  ```
129
+
130
+ #### 2. Publish the updated CHANGELOG
131
+
132
+ After the release is done we can generate the updated CHANGELOG
133
+ using
134
+ [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator)
135
+ by running the following command:
136
+
137
+
138
+ ```bash
139
+ bundle exec github_changelog_generator solidusio/solidus_auth_devise --token YOUR_GITHUB_TOKEN
140
+ git commit -am 'Update CHANGELOG'
141
+ git push upstream master
142
+ ```
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler'
2
4
  Bundler::GemHelper.install_tasks
3
5
 
@@ -1,12 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Spree
2
4
  class UserMailer < BaseMailer
3
- def reset_password_instructions(user, token, *args)
5
+ def reset_password_instructions(user, token, *_args)
4
6
  @store = Spree::Store.default
5
7
  @edit_password_reset_url = spree.edit_spree_user_password_url(reset_password_token: token, host: @store.url)
6
8
  mail to: user.email, from: from_address(@store), subject: "#{@store.name} #{I18n.t(:subject, scope: [:devise, :mailer, :reset_password_instructions])}"
7
9
  end
8
10
 
9
- def confirmation_instructions(user, token, opts={})
11
+ def confirmation_instructions(user, token, _opts = {})
10
12
  @store = Spree::Store.default
11
13
  @confirmation_url = spree.spree_user_confirmation_url(confirmation_token: token, host: @store.url)
12
14
  mail to: user.email, from: from_address(@store), subject: "#{@store.name} #{I18n.t(:subject, scope: [:devise, :mailer, :confirmation_instructions])}"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Spree
2
4
  class AuthConfiguration < Preferences::Configuration
3
5
  preference :registration_step, :boolean, default: true