nextgen 0.27.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/erb_lint.rb +26 -5
- data/lib/nextgen/generators/node.rb +1 -1
- data/lib/nextgen/generators/rubocop.rb +3 -3
- data/lib/nextgen/version.rb +1 -1
- data/template/.overcommit.yml.tt +2 -2
- data/template/README.md.tt +1 -1
- data/template/lib/tasks/erb_lint.rake +13 -0
- data/template/package.json +1 -1
- metadata +5 -5
- 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: 890cdf983b00963c7228df4367a5bb0662c604865fd115f6e1813471b95c2d9b
|
4
|
+
data.tar.gz: 77da310de05b67c32e3804c15d4ade8093504340aa880468a90fead6229ccc92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aa5eb956c9f7277ce2a31a830d019006bcc4b38b8bb5c1486d3186c1c711da1f1511298e7ca2e454cd9cede689115b4a4d6edfcfcbe094ddfae49025bc51c99
|
7
|
+
data.tar.gz: 05d179b2fba0eb8dcb8433f48b81d4d757cb58fb5b774b18e31e3e5066bdd36e50480ad3a764b1c07a69d9d84b328c99690a31a33da459a4bd053492c72777ac
|
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
|
@@ -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-latest
|
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
|
@@ -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"
|
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/README.md.tt
CHANGED
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.0
|
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-
|
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
|
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
|
-
rubygems_version: 3.5.
|
230
|
+
rubygems_version: 3.5.21
|
231
231
|
signing_key:
|
232
232
|
specification_version: 4
|
233
233
|
summary: Generate your next Rails app interactively!
|
File without changes
|