solidus_auth_devise 1.2.0 → 1.2.1

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5cf4aa80513d06a54e23702ed88741c43c7382a
4
- data.tar.gz: 657066204c77305b7e9dbfa8fe00f2d064cb518b
3
+ metadata.gz: 34bf236613b21c40c9b0532d382a64591d98535f
4
+ data.tar.gz: bddc8a37353b1bc5ac272056749dad53790ad72c
5
5
  SHA512:
6
- metadata.gz: 76a34014abe38b2f73397f0a969719c2d35523252e76e830b550fa6d9935c1615e3157f2df99372ac50930a4980186597dacd11c96ffbbb32031d39e81eceb93
7
- data.tar.gz: b922becf025a09a3203ec8b79414d39f5daa6f109c866d456bbac32295dc3cc0e6ea0fe0a6708133e64cbe057dcecc20f4754ee7de5f17796e4f6b3b74259c90
6
+ metadata.gz: 91628c33c7858a70747284261561bbd22e70efcaf42a32a81b0ae06db0476272be59bd9ff86a76c2af91fc0831ea41cfc6d9397259f2866711379604b5383bc9
7
+ data.tar.gz: c9b39d7ccec95f652850de70b293757fb8e8066c394def7f0c8e60af95818b597714e1f11d1ce7ba470ee97006c090f1cc6bac68c1c8704b265b250e45bdc570
@@ -2,14 +2,14 @@ module Spree
2
2
  class UserMailer < BaseMailer
3
3
  def reset_password_instructions(user, token, *args)
4
4
  @edit_password_reset_url = spree.edit_spree_user_password_url(:reset_password_token => token, :host => Spree::Store.current.url)
5
-
6
- mail to: user.email, from: from_address, subject: Spree::Store.current.name + ' ' + I18n.t(:subject, :scope => [:devise, :mailer, :reset_password_instructions])
5
+ @store = Spree::Store.current
6
+ mail to: user.email, from: from_address(@store), subject: "#{@store.name} #{I18n.t(:subject, :scope => [:devise, :mailer, :reset_password_instructions])}"
7
7
  end
8
8
 
9
9
  def confirmation_instructions(user, token, opts={})
10
10
  @confirmation_url = spree.spree_user_confirmation_url(:confirmation_token => token, :host => Spree::Store.current.url)
11
-
12
- mail to: user.email, from: from_address, subject: Spree::Store.current.name + ' ' + I18n.t(:subject, :scope => [:devise, :mailer, :confirmation_instructions])
11
+ @store = Spree::Store.current
12
+ mail to: user.email, from: from_address(@store), subject: "#{@store.name} #{I18n.t(:subject, :scope => [:devise, :mailer, :confirmation_instructions])}"
13
13
  end
14
14
  end
15
15
  end
@@ -1,7 +1,5 @@
1
1
  module Spree
2
2
  class User < ActiveRecord::Base
3
- include UserAddress
4
- include UserPaymentSource
5
3
  include UserMethods
6
4
 
7
5
  devise :database_authenticatable, :registerable, :recoverable,
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.name = "solidus_auth_devise"
6
- s.version = "1.2.0"
6
+ s.version = "1.2.1"
7
7
  s.summary = "Provides authentication and authorization services for use with Solidus by using Devise and CanCan."
8
8
  s.description = s.summary
9
9
 
@@ -39,6 +39,6 @@ RSpec.feature 'Admin - Sign In', type: :feature do
39
39
  click_button 'Login'
40
40
 
41
41
  expect(page).to have_text 'Logged in as: admin@person.com'
42
- expect(current_path).to eq '/admin/dashboards/home'
42
+ expect(current_path).to eq '/admin/orders'
43
43
  end
44
44
  end
@@ -39,7 +39,7 @@ RSpec.feature 'Sign In', type: :feature do
39
39
  click_button 'Login'
40
40
 
41
41
  expect(page).to have_text 'Logged in as: admin@person.com'
42
- expect(current_path).to eq '/admin/dashboards/home'
42
+ expect(current_path).to eq '/admin/orders'
43
43
  end
44
44
 
45
45
  it "should store the user previous location" do
@@ -4,22 +4,6 @@ require 'spree/testing_support/controller_requests'
4
4
  require 'spree/testing_support/authorization_helpers'
5
5
  require 'spree/testing_support/capybara_ext'
6
6
 
7
- # Monkey patch for pending: https://github.com/spree/spree/pull/5182
8
- module Spree
9
- module TestingSupport
10
- module AuthorizationHelpers
11
- module Controller
12
- def stub_authorization!(&block)
13
- ability_class = build_ability(&block)
14
- before do
15
- allow(controller).to receive(:current_ability).and_return(ability_class.new(nil))
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
-
23
7
  RSpec.configure do |config|
24
8
  config.include Spree::TestingSupport::UrlHelpers
25
9
  config.include Spree::TestingSupport::ControllerRequests, type: :controller
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_auth_devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-22 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -350,7 +350,6 @@ files:
350
350
  - lib/views/frontend/spree/users/edit.html.erb
351
351
  - lib/views/frontend/spree/users/show.html.erb
352
352
  - solidus_auth_devise.gemspec
353
- - spec/controllers/spree/admin/orders_controller_spec.rb
354
353
  - spec/controllers/spree/checkout_controller_spec.rb
355
354
  - spec/controllers/spree/products_controller_spec.rb
356
355
  - spec/controllers/spree/user_passwords_controller_spec.rb
@@ -413,7 +412,6 @@ specification_version: 4
413
412
  summary: Provides authentication and authorization services for use with Solidus by
414
413
  using Devise and CanCan.
415
414
  test_files:
416
- - spec/controllers/spree/admin/orders_controller_spec.rb
417
415
  - spec/controllers/spree/checkout_controller_spec.rb
418
416
  - spec/controllers/spree/products_controller_spec.rb
419
417
  - spec/controllers/spree/user_passwords_controller_spec.rb
@@ -449,3 +447,4 @@ test_files:
449
447
  - spec/support/email.rb
450
448
  - spec/support/factory_girl.rb
451
449
  - spec/support/spree.rb
450
+ has_rdoc:
@@ -1,14 +0,0 @@
1
- module Spree
2
- module Admin
3
- RSpec.describe OrdersController, type: :controller do
4
- stub_authorization!
5
-
6
- context '#authorize_admin' do
7
- it 'grants access to users with an admin role' do
8
- spree_get :new
9
- expect(response).to redirect_to spree.edit_admin_order_path(Order.last)
10
- end
11
- end
12
- end
13
- end
14
- end