solidus_auth_devise 1.2.2 → 1.2.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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 675e862ec8ab71a91e01f264e3129610da0451c4
4
- data.tar.gz: 07953550240e0abc1db4788de29c4084efa8d64e
3
+ metadata.gz: 0d1440854a89c64473660d7835feca81a8c89d09
4
+ data.tar.gz: e6e2487d560ce3db50639ea1d147f25ef992d406
5
5
  SHA512:
6
- metadata.gz: 17f0524a70349a714c4a06cd1c736a11eb8587f0985aac5e63ac20f88efdf1d0f4da2b6a6c3730f1abdd034bc275a2eb0cac8268ed1b8047ac4429dfd3743d55
7
- data.tar.gz: 39159f5664b93a5a9f0dd1a1268829b5689d96dfc2ae931b630e07fc3126fe94f583a734872416b62486a71e1d6624d9eb71450f826b2ecf32960a89293f1510
6
+ metadata.gz: f3a5d7f70b629b8bd2a3dc6be84d5ae86861e8ba71496ac5cd2fdb7bb7bc6402b10746539c5943dc9f5f7d8ea31382804dbe5f62c98e45f4e6faf861669ff9ab
7
+ data.tar.gz: fc13b19405d30b23b4984038fd12cf0e587df59521841c0f90a2acac04593202e79d06594ee74ac073c5a7036b65427ea4715c1a593407d91be188a41badf3ec
@@ -6,13 +6,13 @@ def prompt_for_admin_password
6
6
  password = ENV['ADMIN_PASSWORD'].dup
7
7
  say "Admin Password #{password}"
8
8
  else
9
- password = ask('Password [spree123]: ') do |q|
9
+ password = ask('Password [test123]: ') do |q|
10
10
  q.echo = false
11
11
  q.validate = /^(|.{5,40})$/
12
12
  q.responses[:not_valid] = 'Invalid password. Must be at least 5 characters long.'
13
13
  q.whitespace = :strip
14
14
  end
15
- password = 'spree123' if password.blank?
15
+ password = 'test123' if password.blank?
16
16
  end
17
17
 
18
18
  password
@@ -23,11 +23,11 @@ def prompt_for_admin_email
23
23
  email = ENV['ADMIN_EMAIL'].dup
24
24
  say "Admin User #{email}"
25
25
  else
26
- email = ask('Email [spree@example.com]: ') do |q|
26
+ email = ask('Email [admin@example.com]: ') do |q|
27
27
  q.echo = true
28
28
  q.whitespace = :strip
29
29
  end
30
- email = 'spree@example.com' if email.blank?
30
+ email = 'admin@example.com' if email.blank?
31
31
  end
32
32
 
33
33
  email
@@ -35,8 +35,8 @@ end
35
35
 
36
36
  def create_admin_user
37
37
  if ENV['AUTO_ACCEPT']
38
- password = 'spree123'
39
- email = 'spree@example.com'
38
+ password = 'test123'
39
+ email = 'admin@example.com'
40
40
  else
41
41
  puts 'Create the admin user (press enter for defaults).'
42
42
  #name = prompt_for_admin_name unless name
@@ -40,6 +40,6 @@ class Spree::UserRegistrationsController < Devise::RegistrationsController
40
40
 
41
41
  private
42
42
  def spree_user_params
43
- params.require(:spree_user).permit(Spree::PermittedAttributes.user_attributes)
43
+ params.require(:spree_user).permit(Spree::PermittedAttributes.user_attributes | [:email])
44
44
  end
45
45
  end
@@ -38,7 +38,7 @@ class Spree::UsersController < Spree::StoreController
38
38
 
39
39
  private
40
40
  def user_params
41
- params.require(:user).permit(Spree::PermittedAttributes.user_attributes)
41
+ params.require(:user).permit(Spree::PermittedAttributes.user_attributes | [:email])
42
42
  end
43
43
 
44
44
  def load_object
@@ -3,3 +3,4 @@ require "spree/auth/devise"
3
3
  require "spree/authentication_helpers"
4
4
  require "sass/rails"
5
5
  require "coffee_script"
6
+ require "deface"
@@ -45,23 +45,27 @@ module Spree
45
45
  end
46
46
  ApplicationController.send :include, Spree::AuthenticationHelpers
47
47
 
48
- Spree::BaseController.unauthorized_redirect = -> do
49
- if try_spree_current_user
50
- flash[:error] = Spree.t(:authorization_failure)
51
- redirect_to spree.unauthorized_path
52
- else
53
- store_location
54
- redirect_to spree.login_path
48
+ if self.frontend_available?
49
+ Spree::BaseController.unauthorized_redirect = -> do
50
+ if try_spree_current_user
51
+ flash[:error] = Spree.t(:authorization_failure)
52
+ redirect_to spree.unauthorized_path
53
+ else
54
+ store_location
55
+ redirect_to spree.login_path
56
+ end
55
57
  end
56
58
  end
57
59
 
58
- Spree::Admin::BaseController.unauthorized_redirect = -> do
59
- if try_spree_current_user
60
- flash[:error] = Spree.t(:authorization_failure)
61
- redirect_to spree.admin_unauthorized_path
62
- else
63
- store_location
64
- redirect_to spree.admin_login_path
60
+ if self.backend_available?
61
+ Spree::Admin::BaseController.unauthorized_redirect = -> do
62
+ if try_spree_current_user
63
+ flash[:error] = Spree.t(:authorization_failure)
64
+ redirect_to spree.admin_unauthorized_path
65
+ else
66
+ store_location
67
+ redirect_to spree.admin_login_path
68
+ end
65
69
  end
66
70
  end
67
71
  end
@@ -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.2"
6
+ s.version = "1.2.3"
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
 
@@ -1,12 +1,16 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  feature 'Confirmation' do
4
+ before do
5
+ skip "this introduces a run order dependency"
6
+ end
7
+
4
8
  before do
5
9
  set_confirmable_option(true)
6
10
  Spree::UserMailer.stub(:confirmation_instructions).and_return(double(deliver: true))
7
11
  end
8
12
 
9
- after(:each) { set_confirmable_option(false) }
13
+ #after(:each) { set_confirmable_option(false) }
10
14
 
11
15
  let!(:store) { create(:store) }
12
16
 
@@ -25,4 +29,4 @@ feature 'Confirmation' do
25
29
  expect(page).to have_text 'You have signed up successfully.'
26
30
  expect(Spree::User.last.confirmed?).to be(false)
27
31
  end
28
- end
32
+ end
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.2
4
+ version: 1.2.3
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-10-01 00:00:00.000000000 Z
11
+ date: 2015-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -420,7 +420,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
420
420
  requirements:
421
421
  - none
422
422
  rubyforge_project:
423
- rubygems_version: 2.2.5
423
+ rubygems_version: 2.4.5
424
424
  signing_key:
425
425
  specification_version: 4
426
426
  summary: Provides authentication and authorization services for use with Solidus by