nextgen 0.37.0 → 0.39.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0547fc9946683f3753ce175848f7a7a5b0e96e9212e21d8cdd1f69430fecea05
4
- data.tar.gz: 72fa1da52395f08d06291dc3c43b6cf38f932b3073dc0b17476780dba2b6ceb0
3
+ metadata.gz: 64c5e668f34c02d81f81c1aab9b65ee6b033b3610b19bfcf8476581cb91175e6
4
+ data.tar.gz: 7348ace882c3cde9cef50443b83df5b9a2d1871efede8417625005f422b641b8
5
5
  SHA512:
6
- metadata.gz: f455f1ee06e99bab86cab8dee4ccc955279bb7de8ae2261e5724f36ee01afa59813b20509de74a745cbe15253d465f92311c00df0d4f42928cde202a903bddd2
7
- data.tar.gz: 11ff219399baaebe36d497109b0b150f52681087fdfdcc52761ce12e78f33a05936f71e01500cf159e0ac528fe536342f08285fd16eb14f075a77fd31d1d19a3
6
+ metadata.gz: dea29586f91a465e1975054ce1001a734f1e2746f4acff882947921a2b24057520b545f9d1a2a6c9b10b742b8167ce4e760a2f2f6c423fab070043573aec4294
7
+ data.tar.gz: e278d7e8b0658d7e0d0f54ad2c0ab646906d4fe166e7ef93b7a11a626b21459fc2692ede5c1fe8a1c03fb83a1608e562c84f7c8e3df38747b9d770fab7e08d9a
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2025 Matt Brictson
3
+ Copyright (c) 2026 Matt Brictson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -14,6 +14,8 @@ module Nextgen
14
14
  class Commands::Create # rubocop:disable Metrics/ClassLength
15
15
  extend Forwardable
16
16
 
17
+ RESERVED_NAMES = %w[application destroy plugin runner test].freeze
18
+
17
19
  def self.run(app_path, options)
18
20
  new(app_path, options).run
19
21
  end
@@ -24,6 +26,8 @@ module Nextgen
24
26
  end
25
27
 
26
28
  def run # rubocop:disable Metrics/MethodLength, Metrics/PerceivedComplexity
29
+ reserved_word_message if app_name_is_reserved_word?
30
+
27
31
  say <<~BANNER
28
32
  Welcome to nextgen, the interactive Rails app generator!
29
33
 
@@ -106,6 +110,17 @@ module Nextgen
106
110
 
107
111
  def_delegators :shell, :say
108
112
 
113
+ def app_name_is_reserved_word?
114
+ RESERVED_NAMES.include?(app_name.downcase)
115
+ end
116
+
117
+ def reserved_word_message
118
+ say <<~APP_NAME
119
+ Your Rails app name: "#{cyan(app_name)}", is a reserved word. Please rerun the initial command with an unreserved word instead.
120
+ APP_NAME
121
+ exit(false)
122
+ end
123
+
109
124
  def continue_if(question)
110
125
  if prompt.yes?(question)
111
126
  say
@@ -32,7 +32,7 @@ append_to_file "Rakefile", <<~RUBY
32
32
  end
33
33
  RUBY
34
34
 
35
- if File.exist?("test/application_system_test_case.rb")
35
+ if File.read("Gemfile").match?(/^\s*gem ['"]capybara['"]/)
36
36
  say_git "Configure system tests"
37
37
  copy_test_support_file "capybara.rb.tt"
38
38
  copy_file "test/application_system_test_case.rb", force: true
@@ -17,7 +17,7 @@ if File.exist?(".github/workflows/ci.yml")
17
17
  runs-on: ubuntu-latest
18
18
  steps:
19
19
  - name: Checkout code
20
- uses: actions/checkout@v5
20
+ uses: actions/checkout@v6
21
21
 
22
22
  - name: Set up Ruby
23
23
  uses: ruby/setup-ruby@v1
@@ -33,10 +33,10 @@ if File.exist?(".github/workflows/ci.yml")
33
33
 
34
34
  steps:
35
35
  - name: Checkout code
36
- uses: actions/checkout@v5
36
+ uses: actions/checkout@v6
37
37
 
38
38
  - name: Set up Node
39
- uses: actions/setup-node@v5
39
+ uses: actions/setup-node@v6
40
40
  with:
41
41
  #{node_spec}
42
42
  cache: #{js_package_manager}
@@ -25,7 +25,7 @@ erb = <<~YAML
25
25
 
26
26
  <%- end -%>
27
27
  - name: Checkout code
28
- uses: actions/checkout@v5
28
+ uses: actions/checkout@v6
29
29
 
30
30
  - name: Set up Ruby
31
31
  uses: ruby/setup-ruby@v1
@@ -47,7 +47,7 @@ erb = <<~YAML
47
47
  <%- if gems.include?("capybara") -%>
48
48
 
49
49
  - name: Keep screenshots from failed system tests
50
- uses: actions/upload-artifact@v4
50
+ uses: actions/upload-artifact@v6
51
51
  if: failure()
52
52
  with:
53
53
  name: screenshots
@@ -30,10 +30,10 @@ if File.exist?(".github/workflows/ci.yml")
30
30
 
31
31
  steps:
32
32
  - name: Checkout code
33
- uses: actions/checkout@v5
33
+ uses: actions/checkout@v6
34
34
 
35
35
  - name: Set up Node
36
- uses: actions/setup-node@v5
36
+ uses: actions/setup-node@v6
37
37
  with:
38
38
  #{node_spec}
39
39
  cache: #{js_package_manager}
@@ -96,7 +96,7 @@ copy_file "app/frontend/images/example.svg"
96
96
  copy_file "test/helpers/inline_svg_helper_test.rb" if File.exist?("test/vite_helper.rb")
97
97
 
98
98
  say_git "Add a `bin/dev` script that uses run-pty"
99
- add_js_packages "run-pty@^5", dev: true
99
+ add_js_packages "run-pty@^6", dev: true
100
100
  copy_file "bin/dev-node", "bin/dev", mode: :preserve, force: true
101
101
  copy_file "run-pty.json"
102
102
  remove_file "Procfile.dev"
@@ -125,7 +125,7 @@ if File.exist?(".github/workflows/ci.yml")
125
125
  inject_into_file ".github/workflows/ci.yml", <<-YAML, before: /^\s+- name: Run tests/
126
126
 
127
127
  - name: Set up Node
128
- uses: actions/setup-node@v5
128
+ uses: actions/setup-node@v6
129
129
  with:
130
130
  #{node_spec}
131
131
  cache: #{js_package_manager}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nextgen
4
- VERSION = "0.37.0"
4
+ VERSION = "0.39.0"
5
5
  end
@@ -16,7 +16,7 @@ On macOS, these [Homebrew](http://brew.sh) packages are recommended:
16
16
  ```
17
17
  brew install rbenv
18
18
  <% if postgres -%>
19
- brew install postgresql@17
19
+ brew install postgresql@18
20
20
  <% end -%>
21
21
  ```
22
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nextgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.37.0
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  - !ruby/object:Gem::Version
225
225
  version: '0'
226
226
  requirements: []
227
- rubygems_version: 3.7.2
227
+ rubygems_version: 4.0.3
228
228
  specification_version: 4
229
229
  summary: Generate your next Rails app interactively!
230
230
  test_files: []