solidus_auth_devise 2.3.0 → 2.5.3

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.

Potentially problematic release.


This version of solidus_auth_devise might be problematic. Click here for more details.

Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.gem_release.yml +3 -8
  3. data/.github/stale.yml +17 -0
  4. data/.gitignore +12 -8
  5. data/.rubocop.yml +1 -325
  6. data/CHANGELOG.md +106 -6
  7. data/Gemfile +20 -21
  8. data/{LICENSE.md → LICENSE} +2 -2
  9. data/README.md +1 -42
  10. data/app/models/spree/user.rb +4 -0
  11. data/app/overrides/spree/admin/users/edit/_add_reset_password_form.html.erb.deface +20 -0
  12. data/bin/console +17 -0
  13. data/bin/rails +12 -4
  14. data/bin/setup +8 -0
  15. data/config/locales/it.yml +4 -4
  16. data/db/migrate/20200417153503_add_unconfirmed_email_to_spree_users.rb +7 -0
  17. data/lib/controllers/backend/spree/admin/user_passwords_controller.rb +1 -1
  18. data/lib/controllers/frontend/spree/users_controller.rb +5 -2
  19. data/lib/{controllers/backend → decorators/backend/controllers}/spree/admin/base_controller_decorator.rb +0 -0
  20. data/lib/{controllers/backend → decorators/backend/controllers}/spree/admin/orders/customer_details_controller_decorator.rb +6 -2
  21. data/lib/{controllers/frontend → decorators/frontend/controllers}/spree/checkout_controller_decorator.rb +0 -0
  22. data/lib/generators/solidus/auth/install/install_generator.rb +12 -2
  23. data/lib/solidus_auth_devise.rb +10 -12
  24. data/lib/spree/auth/devise.rb +0 -7
  25. data/lib/spree/auth/engine.rb +48 -35
  26. data/lib/spree/auth/version.rb +1 -1
  27. data/{app/models → lib}/spree/auth_configuration.rb +0 -0
  28. data/lib/views/backend/spree/admin/shared/_navigation_footer.html.erb +2 -2
  29. data/lib/views/backend/spree/admin/user_passwords/edit.html.erb +4 -4
  30. data/lib/views/backend/spree/admin/user_passwords/new.html.erb +4 -4
  31. data/lib/views/backend/spree/admin/user_sessions/authorization_failure.html.erb +1 -1
  32. data/lib/views/backend/spree/admin/user_sessions/new.html.erb +9 -9
  33. data/lib/views/backend/spree/layouts/admin/_login_nav.html.erb +4 -4
  34. data/lib/views/frontend/spree/checkout/registration.html.erb +4 -4
  35. data/lib/views/frontend/spree/shared/_login.html.erb +4 -4
  36. data/lib/views/frontend/spree/shared/_login_bar_items.html.erb +3 -3
  37. data/lib/views/frontend/spree/shared/_user_form.html.erb +3 -3
  38. data/lib/views/frontend/spree/user_passwords/edit.html.erb +4 -4
  39. data/lib/views/frontend/spree/user_passwords/new.html.erb +4 -4
  40. data/lib/views/frontend/spree/user_registrations/new.html.erb +3 -3
  41. data/lib/views/frontend/spree/user_sessions/authorization_failure.html.erb +1 -1
  42. data/lib/views/frontend/spree/user_sessions/new.html.erb +2 -2
  43. data/lib/views/frontend/spree/users/edit.html.erb +2 -2
  44. data/lib/views/frontend/spree/users/show.html.erb +13 -13
  45. data/solidus_auth_devise.gemspec +28 -33
  46. data/spec/controllers/spree/admin/base_controller_spec.rb +53 -0
  47. data/spec/controllers/spree/base_controller_spec.rb +53 -0
  48. data/spec/controllers/spree/products_controller_spec.rb +3 -7
  49. data/spec/controllers/spree/users_controller_spec.rb +23 -0
  50. data/spec/features/admin/password_reset_spec.rb +43 -0
  51. data/spec/features/checkout_spec.rb +7 -32
  52. data/spec/features/confirmation_spec.rb +2 -3
  53. data/spec/models/user_spec.rb +13 -8
  54. data/spec/spec_helper.rb +10 -8
  55. data/spec/support/confirm_helpers.rb +19 -10
  56. data/spec/support/features/fill_addresses_fields.rb +29 -0
  57. metadata +3151 -275
  58. data/app/overrides/auth_admin_login_navigation_bar.rb +0 -10
  59. data/app/overrides/auth_shared_login_bar.rb +0 -10
  60. data/lib/assets/javascripts/spree/backend/solidus_auth.js +0 -1
  61. data/lib/assets/javascripts/spree/frontend/solidus_auth.js +0 -1
  62. data/lib/assets/stylesheets/spree/backend/solidus_auth.css +0 -3
  63. data/lib/assets/stylesheets/spree/frontend/solidus_auth.css +0 -3
  64. data/spec/features/admin/orders_spec.rb +0 -31
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Spree
4
4
  module Auth
