From 7fcb9c841813277fc742170c411f15607c718ef0 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 6 Oct 2023 08:00:44 +0100 Subject: [PATCH 1/3] Add Rails 7.1 builds --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b3042d9f..0722e9932 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,34 @@ jobs: fail-fast: false matrix: include: + # Edge Rails (?) builds >= 2.7 + - ruby: 3.2 + env: + RAILS_VERSION: 'main' + - ruby: 3.1 + env: + RAILS_VERSION: 'main' + - ruby: '3.0' + env: + RAILS_VERSION: 'main' + - ruby: 2.7 + env: + RAILS_VERSION: 'main' + + # Rails 7.1 builds >= 2.7 + - ruby: 3.2 + env: + RAILS_VERSION: '~> 7.1.0' + - ruby: 3.1 + env: + RAILS_VERSION: '~> 7.1.0' + - ruby: '3.0' + env: + RAILS_VERSION: '~> 7.1.0' + - ruby: 2.7 + env: + RAILS_VERSION: '~> 7.1.0' + # Rails 7.0 builds >= 2.7 - ruby: 3.2 env: From b71e7d05ea6b436cd0de75b76b37b4bb6f4a486d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sat, 14 Oct 2023 17:17:51 +0100 Subject: [PATCH 2/3] Fix debug task --- Rakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 8350ad976..da1a6fc94 100644 --- a/Rakefile +++ b/Rakefile @@ -97,7 +97,11 @@ namespace :smoke do task app: ["clobber:app", "generate:app", "generate:stuff", :smoke] desc "run in the example app" - task({ run: ["clobber:app", "generate:app", "generate:stuff"] }, [:cmd]) do |_t, args| + task :run, [:cmd] do |_t, args| + unless ENV['SKIP_GENERATE'] + ["clobber:app", "generate:app", "generate:stuff"].map { |task| Rake::Task[task].invoke } + end + in_example_app args.cmd.to_s end From b4227ab93de44b8ca1778bfc70701dc9b770838d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 20 Oct 2023 10:50:19 +0200 Subject: [PATCH 3/3] Configure Zeitwerk to ignore our generator --- example_app_generator/generate_stuff.rb | 1 + .../no_active_record/config/initializers/zeitwerk.rb | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 example_app_generator/no_active_record/config/initializers/zeitwerk.rb diff --git a/example_app_generator/generate_stuff.rb b/example_app_generator/generate_stuff.rb index b1aca9187..9f5c04fd3 100644 --- a/example_app_generator/generate_stuff.rb +++ b/example_app_generator/generate_stuff.rb @@ -32,6 +32,7 @@ def source_paths end def setup_tasks + copy_file 'config/initializers/zeitwerk.rb' copy_file 'app/models/in_memory/model.rb' copy_file 'lib/rails/generators/in_memory/model/model_generator.rb' copy_file 'lib/rails/generators/in_memory/model/templates/model.rb.erb' diff --git a/example_app_generator/no_active_record/config/initializers/zeitwerk.rb b/example_app_generator/no_active_record/config/initializers/zeitwerk.rb new file mode 100644 index 000000000..c0c557c68 --- /dev/null +++ b/example_app_generator/no_active_record/config/initializers/zeitwerk.rb @@ -0,0 +1,3 @@ +if Rails.autoloaders.respond_to?(:main) + Rails.autoloaders.main.ignore('lib/rails/generators/in_memory/model/model_generator.rb') +end