Skip to content

Commit 12032b8

Browse files
authored
ci: fix ci for new rails (#375)
1 parent 673b220 commit 12032b8

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

Appraisals

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ if min_ruby_version.call('3.2.0') && RUBY_ENGINE != 'jruby'
8484
gem 'rails', '~> 8.0.0'
8585
gem 'rspec-rails', '~> 8.0'
8686
gem 'psych', '>= 4'
87-
gem 'sprockets-rails', '~> 3.5.2'
88-
gem 'sqlite3', '~> 1', platform: :ruby
87+
gem 'sqlite3', '>= 2.1', platform: :ruby
8988
end
9089
end
9190

config.gemspec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ Gem::Specification.new do |s|
4242
gems_to_install = /gem "(.*?)", "(.*?)"(?!, platform: (?!\[:ruby\]))/
4343

4444
if Dir.exist?('gemfiles')
45-
File.read(Dir['gemfiles/rails*.gemfile'].sort.last).scan(gems_to_install) do |name, version|
46-
s.add_development_dependency name, version
45+
rails_gemfiles = Dir['gemfiles/rails*.gemfile'].sort
46+
unless rails_gemfiles.empty?
47+
File.read(rails_gemfiles.last).scan(gems_to_install) do |name, version|
48+
s.add_development_dependency name, version
49+
end
4750
end
4851
end
4952
end
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Be sure to restart your server when you modify this file.
22

3+
# Rails 8.0 uses Propshaft instead of Sprockets
34
# Version of your assets, change this if you want to expire all your assets.
4-
Rails.application.config.assets.version = "1.0"
5+
# Rails.application.config.assets.version = "1.0"
56

67
# Add additional assets to the asset load path.
78
# Rails.application.config.assets.paths << Emoji.images_path

spec/spec_helper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
4343

4444
# Configure
4545
RSpec.configure do |config|
46-
config.fixture_path = FixtureHelper::FIXTURE_PATH
46+
# Use fixture_paths (plural) for newer versions of RSpec
47+
if config.respond_to?(:fixture_paths)
48+
config.fixture_paths = [FixtureHelper::FIXTURE_PATH]
49+
else
50+
config.fixture_path = FixtureHelper::FIXTURE_PATH
51+
end
4752
end
4853

4954
when 'sinatra'

0 commit comments

Comments
 (0)