5
- VERSION = '2.3.0'
5
+ VERSION = '2.5.3'
6
6
  end
7
7
  end
@@ -16,7 +16,7 @@
16
16
  <li data-hook="user-logout-link">
17
17
  <%= link_to spree.admin_logout_path, method: Devise.sign_out_via do %>
18
18
  <i class='fa fa-sign-out'></i>
19
- <%= I18n.t('spree.logout') %>
19
+ <%= t('spree.logout') %>
20
20
  <% end %>
21
21
  </li>
22
22
 
@@ -24,7 +24,7 @@
24
24
  <li data-hook="store-frontend-link">
25
25
  <%= link_to spree.root_path, target: '_blank' do %>
26
26
  <i class='fa fa-external-link'></i>
27
- <%= I18n.t('spree.back_to_store') %>
27
+ <%= t('spree.back_to_store') %>
28
28
  <% end %>
29
29
  </li>
30
30
  <% end %>
@@ -1,15 +1,15 @@
1
1
  <%= render partial: 'spree/shared/error_messages', locals: { target: @spree_user } %>
2
- <h2><%= I18n.t('spree.change_my_password') %></h2>
2
+ <h2><%= t('spree.change_my_password') %></h2>
3
3
 
4
4
  <%= form_for @spree_user, as: :spree_user, url: spree.update_password_path, method: :put do |f| %>
5
5
  <p>
6
- <%= f.label :password, I18n.t('spree.password') %><br />
6
+ <%= f.label :password, t('spree.password') %><br />
7
7
  <%= f.password_field :password %><br />
8
8
  </p>
9
9
  <p>
10
- <%= f.label :password_confirmation, I18n.t('spree.confirm_password') %><br />
10
+ <%= f.label :password_confirmation, t('spree.confirm_password') %><br />
11
11
  <%= f.password_field :password_confirmation %><br />
12
12
  </p>
13
13
  <%= f.hidden_field :reset_password_token %>
14
- <%= f.submit I18n.t('spree.update'), class: 'button primary' %>
14
+ <%= f.submit t('spree.update'), class: 'button primary' %>
15
15
  <% end %>
@@ -1,15 +1,15 @@
1
1
  <div id="forgot-password">
2
- <h6><%= I18n.t('spree.forgot_password') %></h6>
2
+ <h6><%= t('spree.forgot_password') %></h6>
3
3
 
4
- <p><%= I18n.t('spree.instructions_to_reset_password') %></p>
4
+ <p><%= t('spree.instructions_to_reset_password') %></p>
5
5
 
6
6
  <%= form_for Spree::User.new, as: :spree_user, url: spree.admin_reset_password_path do |f| %>
7
7
  <p>
8
- <%= f.label :email, I18n.t('spree.email') %><br />
8
+ <%= f.label :email, t('spree.email') %><br />
9
9
  <%= f.email_field :email, required: true %>
10
10
  </p>
11
11
  <p>
12
- <%= f.submit I18n.t('spree.reset_password'), class: 'button primary' %>
12
+ <%= f.submit t('spree.reset_password'), class: 'button primary' %>
13
13
  </p>
14
14
  <% end %>
15
15
  </div>
@@ -1,4 +1,4 @@
1
1
  <div style="height:50px; padding-top:20px;">
2
- <strong><%= I18n.t('spree.authorization_failure') %></strong>
2
+ <strong><%= t('spree.authorization_failure') %></strong>
3
3
  </div>
4
4
  <!-- Add your own custom access denied message here if you like -->
@@ -4,28 +4,28 @@
4
4
 
5
5
  <% @body_id = 'login' %>
6
6
  <div id="existing-customer">
7
- <h6><%= I18n.t('spree.admin_login') %></h6>
7
+ <h6><%= t('spree.admin_login') %></h6>
8
8
  <div data-hook="login">
9
9
  <%= form_for Spree::User.new, as: :spree_user, url: spree.admin_create_new_session_path do |f| %>
10
10
  <div id="password-credentials">
11
11
  <p>
12
- <%= f.label :email, I18n.t('spree.email') %><br />
13
- <%= f.email_field :email, class: 'title', tabindex: 1 %>
12
+ <%= f.label :email, t('spree.email') %><br />
13
+ <%= f.email_field :email, class: 'title', tabindex: 1, autocomplete: 'username' %>
14
14
  </p>
15
15
  <p>
16
- <%= f.label :password, I18n.t('spree.password') %><br />
17
- <%= f.password_field :password, class: 'title', tabindex: 2 %>
16
+ <%= f.label :password, t('spree.password') %><br />
17
+ <%= f.password_field :password, class: 'title', tabindex: 2, autocomplete: 'current-password' %>
18
18
  </p>
19
19
  </div>
20
20
  <p>
21
21
  <%= f.check_box :remember_me, tabindex: 3 %>
22
- <%= f.label :remember_me, I18n.t('spree.remember_me') %>
22
+ <%= f.label :remember_me, t('spree.remember_me') %>
23
23
  </p>
24
24
 
25
- <p><%= f.submit I18n.t('spree.login'), class: 'btn btn-primary', tabindex: 4 %></p>
25
+ <p><%= f.submit t('spree.login'), class: 'btn btn-primary', tabindex: 4 %></p>
26
26
  <% end %>
27
- <%= I18n.t('spree.or') %>
28
- <%= link_to I18n.t('spree.forgot_password'), spree.admin_recover_password_path %>
27
+ <%= t('spree.or') %>
28
+ <%= link_to t('spree.forgot_password'), spree.admin_recover_password_path %>
29
29
  </div>
30
30
  </div>
31
31
  <div data-hook="login_extras"></div>
@@ -1,12 +1,12 @@
1
1
  <% if spree_current_user %>
2
2
  <ul id="login-nav" class="inline-menu">
3
- <li data-hook="user-logged-in-as"><%= I18n.t('spree.logged_in_as') %>: <%= spree_current_user.email %></li>
4
- <li data-hook="user-account-link" class='fa fa-user'><%= link_to I18n.t('spree.account'), spree.edit_admin_user_path(spree_current_user) %></li>
5
- <li data-hook="user-logout-link" class='fa fa-sign-out'><%= link_to I18n.t('spree.logout'), spree.admin_logout_path %></li>
3
+ <li data-hook="user-logged-in-as"><%= t('spree.logged_in_as') %>: <%= spree_current_user.email %></li>
4
+ <li data-hook="user-account-link" class='fa fa-user'><%= link_to t('spree.account'), spree.edit_admin_user_path(spree_current_user) %></li>
5
+ <li data-hook="user-logout-link" class='fa fa-sign-out'><%= link_to t('spree.logout'), spree.admin_logout_path %></li>
6
6
 
7
7
  <% if spree.respond_to? :root_path %>
8
8
  <li data-hook="store-frontend-link" class='fa fa-external-link'>
9
- <%= link_to I18n.t('spree.back_to_store'), spree.root_path, target: '_blank' %>
9
+ <%= link_to t('spree.back_to_store'), spree.root_path, target: '_blank' %>
10
10
  </li>
11
11
  <% end %>
12
12
  </ul>
@@ -1,21 +1,21 @@
1
1
  <%= render partial: 'spree/shared/error_messages', locals: { target: @user } %>
2
- <h1><%= I18n.t('spree.registration') %></h1>
2
+ <h1><%= t('spree.registration') %></h1>
3
3
  <div id="registration" data-hook>
4
4
  <div id="account" class="columns alpha eight">
5
5
  <%= render template: 'spree/user_sessions/new' %>
6
6
  </div>
7
7
  <% if Spree::Config[:allow_guest_checkout] %>
8
8
  <div id="guest_checkout" data-hook class="columns omega eight">
