Skip to content

Commit

Permalink
Generate new apps using Rails 8.0 (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson authored Nov 7, 2024
1 parent a08f3b5 commit 3950224
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
bundler-cache: true
- run: git config --global user.name 'github-actions[bot]'
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- run: gem install --no-document railties --version "~> 7.2.0"
- run: gem install --no-document railties --version "~> 8.0.0"
- name: rake test:e2e
env:
NEXTGEN_VERSION: ${{ matrix.version }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Nextgen is an **interactive** and flexible alternative to `rails new` that inclu

## Requirements

Nextgen generates apps using **Rails 7.2**.
Nextgen generates apps using **Rails 8.0**.

- **Ruby 3.2+** is required
- **Rubygems 3.4.8+** is required (run `gem update --system` to get it)
Expand Down Expand Up @@ -54,7 +54,7 @@ Check out the [examples directory](./examples) to see some Rails apps that were

## What's included

**Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 7.2 like RuboCop, a GitHub Actions CI workflow, your choice of database platform, CSS framework, etc. You can also interactively disable parts of the default stack that you don't need, like JBuilder or Action Mailbox.
**Nextgen starts with the "omakase" default behavior of `rails new`,** so you get the great things included in Rails 8.0 like RuboCop, a GitHub Actions CI workflow, your choice of database platform, CSS framework, etc. You can also interactively disable parts of the default stack that you don't need, like JBuilder or Action Mailbox.

On top of that foundation, Nextgen offers dozens of useful enhancements to the vanilla Rails experience. You are free to pick and choose which (if any) of these to apply to your new project. Behind the scenes, **each enhancement is applied in a separate git commit,** so that you can later see what was applied and why, and revert the suggestions if necessary.

Expand Down
35 changes: 8 additions & 27 deletions config/rails_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ current: &current
args: []
label: "%%CURRENT_VERSION%%"
asset_pipelines:
sprockets: Sprockets (default)
propshaft: Propshaft
propshaft: Propshaft (default)
databases:
sqlite3: SQLite3 (default)
postgresql: PostgreSQL (recommended)
Expand All @@ -15,42 +14,24 @@ current: &current
jdbcsqlite3: JDBCSQLite3
jdbcpostgresql: JDBCPostgreSQL
jdbc: JDBC
mariadb-mysql: MariaDB-MySQL
mariadb-trilogy: MariaDB-Trilogy
default_features:
brakeman: Brakeman
ci: GitHub Actions CI
kamal: Kamal
rubocop: RuboCop
solid: Solid Cache+Queue
thruster: Thruster
optional_features:
devcontainer: devcontainer files

edge:
<<: *current
args: ["--edge"]
label: "edge (7-2-stable)"
label: "edge (8-0-stable)"

main:
<<: *current
args: ["--main"]
label: "main (%%MAIN_VERSION%%)"
asset_pipelines:
propshaft: Propshaft (default)
databases:
sqlite3: SQLite3 (default)
postgresql: PostgreSQL (recommended)
mysql: MySQL
trilogy: Trilogy
oracle: Oracle
sqlserver: SQLServer
jdbcmysql: JDBCMySQL
jdbcsqlite3: JDBCSQLite3
jdbcpostgresql: JDBCPostgreSQL
jdbc: JDBC
mariadb-mysql: MariaDB-MySQL
mariadb-trilogy: MariaDB-Trilogy
default_features:
brakeman: Brakeman
ci: GitHub Actions CI
kamal: Kamal
rubocop: RuboCop
solid: Solid Cache+Queue
thruster: Thruster
optional_features:
devcontainer: devcontainer files
2 changes: 1 addition & 1 deletion nextgen.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "railties", "~> 7.2.0"
spec.add_dependency "railties", "~> 8.0.0"
spec.add_dependency "thor", "~> 1.2"
spec.add_dependency "tty-prompt", "~> 0.23.1"
spec.add_dependency "tty-screen", "~> 0.8.1"
Expand Down
4 changes: 2 additions & 2 deletions test/nextgen/rails_options_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ def test_js_package_manager_can_be_specified
refute(opts.npm?)
end

def test_asset_pipeline_can_be_specified
def test_asset_pipeline_assumes_propshaft_by_default
opts = build_rails_options

opts.asset_pipeline = :propshaft
assert_equal(["--asset-pipeline=propshaft"], opts.to_args)
assert_empty([], opts.to_args)
end

def test_invalid_asset_pipeline_raises
Expand Down
2 changes: 1 addition & 1 deletion test/nextgen/rails_version_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_edge_version_is_same_as_current_except_label_and_args
current = RailsVersion.current
edge = RailsVersion.edge

assert_equal "edge (7-2-stable)", edge.label
assert_equal "edge (8-0-stable)", edge.label
assert_equal ["--edge"], edge.args

%i[asset_pipelines databases default_features optional_features].each do |attr|
Expand Down

0 comments on commit 3950224

Please sign in to comment.