Skip to content

Commit 1a7121e

Browse files
Rails 7 support (#552)
* Rails 7 fixes * fix gemfile * Add libvips to circle ci
1 parent c49931c commit 1a7121e

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

.circleci/config.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ run_tests: &run_tests
2626
keys:
2727
- spree-auth-devise-bundle-v9-ruby-2-7-{{ .Branch }}
2828
- spree-auth-devise-bundle-v9-ruby-2-7
29+
- run:
30+
name: Install libvips
31+
command: sudo apt-get install libvips
2932
- run:
3033
name: Set bundle path
3134
command: bundle config --local path vendor/bundle
@@ -58,6 +61,9 @@ run_tests_3_0: &run_tests_3_0
5861
keys:
5962
- spree-auth-devise-bundle-v9-ruby-3-0-{{ .Branch }}
6063
- spree-auth-devise-bundle-v9-ruby-3-0
64+
- run:
65+
name: Install libvips
66+
command: sudo apt-get install libvips
6167
- run:
6268
name: Set bundle path
6369
command: bundle config --local path vendor/bundle
@@ -91,6 +97,9 @@ jobs:
9197
keys:
9298
- spree-auth-devise-bundle-v9-ruby-2-7-{{ .Branch }}
9399
- spree-auth-devise-bundle-v9-ruby-2-7
100+
- run:
101+
name: Install libvips
102+
command: sudo apt-get install libvips
94103
- run:
95104
name: Set bundle path
96105
command: bundle config --local path vendor/bundle
@@ -111,6 +120,9 @@ jobs:
111120
keys:
112121
- spree-auth-devise-bundle-v9-ruby-3-0-{{ .Branch }}
113122
- spree-auth-devise-bundle-v9-ruby-3-0
123+
- run:
124+
name: Install libvips
125+
command: sudo apt-get install libvips
114126
- run:
115127
name: Set bundle path
116128
command: bundle config --local path vendor/bundle
@@ -174,4 +186,4 @@ workflows:
174186
- bundle_ruby_3_0
175187
- tests_mysql:
176188
requires:
177-
- bundle
189+
- bundle

Gemfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
source 'https://rubygems.org'
22

33
gem 'rails-controller-testing'
4+
gem 'devise', github: 'heartcombo/devise', branch: 'main'
45
gem 'spree', github: 'spree/spree', branch: 'main'
5-
gem 'spree_backend', github: 'spree/spree_backend', branch: 'main'
6-
gem 'spree_frontend', github: 'spree/spree_legacy_frontend', branch: 'main'
6+
gem 'spree_backend', github: 'spree/spree_backend', branch: 'rails7'
77
gem 'spree_emails', github: 'spree/spree', branch: 'main'
8+
gem 'spree_frontend', github: 'spree/spree_legacy_frontend', branch: 'main'
89
gem 'rspec_junit_formatter', '~> 0.4.1'
910

1011
gem 'pry', '~> 0.14.1'

app/models/spree/auth_configuration.rb

-8
This file was deleted.

lib/spree/auth/configuration.rb

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module Spree
2+
module Auth
3+
class Configuration < Preferences::Configuration
4+
preference :registration_step, :boolean, default: true
5+
preference :signout_after_password_change, :boolean, default: true
6+
preference :confirmable, :boolean, default: false
7+
preference :validatable, :boolean, default: true
8+
end
9+
end
10+
end

lib/spree/auth/engine.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
require 'devise'
22
require 'devise-encryptable'
33

4+
require_relative 'configuration'
5+
46
module Spree
57
module Auth
68
class Engine < Rails::Engine
79
isolate_namespace Spree
810
engine_name 'spree_auth'
911

1012
initializer "spree.auth.environment", before: :load_config_initializers do |_app|
11-
Spree::Auth::Config = Spree::AuthConfiguration.new
13+
Spree::Auth::Config = Spree::Auth::Configuration.new
1214
end
1315

1416
initializer "spree_auth_devise.set_user_class", after: :load_config_initializers do

0 commit comments

Comments
 (0)