spree_auth_devise 3.2.0.beta → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree_auth_devise might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +17 -6
- data/.travis.yml +19 -7
- data/Appraisals +13 -0
- data/CHANGELOG.md +11 -3
- data/Gemfile +1 -0
- data/README.md +30 -27
- data/Rakefile +1 -1
- data/app/mailers/spree/user_mailer.rb +6 -6
- data/app/models/spree/auth_configuration.rb +3 -3
- data/app/models/spree/user.rb +17 -16
- data/app/overrides/auth_shared_login_bar.rb +6 -7
- data/config.ru +1 -1
- data/config/initializers/devise.rb +1 -1
- data/config/initializers/warden.rb +2 -2
- data/config/locales/bg.yml +54 -0
- data/config/locales/de.yml +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/config/locales/it.yml +2 -2
- data/config/locales/nl.yml +1 -1
- data/config/locales/pt-BR.yml +1 -1
- data/config/locales/pt.yml +1 -1
- data/config/locales/tr.yml +1 -1
- data/config/routes.rb +17 -18
- data/db/default/users.rb +6 -6
- data/db/migrate/20101026184949_create_users.rb +14 -9
- data/db/migrate/20101026184950_rename_columns_for_devise.rb +6 -1
- data/db/migrate/20101214150824_convert_user_remember_field.rb +6 -1
- data/db/migrate/20120203010234_add_reset_password_sent_at_to_spree_users.rb +6 -1
- data/db/migrate/20120605211305_make_users_email_index_unique.rb +8 -3
- data/db/migrate/20140904000425_add_deleted_at_to_users.rb +6 -1
- data/db/migrate/20141002154641_add_confirmable_to_users.rb +6 -1
- data/db/migrate/20150416152553_add_missing_indices_on_user.rb +6 -1
- data/gemfiles/spree_3_1.gemfile +7 -0
- data/gemfiles/spree_3_2.gemfile +8 -0
- data/gemfiles/spree_master.gemfile +8 -0
- data/lib/controllers/backend/spree/admin/admin_controller_decorator.rb +6 -8
- data/lib/controllers/backend/spree/admin/admin_orders_controller_decorator.rb +15 -14
- data/lib/controllers/backend/spree/admin/admin_resource_controller_decorator.rb +1 -1
- data/lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb +9 -8
- data/lib/controllers/backend/spree/admin/user_passwords_controller.rb +6 -1
- data/lib/controllers/backend/spree/admin/user_sessions_controller.rb +22 -16
- data/lib/controllers/frontend/spree/checkout_controller_decorator.rb +17 -16
- data/lib/controllers/frontend/spree/user_confirmations_controller.rb +4 -0
- data/lib/controllers/frontend/spree/user_passwords_controller.rb +5 -1
- data/lib/controllers/frontend/spree/user_registrations_controller.rb +4 -0
- data/lib/controllers/frontend/spree/user_sessions_controller.rb +18 -11
- data/lib/controllers/frontend/spree/users_controller.rb +16 -15
- data/lib/generators/spree/auth/install/install_generator.rb +8 -2
- data/lib/spree/auth/devise.rb +1 -1
- data/lib/spree/auth/engine.rb +9 -9
- data/lib/tasks/auth.rake +1 -1
- data/lib/views/frontend/spree/users/show.html.erb +1 -1
- data/spec/controllers/spree/checkout_controller_spec.rb +1 -2
- data/spec/controllers/spree/products_controller_spec.rb +0 -1
- data/spec/controllers/spree/user_passwords_controller_spec.rb +3 -4
- data/spec/controllers/spree/user_registrations_controller_spec.rb +0 -1
- data/spec/controllers/spree/user_sessions_controller_spec.rb +0 -1
- data/spec/controllers/spree/users_controller_spec.rb +0 -1
- data/spec/factories/confirmed_user.rb +1 -1
- data/spec/features/account_spec.rb +0 -1
- data/spec/features/admin/orders_spec.rb +0 -1
- data/spec/features/admin/password_reset_spec.rb +0 -1
- data/spec/features/admin/products_spec.rb +0 -1
- data/spec/features/admin/sign_in_spec.rb +0 -1
- data/spec/features/admin/sign_out_spec.rb +0 -1
- data/spec/features/admin_permissions_spec.rb +0 -1
- data/spec/features/change_email_spec.rb +0 -1
- data/spec/features/checkout_spec.rb +8 -8
- data/spec/features/confirmation_spec.rb +1 -1
- data/spec/features/order_spec.rb +0 -1
- data/spec/features/password_reset_spec.rb +0 -1
- data/spec/features/sign_in_spec.rb +1 -2
- data/spec/features/sign_out_spec.rb +0 -1
- data/spec/features/sign_up_spec.rb +0 -1
- data/spec/mailers/user_mailer_spec.rb +0 -1
- data/spec/models/order_spec.rb +0 -1
- data/spec/models/user_spec.rb +3 -1
- data/spec/spec_helper.rb +0 -7
- data/spec/support/ability.rb +1 -1
- data/spec/support/authentication_helpers.rb +2 -2
- data/spec/support/capybara.rb +1 -1
- data/spec/support/confirm_helpers.rb +1 -1
- data/spec/support/database_cleaner.rb +2 -3
- data/spec/support/spree.rb +0 -16
- data/spree_auth_devise.gemspec +6 -6
- metadata +16 -13
- data/Versionfile +0 -5
- data/circle.yml +0 -13
data/spec/features/order_spec.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
RSpec.feature 'Sign In', type: :feature do
|
2
|
-
|
3
2
|
background do
|
4
3
|
@user = create(:user, email: 'email@person.com', password: 'secret', password_confirmation: 'secret')
|
5
4
|
visit spree.login_path
|
@@ -44,7 +43,7 @@ RSpec.feature 'Sign In', type: :feature do
|
|
44
43
|
expect(current_path).to eq '/admin/orders'
|
45
44
|
end
|
46
45
|
|
47
|
-
|
46
|
+
xit "should store the user previous location" do
|
48
47
|
visit spree.account_path
|
49
48
|
fill_in "Email", with: @user.email
|
50
49
|
fill_in "Password", with: @user.password
|
data/spec/models/order_spec.rb
CHANGED
data/spec/models/user_spec.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
RSpec.describe Spree::User, type: :model do
|
2
|
-
|
3
2
|
before(:all) { Spree::Role.create name: 'admin' }
|
4
3
|
|
5
4
|
it '#admin?' do
|
@@ -41,6 +40,9 @@ RSpec.describe Spree::User, type: :model do
|
|
41
40
|
end
|
42
41
|
|
43
42
|
it 'will not soft delete with completed orders' do
|
43
|
+
# depends on Spree Core
|
44
|
+
# this was introduced in Spree 3.2
|
45
|
+
skip "this is't supported in Spree 3.1 and lower" if Spree.version.to_f < 3.2
|
44
46
|
order = build(:order, completed_at: Time.now)
|
45
47
|
order.save
|
46
48
|
user = order.user
|
data/spec/spec_helper.rb
CHANGED
@@ -8,7 +8,6 @@ require File.expand_path('../dummy/config/environment', __FILE__)
|
|
8
8
|
require 'rspec/rails'
|
9
9
|
require 'shoulda-matchers'
|
10
10
|
require 'ffaker'
|
11
|
-
require 'rails-controller-testing'
|
12
11
|
|
13
12
|
RSpec.configure do |config|
|
14
13
|
config.filter_run focus: true
|
@@ -20,12 +19,6 @@ RSpec.configure do |config|
|
|
20
19
|
config.mock_with :rspec do |mock|
|
21
20
|
mock.syntax = [:should, :expect]
|
22
21
|
end
|
23
|
-
|
24
|
-
[:controller, :view, :request].each do |type|
|
25
|
-
config.include ::Rails::Controller::Testing::TestProcess, type: type
|
26
|
-
config.include ::Rails::Controller::Testing::TemplateAssertions, type: type
|
27
|
-
config.include ::Rails::Controller::Testing::Integration, type: type
|
28
|
-
end
|
29
22
|
end
|
30
23
|
|
31
24
|
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
data/spec/support/ability.rb
CHANGED
@@ -9,6 +9,6 @@ end
|
|
9
9
|
|
10
10
|
RSpec.configure do |config|
|
11
11
|
config.include AuthenticationHelpers, type: :feature
|
12
|
-
config.include Devise::
|
13
|
-
config.include Rack::Test::Methods,
|
12
|
+
config.include Devise::Test::ControllerHelpers, type: :controller
|
13
|
+
config.include Rack::Test::Methods, type: :feature
|
14
14
|
end
|
data/spec/support/capybara.rb
CHANGED
@@ -3,7 +3,7 @@ require 'capybara/rails'
|
|
3
3
|
require 'capybara/poltergeist'
|
4
4
|
require 'capybara-screenshot/rspec'
|
5
5
|
|
6
|
-
RSpec.configure do |
|
6
|
+
RSpec.configure do |_config|
|
7
7
|
Capybara.javascript_driver = :poltergeist
|
8
8
|
Capybara.save_and_open_page_path = ENV['CIRCLE_ARTIFACTS'] if ENV['CIRCLE_ARTIFACTS']
|
9
9
|
end
|
@@ -1,18 +1,17 @@
|
|
1
1
|
require 'database_cleaner'
|
2
2
|
|
3
3
|
RSpec.configure do |config|
|
4
|
-
|
5
4
|
config.before(:suite) do
|
6
5
|
DatabaseCleaner.strategy = :transaction
|
7
6
|
DatabaseCleaner.clean_with :truncation
|
8
7
|
end
|
9
8
|
|
10
|
-
config.before do
|
9
|
+
config.before(:each) do
|
11
10
|
DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
|
12
11
|
DatabaseCleaner.start
|
13
12
|
end
|
14
13
|
|
15
|
-
config.after do
|
14
|
+
config.after(:each) do
|
16
15
|
DatabaseCleaner.clean
|
17
16
|
end
|
18
17
|
end
|
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
|
data/spree_auth_devise.gemspec
CHANGED
@@ -3,24 +3,24 @@
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.name = 'spree_auth_devise'
|
6
|
-
s.version = '3.2.0
|
6
|
+
s.version = '3.2.0'
|
7
7
|
s.summary = 'Provides authentication and authorization services for use with Spree by using Devise and CanCan.'
|
8
8
|
s.description = s.summary
|
9
9
|
|
10
|
-
s.required_ruby_version = '>= 2.2.
|
10
|
+
s.required_ruby_version = '>= 2.2.7'
|
11
11
|
|
12
12
|
s.author = 'Sean Schofield'
|
13
13
|
s.email = 'sean@spreecommerce.com'
|
14
14
|
s.homepage = 'http://spreecommerce.com'
|
15
|
-
s.license =
|
15
|
+
s.license = 'BSD-3'
|
16
16
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
18
18
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
19
19
|
s.require_path = 'lib'
|
20
20
|
s.requirements << 'none'
|
21
21
|
|
22
|
-
s.add_dependency 'devise', '~> 4.
|
23
|
-
s.add_dependency 'devise-encryptable', '0.
|
22
|
+
s.add_dependency 'devise', '~> 4.3.0'
|
23
|
+
s.add_dependency 'devise-encryptable', '0.2.0'
|
24
24
|
|
25
25
|
spree_version = '>= 3.1.0', '< 4.0'
|
26
26
|
s.add_dependency 'spree_core', spree_version
|
@@ -43,5 +43,5 @@ Gem::Specification.new do |s|
|
|
43
43
|
s.add_development_dependency 'spree_backend', spree_version
|
44
44
|
s.add_development_dependency 'spree_frontend', spree_version
|
45
45
|
s.add_development_dependency 'sqlite3'
|
46
|
-
s.add_development_dependency '
|
46
|
+
s.add_development_dependency 'appraisal'
|
47
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_auth_devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.0
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
26
|
+
version: 4.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: devise-encryptable
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: spree_core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -323,7 +323,7 @@ dependencies:
|
|
323
323
|
- !ruby/object:Gem::Version
|
324
324
|
version: '0'
|
325
325
|
- !ruby/object:Gem::Dependency
|
326
|
-
name:
|
326
|
+
name: appraisal
|
327
327
|
requirement: !ruby/object:Gem::Requirement
|
328
328
|
requirements:
|
329
329
|
- - ">="
|
@@ -346,12 +346,12 @@ files:
|
|
346
346
|
- ".gitignore"
|
347
347
|
- ".rspec"
|
348
348
|
- ".travis.yml"
|
349
|
+
- Appraisals
|
349
350
|
- CHANGELOG.md
|
350
351
|
- Gemfile
|
351
352
|
- LICENSE.md
|
352
353
|
- README.md
|
353
354
|
- Rakefile
|
354
|
-
- Versionfile
|
355
355
|
- app/controllers/metal_decorator.rb
|
356
356
|
- app/mailers/spree/user_mailer.rb
|
357
357
|
- app/models/spree/auth_configuration.rb
|
@@ -359,10 +359,10 @@ files:
|
|
359
359
|
- app/overrides/auth_shared_login_bar.rb
|
360
360
|
- app/overrides/spree/admin/shared/_header/auth_admin_login_navigation_bar.html.erb.deface
|
361
361
|
- bin/rails
|
362
|
-
- circle.yml
|
363
362
|
- config.ru
|
364
363
|
- config/initializers/devise.rb
|
365
364
|
- config/initializers/warden.rb
|
365
|
+
- config/locales/bg.yml
|
366
366
|
- config/locales/de.yml
|
367
367
|
- config/locales/en.yml
|
368
368
|
- config/locales/es.yml
|
@@ -383,6 +383,9 @@ files:
|
|
383
383
|
- db/migrate/20141002154641_add_confirmable_to_users.rb
|
384
384
|
- db/migrate/20150416152553_add_missing_indices_on_user.rb
|
385
385
|
- db/seeds.rb
|
386
|
+
- gemfiles/spree_3_1.gemfile
|
387
|
+
- gemfiles/spree_3_2.gemfile
|
388
|
+
- gemfiles/spree_master.gemfile
|
386
389
|
- lib/assets/javascripts/spree/backend/spree_auth.js.erb
|
387
390
|
- lib/assets/javascripts/spree/frontend/account.js.coffee
|
388
391
|
- lib/assets/javascripts/spree/frontend/spree_auth.js.erb
|
@@ -478,16 +481,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
478
481
|
requirements:
|
479
482
|
- - ">="
|
480
483
|
- !ruby/object:Gem::Version
|
481
|
-
version: 2.2.
|
484
|
+
version: 2.2.7
|
482
485
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
483
486
|
requirements:
|
484
|
-
- - "
|
487
|
+
- - ">="
|
485
488
|
- !ruby/object:Gem::Version
|
486
|
-
version:
|
489
|
+
version: '0'
|
487
490
|
requirements:
|
488
491
|
- none
|
489
492
|
rubyforge_project:
|
490
|
-
rubygems_version: 2.
|
493
|
+
rubygems_version: 2.6.12
|
491
494
|
signing_key:
|
492
495
|
specification_version: 4
|
493
496
|
summary: Provides authentication and authorization services for use with Spree by
|
data/Versionfile
DELETED