nextgen 0.27.1 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/config/generators.yml +1 -1
- data/lib/nextgen/generators/base.rb +6 -0
- data/lib/nextgen/generators/bundler_audit.rb +1 -1
- data/lib/nextgen/generators/erb_lint.rb +26 -5
- data/lib/nextgen/generators/eslint.rb +1 -1
- data/lib/nextgen/generators/node.rb +1 -1
- data/lib/nextgen/generators/rspec_github_actions.rb +1 -1
- data/lib/nextgen/generators/rubocop.rb +3 -3
- data/lib/nextgen/generators/stylelint.rb +1 -1
- data/lib/nextgen/version.rb +1 -1
- data/template/.overcommit.yml.tt +2 -2
- data/template/lib/tasks/erb_lint.rake +13 -0
- data/template/package.json +1 -1
- metadata +4 -4
- data/template/lib/tasks/erblint.rake +0 -13
- /data/template/{.erb-lint.yml.tt → .erb_lint.yml.tt} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ea2e1d45c79b83e023bf749c3428d0cb8f896e81e480fe4099b8e26620edd2e
|
4
|
+
data.tar.gz: e605a95e89f3ad516e58515016bec87531713e928e5cca565d9ff051d867d7ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675a585287eae56813bd5b895f629ff7dec15d019318089076ffd4d31cf6dd4571daefe2cf37b6089948d66ade6107b8f076d43c9d9c6421110ec8885585f08a
|
7
|
+
data.tar.gz: 2507548b71033e3c2ebaa0482a68a373f1a12e1cdef511f6ef295bf69b0318565dadb2531b74b062e7f7ea9d799bea4e69af5252a4d3f12224959398dc63db78
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ Nextgen generates apps using **Rails 7.2**.
|
|
30
30
|
|
31
31
|
- **Ruby 3.1+** is required (Ruby 3.2 if you choose a Rails 8 pre-release)
|
32
32
|
- **Rubygems 3.4.8+** is required (run `gem update --system` to get it)
|
33
|
-
- **Node
|
33
|
+
- **Node 20.9+ and Yarn** are required if you choose Vite or other Node-based options (see the [npm note](#yarn-or-npm) below)
|
34
34
|
- Additional tools may be required depending on the options you select (e.g. PostgreSQL)
|
35
35
|
|
36
36
|
Going forward, my goal is that Nextgen will always target the latest stable version of Rails and the next pre-release version. Support for Node LTS and Ruby versions will be dropped as soon as they reach EOL (see [Ruby](https://endoflife.date/ruby) and [Node](https://endoflife.date/nodejs) EOL schedules).
|
@@ -90,7 +90,7 @@ Nextgen can install and configure your choice of these recommended gems:
|
|
90
90
|
- [bundler-audit](https://github.com/rubysec/bundler-audit)
|
91
91
|
- [capybara-lockstep](https://github.com/makandra/capybara-lockstep)
|
92
92
|
- [dotenv](https://github.com/bkeepers/dotenv)
|
93
|
-
- [erb_lint](https://github.com/Shopify/
|
93
|
+
- [erb_lint](https://github.com/Shopify/erb_lint)
|
94
94
|
- [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails)
|
95
95
|
- [good_migrations](https://github.com/testdouble/good-migrations)
|
96
96
|
- [letter_opener](https://github.com/ryanb/letter_opener)
|
data/config/generators.yml
CHANGED
@@ -49,6 +49,7 @@ if missing_ruby_decl && File.exist?(".ruby-version") && File.read(".ruby-version
|
|
49
49
|
'ruby Pathname.new(__dir__).join(".ruby-version").read.strip'
|
50
50
|
end
|
51
51
|
gsub_file "Gemfile", /^source .*$/, '\0' + "\n#{ruby_decl}"
|
52
|
+
gsub_file "Dockerfile", "COPY Gemfile", "COPY .ruby-version Gemfile" if File.exist?("Dockerfile")
|
52
53
|
bundle_command! "lock"
|
53
54
|
end
|
54
55
|
|
@@ -80,3 +81,8 @@ if (time_zone = read_system_time_zone_name)
|
|
80
81
|
uncomment_lines "config/application.rb", /config\.time_zone/
|
81
82
|
gsub_file "config/application.rb", /(config\.time_zone = ).*$/, "\\1#{time_zone.inspect}"
|
82
83
|
end
|
84
|
+
|
85
|
+
if File.exist?(".github/workflows/ci.yml")
|
86
|
+
say_git "Opt into ubuntu-24.04 GitHub Actions runner"
|
87
|
+
gsub_file ".github/workflows/ci.yml", /\bubuntu-latest\b/, "ubuntu-24.04"
|
88
|
+
end
|
@@ -7,7 +7,7 @@ if File.exist?(".github/workflows/ci.yml")
|
|
7
7
|
say_git "Add bundle-audit job to CI workflow"
|
8
8
|
inject_into_file ".github/workflows/ci.yml", <<-YAML, after: /^jobs:\n/
|
9
9
|
scan_gems:
|
10
|
-
runs-on: ubuntu-
|
10
|
+
runs-on: ubuntu-24.04
|
11
11
|
|
12
12
|
steps:
|
13
13
|
- name: Checkout code
|
@@ -3,11 +3,32 @@
|
|
3
3
|
say_git "Install erb_lint"
|
4
4
|
install_gem "erb_lint", group: :development, require: false
|
5
5
|
binstub "erb_lint"
|
6
|
-
template ".
|
6
|
+
template ".erb_lint.yml.tt"
|
7
7
|
|
8
|
-
say_git "Add
|
9
|
-
copy_file "lib/tasks/
|
10
|
-
add_lint_task "
|
8
|
+
say_git "Add erb_lint to default rake task"
|
9
|
+
copy_file "lib/tasks/erb_lint.rake"
|
10
|
+
add_lint_task "erb_lint"
|
11
|
+
|
12
|
+
if File.exist?(".github/workflows/ci.yml")
|
13
|
+
say_git "Add erb_lint job to CI workflow"
|
14
|
+
inject_into_file ".github/workflows/ci.yml", <<-YAML, after: /^jobs:\n/
|
15
|
+
erb_lint:
|
16
|
+
runs-on: ubuntu-24.04
|
17
|
+
steps:
|
18
|
+
- name: Checkout code
|
19
|
+
uses: actions/checkout@v4
|
20
|
+
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: .ruby-version
|
25
|
+
bundler-cache: true
|
26
|
+
|
27
|
+
- name: Lint ERB with erb_lint
|
28
|
+
run: bin/erb_lint --lint-all
|
29
|
+
|
30
|
+
YAML
|
31
|
+
end
|
11
32
|
|
12
33
|
say_git "Auto-correct any existing issues"
|
13
|
-
run "bin/
|
34
|
+
run "bin/erb_lint --lint-all -a", capture: true
|
@@ -29,7 +29,7 @@ if File.exist?(".github/workflows/ci.yml")
|
|
29
29
|
node_spec = File.exist?(".node-version") ? 'node-version-file: ".node-version"' : 'node-version: "lts/*"'
|
30
30
|
inject_into_file ".github/workflows/ci.yml", <<-YAML, after: /^jobs:\n/
|
31
31
|
eslint:
|
32
|
-
runs-on: ubuntu-
|
32
|
+
runs-on: ubuntu-24.04
|
33
33
|
|
34
34
|
steps:
|
35
35
|
- name: Checkout code
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
copy_file "package.json" unless File.exist?("package.json")
|
4
|
-
inject_into_file "README.md", "\n- Node
|
4
|
+
inject_into_file "README.md", "\n- Node 20 (LTS) or newer\n- Yarn 1.x (classic)", after: /^- Ruby.*$/
|
5
5
|
inject_into_file "README.md", "\nbrew install node\nbrew install yarn", after: /^brew install rbenv.*$/
|
6
6
|
gitignore "node_modules/"
|
@@ -16,9 +16,9 @@ binstub "rubocop" unless File.exist?("bin/rubocop")
|
|
16
16
|
say_git "Replace .rubocop.yml"
|
17
17
|
template ".rubocop.yml", context: binding, force: true
|
18
18
|
|
19
|
-
if File.exist?(".
|
20
|
-
say_git "Regenerate .
|
21
|
-
template ".
|
19
|
+
if File.exist?(".erb_lint.yml")
|
20
|
+
say_git "Regenerate .erb_lint.yml with rubocop support"
|
21
|
+
template ".erb_lint.yml", force: true
|
22
22
|
end
|
23
23
|
|
24
24
|
say_git "Add rubocop to default rake task"
|
@@ -27,7 +27,7 @@ if File.exist?(".github/workflows/ci.yml")
|
|
27
27
|
node_spec = File.exist?(".node-version") ? 'node-version-file: ".node-version"' : 'node-version: "lts/*"'
|
28
28
|
inject_into_file ".github/workflows/ci.yml", <<-YAML, after: /^jobs:\n/
|
29
29
|
stylelint:
|
30
|
-
runs-on: ubuntu-
|
30
|
+
runs-on: ubuntu-24.04
|
31
31
|
|
32
32
|
steps:
|
33
33
|
- name: Checkout code
|
data/lib/nextgen/version.rb
CHANGED
data/template/.overcommit.yml.tt
CHANGED
@@ -5,11 +5,11 @@ PreCommit:
|
|
5
5
|
BundleCheck:
|
6
6
|
enabled: true
|
7
7
|
|
8
|
-
<% if File.exist?(".
|
8
|
+
<% if File.exist?(".erb_lint.yml") -%>
|
9
9
|
ErbLint:
|
10
10
|
enabled: true
|
11
11
|
required_executable: bundle
|
12
|
-
command: ["bundle", "exec", "
|
12
|
+
command: ["bundle", "exec", "erb_lint"]
|
13
13
|
include: "**/*.html.erb"
|
14
14
|
<% end -%>
|
15
15
|
|
data/template/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nextgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -149,7 +149,7 @@ files:
|
|
149
149
|
- lib/nextgen/version.rb
|
150
150
|
- template/.editorconfig
|
151
151
|
- template/.env.sample
|
152
|
-
- template/.
|
152
|
+
- template/.erb_lint.yml.tt
|
153
153
|
- template/.github/PULL_REQUEST_TEMPLATE.md.tt
|
154
154
|
- template/.overcommit.yml.tt
|
155
155
|
- template/.prettierrc.cjs
|
@@ -179,7 +179,7 @@ files:
|
|
179
179
|
- template/eslint.config.js
|
180
180
|
- template/lib/puma/plugin/open.rb
|
181
181
|
- template/lib/tasks/auto_annotate_models.rake
|
182
|
-
- template/lib/tasks/
|
182
|
+
- template/lib/tasks/erb_lint.rake
|
183
183
|
- template/lib/tasks/eslint.rake.tt
|
184
184
|
- template/lib/tasks/rubocop.rake
|
185
185
|
- template/lib/tasks/stylelint.rake.tt
|
File without changes
|