9
- <h6><%= I18n.t('spree.guest_user_account') %></h6>
9
+ <h6><%= t('spree.guest_user_account') %></h6>
10
10
  <% if flash[:registration_error] %>
11
11
  <div class='flash error'><%= flash[:registration_error] %></div>
12
12
  <% end %>
13
13
  <%= form_for @order, url: update_checkout_registration_path, method: :put, html: { id: 'checkout_form_registration' } do |f| %>
14
14
  <p>
15
- <%= f.label :email, I18n.t('spree.email') %><br />
15
+ <%= f.label :email, t('spree.email') %><br />
16
16
  <%= f.email_field :email, class: 'title' %>
17
17
  </p>
18
- <p><%= f.submit I18n.t('spree.continue'), class: 'button primary' %></p>
18
+ <p><%= f.submit t('spree.continue'), class: 'button primary' %></p>
19
19
  <% end %>
20
20
  </div>
21
21
  <% end %>
@@ -1,18 +1,18 @@
1
1
  <%= form_for Spree::User.new, as: :spree_user, url: spree.create_new_session_path do |f| %>
2
2
  <div id="password-credentials">
3
3
  <p>
4
- <%= f.label :email, I18n.t('spree.email') %><br />
4
+ <%= f.label :email, t('spree.email') %><br />
5
5
  <%= f.email_field :email, class: 'title', tabindex: 1, autofocus: true %>
6
6
  </p>
7
7
  <p>
8
- <%= f.label :password, I18n.t('spree.password') %><br />
8
+ <%= f.label :password, t('spree.password') %><br />
9
9
  <%= f.password_field :password, class: 'title', tabindex: 2 %>
10
10
  </p>
11
11
  </div>
12
12
  <p>
13
13
  <%= f.check_box :remember_me, tabindex: 3 %>
14
- <%= f.label :remember_me, I18n.t('spree.remember_me') %>
14
+ <%= f.label :remember_me, t('spree.remember_me') %>
15
15
  </p>
16
16
 
17
- <p><%= f.submit I18n.t('spree.login'), class: 'button primary', tabindex: 4 %></p>
17
+ <p><%= f.submit t('spree.login'), class: 'button primary', tabindex: 4 %></p>
18
18
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <% if spree_current_user %>
2
- <li><%= link_to I18n.t('spree.my_account'), spree.account_path %></li>
3
- <li><%= link_to I18n.t('spree.logout'), spree.logout_path, method: Devise.sign_out_via %></li>
2
+ <li><%= link_to t('spree.my_account'), spree.account_path %></li>
3
+ <li><%= link_to t('spree.logout'), spree.logout_path, method: Devise.sign_out_via %></li>
4
4
  <% else %>
5
- <li id="link-to-login"><%= link_to I18n.t('spree.login'), spree.login_path %></li>
5
+ <li id="link-to-login"><%= link_to t('spree.login'), spree.login_path %></li>
6
6
  <% end %>
@@ -1,15 +1,15 @@
1
1
  <p>
2
- <%= f.label :email, I18n.t('spree.email') %><br />
2
+ <%= f.label :email, t('spree.email') %><br />
3
3
  <%= f.email_field :email, class: 'title' %>
4
4
  </p>
5
5
  <div id="password-credentials">
6
6
  <p>
7
- <%= f.label :password, I18n.t('spree.password') %><br />
7
+ <%= f.label :password, t('spree.password') %><br />
8
8
  <%= f.password_field :password, class: 'title' %>
9
9
  </p>
10
10
 
11
11
  <p>
12
- <%= f.label :password_confirmation, I18n.t('spree.confirm_password') %><br />
12
+ <%= f.label :password_confirmation, t('spree.confirm_password') %><br />
13
13
  <%= f.password_field :password_confirmation, class: 'title' %>
14
14
  </p>
15
15
  </div>
@@ -1,17 +1,17 @@
1
1
  <%= render partial: 'spree/shared/error_messages', locals: { target: @spree_user } %>
2
2
  <div id="change-password">
3
- <h6><%= I18n.t('spree.change_my_password') %></h6>
3
+ <h6><%= t('spree.change_my_password') %></h6>
4
4
 
5
5
  <%= form_for @spree_user, as: :spree_user, url: spree.update_password_path, method: :put do |f| %>
