nextgen 0.27.1 → 0.28.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82d682d6b4f3af463de90ebe0c21ae46975726059bb20433343b70ea9540934f
4
- data.tar.gz: ec47512a6d01f6ba0202f111c1179b67af35c616c99acf8949c89c57935f4951
3
+ metadata.gz: 1ea2e1d45c79b83e023bf749c3428d0cb8f896e81e480fe4099b8e26620edd2e
4
+ data.tar.gz: e605a95e89f3ad516e58515016bec87531713e928e5cca565d9ff051d867d7ba
5
5
  SHA512:
6
- metadata.gz: db6c76884b7906383f56b3d62846f7566d0380b4b199f24931e51f9fc4b4565dc46d6a8937d5eccd36d310a691fead9f3804874c97a1db4ec80baee0398e1250
7
- data.tar.gz: eadc9f20c730665772bc35f02c34351a3f3d8dd854a9d6cd6f23c3fd9b3371f7e3ac56d25b3a2bf80366e114eb49f7ae84bc975d0b8c4fdb03f03a1d2bb00d59
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 18.12+ and Yarn** are required if you choose Vite or other Node-based options (see the [npm note](#yarn-or-npm) below)
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/erb-lint)
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)
@@ -59,7 +59,7 @@ dotenv:
59
59
  description: "Install dotenv gem and add .env.sample"
60
60
 
61
61
  erb_lint:
62
- prompt: "ERB Lint"
62
+ prompt: "erb_lint"
63
63
  description: "Install erb_lint gem and correct existing issues"
64
64
  requires: frontend
65
65
 
@@ -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-latest
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 ".erb-lint.yml.tt"
6
+ template ".erb_lint.yml.tt"
7
7
 
8
- say_git "Add erblint to default rake task"
9
- copy_file "lib/tasks/erblint.rake"
10
- add_lint_task "erblint"
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/erblint --lint-all -a", capture: true
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-latest
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 18 (LTS) or newer\n- Yarn 1.x (classic)", after: /^- Ruby.*$/
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/"
@@ -4,7 +4,7 @@ return unless File.exist?(".github/workflows/ci.yml")
4
4
 
5
5
  erb = <<~YAML
6
6
  test:
7
- runs-on: ubuntu-latest
7
+ runs-on: ubuntu-24.04
8
8
 
9
9
  <%- if gems.include?("pg") -%>
10
10
  services:
@@ -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?(".erb-lint.yml")
20
- say_git "Regenerate .erb-lint.yml with rubocop support"
21
- template ".erb-lint.yml", force: true
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-latest
30
+ runs-on: ubuntu-24.04
31
31
 
32
32
  steps:
33
33
  - name: Checkout code
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nextgen
4
- VERSION = "0.27.1"
4
+ VERSION = "0.28.1"
5
5
  end
@@ -5,11 +5,11 @@ PreCommit:
5
5
  BundleCheck:
6
6
  enabled: true
7
7
 
8
- <% if File.exist?(".erb-lint.yml") -%>
8
+ <% if File.exist?(".erb_lint.yml") -%>
9
9
  ErbLint:
10
10
  enabled: true
11
11
  required_executable: bundle
12
- command: ["bundle", "exec", "erblint"]
12
+ command: ["bundle", "exec", "erb_lint"]
13
13
  include: "**/*.html.erb"
14
14
  <% end -%>
15
15
 
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ desc "Run erb_lint"
4
+ task :erb_lint do
5
+ sh "bin/erb_lint --lint-all"
6
+ end
7
+
8
+ namespace :erb_lint do
9
+ desc "Autocorrect erb_lint offenses"
10
+ task :autocorrect do
11
+ sh "bin/erb_lint --lint-all -a"
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "engines": {
5
- "node": "^18.12.0 || >= 20.0.0"
5
+ "node": "^20.9.0 || >= 22.0.0"
6
6
  }
7
7
  }
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.27.1
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-15 00:00:00.000000000 Z
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/.erb-lint.yml.tt
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/erblint.rake
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
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- desc "Run erblint"
4
- task :erblint do
5
- sh "bin/erblint --lint-all"
6
- end
7
-
8
- namespace :erblint do
9
- desc "Autocorrect erblint offenses"
10
- task :autocorrect do
11
- sh "bin/erblint --lint-all -a"
12
- end
13
- end
File without changes