Skip to content

Fix rails main for solid cache #2798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ namespace :smoke do
in_example_app args.cmd.to_s
end

desc "run rake routes in example app"
task :routes do
in_example_app "bin/rails routes"
end

desc "run RSPEC_OPTS environment variable in the example app for local dev"
task :rspec do
in_example_app "LOCATION='../../example_app_generator/run_specs.rb' bin/rspec #{ENV.fetch("RSPEC_OPTS")}"
Expand Down Expand Up @@ -144,6 +149,11 @@ namespace :no_active_record do
"no_active_record:smoke",
]

desc "run rake routes in example app"
task :routes do
in_example_app "bin/rails routes", app_dir: example_app_dir
end

desc "run RSPEC_OPTS environment variable in the example app for local dev"
task :rspec do
in_example_app "LOCATION='../../example_app_generator/run_specs.rb' bin/rspec #{ENV.fetch("RSPEC_OPTS")}", app_dir: example_app_dir
Expand All @@ -165,7 +175,7 @@ namespace :no_active_record do
sh "rm -f #{bindir}/rails"
sh "bundle exec rails new #{example_app_dir} --no-rc --skip-active-record --skip-javascript --skip-bootsnap " \
"--skip-sprockets --skip-git --skip-test-unit --skip-listen --skip-bundle --skip-spring " \
"--skip-action-text --template=example_app_generator/generate_app.rb"
"--skip-action-text --skip-solid --template=example_app_generator/generate_app.rb"

in_example_app(app_dir: example_app_dir) do
sh "./ci_retry_bundle_install.sh 2>&1"
Expand All @@ -188,7 +198,7 @@ namespace :no_active_record do

desc "generate a bunch of stuff with generators"
task :stuff do
in_example_app "bin/rake #{rails_template_command} LOCATION='../../example_app_generator/generate_stuff.rb'", app_dir: example_app_dir
in_example_app "bin/rake #{rails_template_command} LOCATION='../../example_app_generator/generate_stuff.rb' __RSPEC_NO_AR=true", app_dir: example_app_dir
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions example_app_generator/generate_stuff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ def skip_active_record?
end

def self.environment_hooks
if defined?(ActiveRecord)
AR
else
if ENV['__RSPEC_NO_AR']
NoAR
else
AR
end
end
end
Expand Down