6
6
  <p>
7
- <%= f.label :password, I18n.t('spree.password') %><br />
7
+ <%= f.label :password, t('spree.password') %><br />
8
8
  <%= f.password_field :password %><br />
9
9
  </p>
10
10
  <p>
11
- <%= f.label :password_confirmation, I18n.t('spree.confirm_password') %><br />
11
+ <%= f.label :password_confirmation, t('spree.confirm_password') %><br />
12
12
  <%= f.password_field :password_confirmation %><br />
13
13
  </p>
14
14
  <%= f.hidden_field :reset_password_token %>
15
- <%= f.submit I18n.t('spree.update'), class: 'button primary' %>
15
+ <%= f.submit t('spree.update'), class: 'button primary' %>
16
16
  <% end %>
17
17
  </div>
@@ -1,15 +1,15 @@
1
1
  <div id="forgot-password">
2
- <h6><%= I18n.t('spree.forgot_password') %></h6>
2
+ <h6><%= t('spree.forgot_password') %></h6>
3
3
 
4
- <p><%= I18n.t('spree.instructions_to_reset_password') %></p>
4
+ <p><%= t('spree.instructions_to_reset_password') %></p>
5
5
 
6
6
  <%= form_for Spree::User.new, as: :spree_user, url: spree.reset_password_path do |f| %>
7
7
  <p>
8
- <%= f.label :email, I18n.t('spree.email') %><br />
8
+ <%= f.label :email, t('spree.email') %><br />
9
9
  <%= f.email_field :email, required: true %>
10
10
  </p>
11
11
  <p>
12
- <%= f.submit I18n.t('spree.reset_password'), class: 'button primary' %>
12
+ <%= f.submit t('spree.reset_password'), class: 'button primary' %>
13
13
  </p>
14
14
  <% end %>
15
15
  </div>
@@ -3,16 +3,16 @@
3
3
  <%= render 'spree/shared/error_messages', target: resource %>
4
4
 
5
5
  <div id="new-customer">
6
- <h6><%= I18n.t('spree.new_customer') %></h6>
6
+ <h6><%= t('spree.new_customer') %></h6>
7
7
 
8
8
  <div data-hook="signup">
9
9
  <%= form_for resource, as: :spree_user, url: spree.registration_path(resource) do |f| %>
10
10
  <div data-hook="signup_inside_form">
11
11
  <%= render partial: 'spree/shared/user_form', locals: { f: f } %>
12
- <p><%= f.submit I18n.t('spree.create'), class: 'button primary' %></p>
12
+ <p><%= f.submit t('spree.create'), class: 'button primary' %></p>
13
13
  </div>
14
14
  <% end %>
15
- <%= I18n.t('spree.or') %>&nbsp;<%= link_to I18n.t('spree.login_as_existing'), spree.login_path %>
15
+ <%= t('spree.or') %>&nbsp;<%= link_to t('spree.login_as_existing'), spree.login_path %>
16
16
 
17
17
  </div>
18
18
 
@@ -1,4 +1,4 @@
1
1
  <div style="height:50px; padding-top:20px;">
2
- <strong><%= I18n.t('spree.authorization_failure') %></strong>
2
+ <strong><%= t('spree.authorization_failure') %></strong>
3
3
  </div>
4
4
  <!-- Add your own custom access denied message here if you like -->
@@ -4,10 +4,10 @@
4
4
 
5
5
  <% @body_id = 'login' %>
6
6
  <div id="existing-customer">
7
- <h6><%= I18n.t('spree.login_as_existing') %></h6>
7
+ <h6><%= t('spree.login_as_existing') %></h6>
8
8
  <div data-hook="login">
9
9
  <%= render partial: 'spree/shared/login' %>
10
- <%= I18n.t('spree.or') %>&nbsp;<%= link_to I18n.t('spree.create_a_new_account'), spree.signup_path %> | <%= link_to I18n.t('spree.forgot_password'), spree.recover_password_path %>
10
+ <%= t('spree.or') %>&nbsp;<%= link_to t('spree.create_a_new_account'), spree.signup_path %> | <%= link_to t('spree.forgot_password'), spree.recover_password_path %>
11
11
  </div>
12
12
  </div>
13
13
  <div data-hook="login_extras"></div>
