Skip to content

Commit

Permalink
Merge pull request #2829 from rspec/fix-verify-mailer-preview
Browse files Browse the repository at this point in the history
Fix build for Rails main, Rails 7.0 and Ruby 3.4
  • Loading branch information
JonRowe authored Jan 18, 2025
2 parents 6072931 + 7b49919 commit 5fad193
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ gem 'ffi', '> 1.15.5'
gem 'rake', '> 12'
gem 'rubocop', '~> 1.28.2'

if RUBY_VERSION.to_f > 3.3
gem 'cucumber', git: 'https://github.com/cucumber/cucumber-ruby', branch: 'main'
end

custom_gemfile = File.expand_path('Gemfile-custom', __dir__)
eval_gemfile custom_gemfile if File.exist?(custom_gemfile)

Expand Down
3 changes: 2 additions & 1 deletion Gemfile-rails-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ when nil, false, ""
gem 'selenium-webdriver', require: false
else
version_number = version.split(' ').last
add_net_gems_dependency if version_number < '7.0'

gem 'concurrent-ruby', '1.3.4' if version_number < '7.1'

gem "rails", version
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
Expand Down
1 change: 1 addition & 0 deletions example_app_generator/spec/support/default_preview_path
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ end
ENV['RAILS_ENV'] ||= 'development'
# Pick the frameworks you want:
begin
require "openssl"
require "active_storage"
require "active_storage/engine"
rescue LoadError
Expand Down
6 changes: 0 additions & 6 deletions example_app_generator/spec/verify_mailer_preview_path_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ def capture_exec(*ops)
CaptureExec.new(out, $?.exitstatus)
end

if ENV['RAILS_VERSION'] == 'main' && Rails::VERSION::STRING == "8.0.0.alpha"
before do
skip('This is broken on Rails main but is skipped for green builds, please fix')
end
end

if Rails::VERSION::STRING.to_f >= 7.1
let(:expected_custom_path) { "/custom/path\n#{::Rails.root}/test/mailers/previews" }
let(:expected_rspec_path) { "#{::Rails.root}/spec/mailers/previews\n#{::Rails.root}/test/mailers/previews" }
Expand Down

0 comments on commit 5fad193

Please sign in to comment.