Skip to content

Commit 9681266

Browse files
authored
Merge pull request #2692 from rspec/add-rails-71-directly
Add Rails 7.1 builds
2 parents cb100e0 + b4227ab commit 9681266

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,34 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
include:
39+
# Edge Rails (?) builds >= 2.7
40+
- ruby: 3.2
41+
env:
42+
RAILS_VERSION: 'main'
43+
- ruby: 3.1
44+
env:
45+
RAILS_VERSION: 'main'
46+
- ruby: '3.0'
47+
env:
48+
RAILS_VERSION: 'main'
49+
- ruby: 2.7
50+
env:
51+
RAILS_VERSION: 'main'
52+
53+
# Rails 7.1 builds >= 2.7
54+
- ruby: 3.2
55+
env:
56+
RAILS_VERSION: '~> 7.1.0'
57+
- ruby: 3.1
58+
env:
59+
RAILS_VERSION: '~> 7.1.0'
60+
- ruby: '3.0'
61+
env:
62+
RAILS_VERSION: '~> 7.1.0'
63+
- ruby: 2.7
64+
env:
65+
RAILS_VERSION: '~> 7.1.0'
66+
3967
# Rails 7.0 builds >= 2.7
4068
- ruby: 3.2
4169
env:

Rakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ namespace :smoke do
9797
task app: ["clobber:app", "generate:app", "generate:stuff", :smoke]
9898

9999
desc "run in the example app"
100-
task({ run: ["clobber:app", "generate:app", "generate:stuff"] }, [:cmd]) do |_t, args|
100+
task :run, [:cmd] do |_t, args|
101+
unless ENV['SKIP_GENERATE']
102+
["clobber:app", "generate:app", "generate:stuff"].map { |task| Rake::Task[task].invoke }
103+
end
104+
101105
in_example_app args.cmd.to_s
102106
end
103107

example_app_generator/generate_stuff.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def source_paths
3232
end
3333

3434
def setup_tasks
35+
copy_file 'config/initializers/zeitwerk.rb'
3536
copy_file 'app/models/in_memory/model.rb'
3637
copy_file 'lib/rails/generators/in_memory/model/model_generator.rb'
3738
copy_file 'lib/rails/generators/in_memory/model/templates/model.rb.erb'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if Rails.autoloaders.respond_to?(:main)
2+
Rails.autoloaders.main.ignore('lib/rails/generators/in_memory/model/model_generator.rb')
3+
end

0 commit comments

Comments
 (0)