@@ -1,13 +1,13 @@
1
1
  <%= render partial: 'spree/shared/error_messages', locals: { target: @user } %>
2
2
 
3
3
  <div id="edit-account">
4
- <h1><%= I18n.t('spree.editing_user') %></h1>
4
+ <h1><%= t('spree.editing_user') %></h1>
5
5
 
6
6
  <div data-hook="account_edit">
7
7
  <%= form_for Spree::User.new, as: @user, url: spree.user_path(@user), method: :put do |f| %>
8
8
  <%= render partial: 'spree/shared/user_form', locals: { f: f } %>
9
9
  <p>
10
- <%= f.submit I18n.t('spree.update'), class: 'button primary' %>
10
+ <%= f.submit t('spree.update'), class: 'button primary' %>
11
11
  </p>
12
12
  <% end %>
13
13
  </div>
@@ -2,24 +2,24 @@
2
2
 
3
3
  <div data-hook="account_summary" class="account-summary">
4
4
  <dl id="user-info">
5
- <dt><%= I18n.t('spree.email') %></dt>
6
- <dd><%= @user.email %> (<%= link_to I18n.t('spree.edit'), spree.edit_account_path %>)</dd>
5
+ <dt><%= t('spree.email') %></dt>
6
+ <dd><%= @user.email %> (<%= link_to t('spree.edit'), spree.edit_account_path %>)</dd>
7
7
  </dl>
8
8
  </div>
9
9
 
10
10
  <div data-hook="account_my_orders" class="account-my-orders">
11
11
 
12
- <h3><%= I18n.t('spree.my_orders') %></h3>
12
+ <h3><%= t('spree.my_orders') %></h3>
13
13
  <% if @orders.present? %>
14
14
  <table class="order-summary">
15
15
  <thead>
16
16
  <tr>
17
- <th class="order-number"><%= I18n.t(:number, scope: 'activerecord.attributes.spree/order') %></th>
18
- <th class="order-date"><%= I18n.t('spree.date') %></th>
19
- <th class="order-status"><%= I18n.t('spree.status') %></th>
20
- <th class="order-payment-state"><%= I18n.t('spree.payment_state') %></th>
21
- <th class="order-shipment-state"><%= I18n.t('spree.shipment_state') %></th>
22
- <th class="order-total"><%= I18n.t('spree.total') %></th>
17
+ <th class="order-number"><%= t(:number, scope: 'activerecord.attributes.spree/order') %></th>
18
+ <th class="order-date"><%= t('spree.date') %></th>
19
+ <th class="order-status"><%= t('spree.status') %></th>
20
+ <th class="order-payment-state"><%= t('spree.payment_state') %></th>
21
+ <th class="order-shipment-state"><%= t('spree.shipment_state') %></th>
22
+ <th class="order-total"><%= t('spree.total') %></th>
23
23
  </tr>
24
24
  </thead>
25
25
  <tbody>
@@ -27,16 +27,16 @@
27
27
  <tr class="<%= cycle('even', 'odd') %>">
28
28
  <td class="order-number"><%= link_to order.number, order_url(order) %></td>
29
29
  <td class="order-date"><%= l order.completed_at.to_date %></td>
30
- <td class="order-status"><%= I18n.t("spree.order_state.#{order.state}").titleize %></td>
31
- <td class="order-payment-state"><%= I18n.t("spree.payment_states.#{order.payment_state}").titleize if order.payment_state %></td>
32
- <td class="order-shipment-state"><%= I18n.t("spree.shipment_states.#{order.shipment_state}").titleize if order.shipment_state %></td>
30
+ <td class="order-status"><%= t("spree.order_state.#{order.state}").titleize %></td>
31
+ <td class="order-payment-state"><%= t("spree.payment_states.#{order.payment_state}").titleize if order.payment_state %></td>
32
+ <td class="order-shipment-state"><%= t("spree.shipment_states.#{order.shipment_state}").titleize if order.shipment_state %></td>
33
33
  <td class="order-total"><%= order.display_total %></td>
34
34
  </tr>
35
35
  <% end %>
36
36
  </tbody>
37
37
  </table>
38
38
  <% else %>
39
- <p><%= I18n.t('spree.you_have_no_orders_yet') %></p>
39
+ <p><%= t('spree.you_have_no_orders_yet') %></p>
40
40
  <% end %>
