Skip to content

Commit

Permalink
Isolate down pghero to just dev/demo environments and prune some Rail…
Browse files Browse the repository at this point in the history
…s 8 gems
  • Loading branch information
bensheldon committed Nov 29, 2024
1 parent 2b62895 commit 29c96dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ gemspec

gem 'activerecord-jdbcpostgresql-adapter', platforms: [:jruby]
gem 'pg', platforms: [:mri, :mingw, :x64_mingw]
gem "pghero"

rails_versions = {
"6.1" => { github: "rails/rails", branch: "6-1-stable" }, # https://github.com/bensheldon/good_job/issues/1280
Expand All @@ -33,8 +32,6 @@ rails_versions = {
}
gem 'rails', rails_versions[ENV.fetch("RAILS_VERSION", nil)]

gem "sprockets-rails"

platforms :ruby do
gem "bootsnap"
gem "dotenv-rails"
Expand Down Expand Up @@ -71,6 +68,11 @@ platforms :ruby do
gem "tapioca", require: false
end

group :development, :demo, :production do
gem "pghero"
gem "sprockets-rails"
end

group :demo, :production do
gem "skylight"
end
Expand Down
2 changes: 1 addition & 1 deletion demo/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

get :create_job, to: 'application#create_job'

mount PgHero::Engine, at: "pghero"
mount PgHero::Engine, at: "pghero" if defined?(PgHero)
end
2 changes: 1 addition & 1 deletion spec/support/example_app_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def setup_example_app

root_path = example_app_path.join('..')
FileUtils.cd(root_path) do
system("rails new #{app_name} -d postgresql --no-assets --skip-action-text --skip-action-mailer --skip-action-mailbox --skip-action-cable --skip-git --skip-sprockets --skip-listen --skip-javascript --skip-turbolinks --skip-system-test --skip-test-unit --skip-bootsnap --skip-spring --skip-active-storage")
system("rails new #{app_name} -d postgresql --skip-action-text --skip-action-mailer --skip-action-mailbox --skip-action-cable --skip-git --skip-sprockets --skip-listen --skip-javascript --skip-turbolinks --skip-solid --skip-kamal --skip-system-test --skip-test-unit --skip-bootsnap --skip-spring --skip-active-storage")
end

FileUtils.rm_rf("#{example_app_path}/config/initializers/assets.rb")
Expand Down

0 comments on commit 29c96dd

Please sign in to comment.