Skip to content
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

Clearer default gemfile #43212

Merged
merged 13 commits into from
Sep 13, 2021
Merged

Clearer default gemfile #43212

merged 13 commits into from
Sep 13, 2021

Conversation

dhh
Copy link
Member

@dhh dhh commented Sep 13, 2021

Cleanup spacing, comments, and order in the default Gemfile. Properly separating different gems. A default generation now looks like this:

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "2.7.2"

# Use local checkout of Rails
gem "rails", path: "/Users/dhh/Work/rails/rails"

# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails", ">= 0.3.4"

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails", ">= 0.7.11"

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails", ">= 0.4.0"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder", "~> 2.7"

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Use Sass to process CSS
# gem "sassc-rails", "~> 2.1"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

group :development, :test do
  # Start debugger with binding.b [https://github.com/ruby/debug]
  gem "debug", ">= 1.0.0", platforms: %i[ mri mingw x64_mingw ]
end

group :development do
  # Use console on exceptions pages [https://github.com/rails/web-console]
  gem "web-console", ">= 4.1.0"

  # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
  # gem "rack-mini-profiler", "~> 2.0"

  # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
  # gem "spring"
end

group :test do
  # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
  gem "capybara", ">= 3.26"
  gem "selenium-webdriver"
  gem "webdrivers"
end

@rails-bot rails-bot bot added the railties label Sep 13, 2021
@dhh dhh merged commit ecbd92c into main Sep 13, 2021
@dhh dhh deleted the clearer-default-gemfile branch September 13, 2021 09:57
@ceritium
Copy link
Contributor

@dhh, rack-mini-profiler supports Turbo since the version 2.3.3, but it requires a small configuration.

I think that it's worth defining the "minimal" version of "rack-mini-profiler" on Gemfile.tt that supports Turbo. I would also add a small comment about the configuration.

I would appreciate some feedback on #43134 since you removed some comments here.

@dhh
Copy link
Member Author

dhh commented Sep 13, 2021

The issue is not Turbo compatibility but etag compatibility, which to me seems like a fundamental and unavoidable issue. If you want 302 to mean the page didn't change, then obviously that means the speed badge also can't change, which means it'll be stale.

@dhh
Copy link
Member Author

dhh commented Sep 13, 2021

Ah, I see what you mean. Sorry, I thought you were arguing whether it should be uncommented by default. I'll change the minimum version requirement. Although of course on a new app it'd still resolve to the latest.

@dhh
Copy link
Member Author

dhh commented Sep 13, 2021

Added that in fdf5e00

@ceritium
Copy link
Contributor

I will close my PR then; I guess that if someone is interested in rack-mini-profile will read the readme and find the Turbo configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants