solidus_auth_devise 1.2.0 → 1.2.1
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/app/mailers/spree/user_mailer.rb +4 -4
- data/app/models/spree/user.rb +0 -2
- data/solidus_auth_devise.gemspec +1 -1
- data/spec/features/admin/sign_in_spec.rb +1 -1
- data/spec/features/sign_in_spec.rb +1 -1
- data/spec/support/spree.rb +0 -16
- metadata +3 -4
- data/spec/controllers/spree/admin/orders_controller_spec.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34bf236613b21c40c9b0532d382a64591d98535f
|
4
|
+
data.tar.gz: bddc8a37353b1bc5ac272056749dad53790ad72c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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:
|
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
|
data/app/models/spree/user.rb
CHANGED
data/solidus_auth_devise.gemspec
CHANGED
@@ -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.
|
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,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/
|
42
|
+
expect(current_path).to eq '/admin/orders'
|
43
43
|
end
|
44
44
|
|
45
45
|
it "should store the user previous location" do
|
data/spec/support/spree.rb
CHANGED
@@ -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.
|
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-
|
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
|