41
41
  <br />
42
42
 
@@ -1,27 +1,35 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- $:.unshift File.expand_path('lib', __dir__)
3
+ $:.push File.expand_path('lib', __dir__)
4
4
  require 'spree/auth/version'
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.platform = Gem::Platform::RUBY
8
- s.name = "solidus_auth_devise"
9
- s.version = Spree::Auth::VERSION
10
- s.summary = "Provides authentication and authorization services for use with Solidus by using Devise and CanCan."
11
- s.description = s.summary
7
+ s.platform = Gem::Platform::RUBY
8
+ s.name = "solidus_auth_devise"
9
+ s.version = Spree::Auth::VERSION
10
+ s.summary = "Provides authentication and authorization services for use with Solidus by using Devise and CanCan."
11
+ s.license = 'BSD-3-Clause'
12
12
 
13
- s.author = 'Solidus Team'
14
- s.email = 'contact@solidus.io'
13
+ s.author = 'Solidus Team'
14
+ s.email = 'contact@solidus.io'
15
+ s.homepage = 'https://github.com/solidusio/solidus_auth_devise'
15
16
 
16
- s.required_ruby_version = ">= 2.3"
17
- s.license = 'BSD-3'
17
+ if s.respond_to?(:metadata)
18
+ s.metadata["homepage_uri"] = s.homepage if s.homepage
19
+ s.metadata["source_code_uri"] = s.homepage if s.homepage
20
+ end
18
21
 
19
- s.files = `git ls-files`.split("\n")
20
- s.test_files = `git ls-files -- spec/*`.split("\n")
21
- s.require_path = "lib"
22
- s.requirements << "none"
22
+ s.required_ruby_version = '>= 2.4.0'
23
23
 
24
- solidus_version = [">= 1.2.0", "< 3"]
24
+ s.files = Dir.chdir(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ end
27
+ s.test_files = Dir['spec/**/*']
28
+ s.bindir = "exe"
29
+ s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ s.require_paths = ["lib"]
31
+
32
+ solidus_version = [">= 2.6", "< 4"]
25
33
 
26
34
  s.post_install_message = "
27
35
  NOTE: Rails 6 has removed secret_token in favor of secret_key_base, which was deprecated in
@@ -29,27 +37,14 @@ Gem::Specification.new do |s|
29
37
  secret_token is undefined or not available, secret_key_base will be used instead.
30
38
  ".strip.gsub(/ +/, ' ')
31
39
 
40
+ s.add_dependency "deface", "~> 1.0"
32
41
  s.add_dependency "devise", '~> 4.1'
33
42
  s.add_dependency "devise-encryptable", "0.2.0"
43
+ s.add_dependency "paranoia", "~> 2.4"
34
44
  s.add_dependency "solidus_core", solidus_version
35
- s.add_dependency "solidus_support", ">= 0.1.3"
36
-
37
- s.add_development_dependency "capybara", "~> 2.14"
38
- s.add_development_dependency "capybara-screenshot"
39
- s.add_development_dependency "coffee-rails"
40
- s.add_development_dependency "database_cleaner", "~> 1.6"
41
- s.add_development_dependency "ffaker"
42
- s.add_development_dependency "gem-release", "~> 2.0"
43
- s.add_development_dependency "github_changelog_generator", "~> 1.14"
44
- s.add_development_dependency "rspec-rails", "~> 3.3"
45
- s.add_development_dependency "rubocop", "~> 0.71"
46
- s.add_development_dependency "rubocop-performance", "~> 1.4"
47
- s.add_development_dependency "rubocop-rails", "~> 2.2"
48
- s.add_development_dependency "sass-rails"
49
- s.add_development_dependency "selenium-webdriver", "~> 3.142"
50
- s.add_development_dependency "shoulda-matchers", "~> 3.1"
51
- s.add_development_dependency "simplecov", "~> 0.14"
45
+ s.add_dependency "solidus_support", "~> 0.5"
46
+
52
47
  s.add_development_dependency "solidus_backend", solidus_version
48
+ s.add_development_dependency "solidus_dev_support", ">= 0.3.0"
53
49
  s.add_development_dependency "solidus_frontend", solidus_version
54
- s.add_development_dependency "sqlite3", "~> 1.3.6"
55
50
  end