Skip to content

Commit b367f99

Browse files
authored
Merge pull request solidusio#6091 from rjacoby/allow-rails8
2 parents ca1ae4d + 0e9bd91 commit b367f99

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ commands:
224224
mkdir -p /tmp/dummy_extension
225225
cd /tmp/dummy_extension
226226
bundle init
227-
bundle add rails -v "< 8.0" --skip-install
227+
bundle add rails -v "< 8.1" --skip-install
228228
bundle add sqlite3 -v "~> 2.0" --skip-install
229229
test -n "<<parameters.extra_gems>>" && bundle add <<parameters.extra_gems>> --skip-install
230230
bundle add solidus --path "$(ruby -e"puts File.expand_path ENV['CIRCLE_WORKING_DIRECTORY']")"
@@ -352,7 +352,7 @@ workflows:
352352
{
353353
parameters:
354354
{
355-
rails: ["7.0", "7.1", "7.2"],
355+
rails: ["7.0", "7.1", "7.2", "8.0"],
356356
ruby: ["3.1"],
357357
database: ["mysql"],
358358
paperclip: [true],
@@ -364,7 +364,7 @@ workflows:
364364
{
365365
parameters:
366366
{
367-
rails: ["7.0", "7.1", "7.2"],
367+
rails: ["7.0", "7.1", "7.2", "8.0"],
368368
ruby: ["3.1"],
369369
database: ["postgres"],
370370
paperclip: [false],
@@ -388,7 +388,7 @@ workflows:
388388
{
389389
parameters:
390390
{
391-
rails: ["7.2", "main"],
391+
rails: ["7.2", "8.0", "main"],
392392
ruby: ["3.3.5"],
393393
database: ["sqlite"],
394394
paperclip: [false],

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gemspec require: false
88
if /(stable|main)/.match? ENV['RAILS_VERSION']
99
gem 'rails', github: 'rails', require: false, branch: ENV['RAILS_VERSION']
1010
else
11-
gem 'rails', ENV['RAILS_VERSION'] || ['> 7.0', '< 8.0.0.beta1'], require: false
11+
gem 'rails', ENV['RAILS_VERSION'] || ['> 7.0', '< 8.1.0.beta1'], require: false
1212
end
1313
# rubocop:enable Bundler/DuplicatedGem
1414

admin/app/components/solidus_admin/ui/forms/input/component.rb

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,24 @@ def call
9393
with_content options_for_select(@attributes.delete(:choices), @attributes.delete(:value))
9494
end
9595

96-
tag.public_send(
97-
@tag,
98-
content,
96+
options = {
9997
"data-controller": stimulus_id,
10098
"data-#{stimulus_id}-custom-validity-value": @error.presence,
10199
"data-action": "#{stimulus_id}#clearCustomValidity",
102100
**@attributes
103-
)
101+
}
102+
103+
if tag.method(@tag).parameters.any? { |_type, name| name == :content }
104+
tag.public_send(
105+
@tag,
106+
content,
107+
**options
108+
)
109+
else
110+
tag.public_send(
111+
@tag,
112+
**options
113+
)
114+
end
104115
end
105116
end

api/spec/requests/spree/api/shipments_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module Spree::Api
7575
it 'returns proper error' do
7676
subject
7777
expect(response.status).to eq(422)
78-
expect(json_response['exception']).to eq("param is missing or the value is empty: stock_location_id")
78+
expect(json_response['exception']).to match(/param is missing or the value is empty( or invalid)?: stock_location_id/)
7979
end
8080
end
8181
end

api/spec/requests/spree/api/stock_items_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module Spree::Api
8686

8787
it 'requires a stock_location_id to be passed as a parameter' do
8888
get spree.api_stock_items_path
89-
expect(json_response['exception']).to eq('param is missing or the value is empty: stock_location_id')
89+
expect(json_response['exception']).to match(/param is missing or the value is empty( or invalid)?: stock_location_id/)
9090
expect(response.status).to eq(422)
9191
end
9292

core/solidus_core.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
2727
actionmailer actionpack actionview activejob activemodel activerecord
2828
activestorage activesupport railties
2929
].each do |rails_dep|
30-
s.add_dependency rails_dep, ['>= 7.0', '< 8.0.0.beta1']
30+
s.add_dependency rails_dep, ['>= 7.0', '< 8.1.0.beta1']
3131
end
3232

3333
s.add_dependency 'activemerchant', '~> 1.66'

0 commit comments

Comments
 (0)