nextgen 0.13.0 → 0.14.0

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: '0887dbfdc72d4e7001ee53d66bdd685b799b6681e7664a38c99c91db3ba1d7fd'
4
- data.tar.gz: 552960fbfd1cc3cdabc97737273bffffca30c6e2412ed00c44b477d23ce9b0aa
3
+ metadata.gz: c12df02c71f082201cf7bf8c9e24c4f3d2d1c30a9969a70cf91b5597375b0648
4
+ data.tar.gz: cd01af3eebf2075ef05b9d1bc5c1dc4856acc101589f87bb0c5d8d59126553d4
5
5
  SHA512:
6
- metadata.gz: dd040d70b511dbbd4b94ed1d4d6ccb1f07dc77b377eb8b8cd6a8eee1fd7989ebf6c9865068400372890b19c3f7469ccccbcfff97e8da72b111073ef1457f6d7c
7
- data.tar.gz: 96a75604412e93edae9232c5c5930423171140ef74ea2d04b23ac9d90e21bd4c0e677d48b8dc9dad80b59d9de8767eb91ea57407d811b74575772d873660627c
6
+ metadata.gz: 630e92302ffd0d5f87b3e37c9d64fb4f4f6fa7a67ce45b585e1398bab30566097e3f092e54b922db3f8a68ba83c8b0d661fbde48c8f636baff3f908af4de724c
7
+ data.tar.gz: 760e9b02cc4b8bb948a2e6d707af9bfdfd212658699e80578249ca7ca02ec1763f5baebc2583d8e44c7b054d718a458536acce757414334224090df31361ef26
data/README.md CHANGED
@@ -28,7 +28,7 @@ Nextgen is an **interactive** and flexible alternative to `rails new` that inclu
28
28
 
29
29
  Nextgen generates apps using **Rails 7.1**.
30
30
 
31
- - **Ruby 3.0+** is required
31
+ - **Ruby 3.1+** is required
32
32
  - **Rubygems 3.4.8+** is required (run `gem update --system` to get it)
33
33
  - **Node 18.12+ and Yarn** are required if you choose Vite or other Node-based options
34
34
  - Additional tools may be required depending on the options you select (e.g. PostgreSQL)
@@ -13,7 +13,7 @@ module Nextgen
13
13
  false
14
14
  else
15
15
  say_status :gemfile, [name, version].compact.join(", ")
16
- gemfile.add(name, version: version, group: group, require: require)
16
+ gemfile.add(name, version:, group:, require:)
17
17
  true
18
18
  end
19
19
  end
@@ -44,7 +44,7 @@ module Nextgen
44
44
 
45
45
  Bundler.with_original_env do
46
46
  say_status :bundle, cmd, :green if verbose
47
- run! full_command, env: {"BUNDLE_IGNORE_MESSAGES" => "1"}, verbose: false, capture: capture
47
+ run! full_command, env: {"BUNDLE_IGNORE_MESSAGES" => "1"}, verbose: false, capture:
48
48
  end
49
49
  end
50
50
 
@@ -7,7 +7,7 @@ module Nextgen
7
7
  alias add_yarn_package add_yarn_packages
8
8
 
9
9
  def remove_yarn_packages(*packages, capture: false)
10
- yarn_command "remove #{packages.map(&:shellescape).join(" ")}", capture: capture
10
+ yarn_command "remove #{packages.map(&:shellescape).join(" ")}", capture:
11
11
  end
12
12
  alias remove_yarn_package remove_yarn_packages
13
13
 
@@ -22,7 +22,7 @@ module Nextgen
22
22
  result, status = Open3.capture2e(env, cmd)
23
23
  success = status.success?
24
24
  else
25
- result = success = run(cmd, env: env, verbose: verbose)
25
+ result = success = run(cmd, env:, verbose:)
26
26
  end
27
27
 
28
28
  return result if success
@@ -242,7 +242,7 @@ module Nextgen
242
242
  end
243
243
 
244
244
  def ask_optional_enhancements
245
- @generators = Generators.compatible_with(rails_opts: rails_opts)
245
+ @generators = Generators.compatible_with(rails_opts:)
246
246
 
247
247
  answers = prompt.multi_select(
248
248
  "Which optional enhancements would you like to add?",
@@ -92,7 +92,7 @@ copy_file "test/helpers/inline_svg_helper_test.rb" if File.exist?("test/vite_hel
92
92
 
93
93
  say_git "Add a `yarn start` script"
94
94
  start = "concurrently -i -k --kill-others-on-fail -p none 'RUBY_DEBUG_OPEN=true bin/rails s' 'bin/vite dev'"
95
- add_package_json_script start: start
95
+ add_package_json_script(start:)
96
96
  add_yarn_package "concurrently", dev: true
97
97
  gsub_file "README.md", %r{bin/rails s(erver)?}, "yarn start"
98
98
  gsub_file "bin/setup", %r{bin/rails s(erver)?}, "yarn start"
@@ -40,7 +40,7 @@ module Nextgen
40
40
  name = name.to_sym
41
41
  raise ArgumentError, "Generator #{name.inspect} was already added" if generators.key?(name)
42
42
 
43
- generators[name] = {node: node, prompt: prompt, description: description}
43
+ generators[name] = {node:, prompt:, description:}
44
44
  activate(name) unless prompt
45
45
  end
46
46
 
data/lib/nextgen/rails.rb CHANGED
@@ -29,10 +29,10 @@ module Nextgen
29
29
  Thor::Base.shell.new.say_status(...)
30
30
  end
31
31
 
32
- def with_original_bundler_env(&block)
32
+ def with_original_bundler_env(&)
33
33
  return yield unless defined?(Bundler)
34
34
 
35
- Bundler.with_original_env(&block)
35
+ Bundler.with_original_env(&)
36
36
  end
37
37
  end
38
38
  end
@@ -23,7 +23,7 @@ module Nextgen
23
23
 
24
24
  if given_args.first == "help"
25
25
  retry_with_args = ["help"] if given_args.length > 1
26
- elsif (e.unknown & %w[-h --help]).any?
26
+ elsif e.unknown.intersect?(%w[-h --help])
27
27
  retry_with_args = ["help", (given_args - e.unknown).first]
28
28
  end
29
29
  raise unless retry_with_args.any?
@@ -27,7 +27,7 @@ module Nextgen
27
27
  def add(gem, version: nil, group: nil, require: nil)
28
28
  return false if include?(gem)
29
29
 
30
- gem_line = build_gem_line(gem, version: version, require: require, indent: group ? " " : "")
30
+ gem_line = build_gem_line(gem, version:, require:, indent: group ? " " : "")
31
31
 
32
32
  if group
33
33
  group_line = create_group_if_needed(group)
@@ -1,3 +1,3 @@
1
1
  module Nextgen
2
- VERSION = "0.13.0".freeze
2
+ VERSION = "0.14.0".freeze
3
3
  end
data/template/bin/setup CHANGED
@@ -27,7 +27,7 @@ def run(command, echo: true, silent: false, exception: true)
27
27
  say_status(:run, command, :blue) if echo
28
28
  with_original_bundler_env do
29
29
  options = silent ? {out: File::NULL, err: File::NULL} : {}
30
- system(command, exception: exception, **options)
30
+ system(command, exception:, **options)
31
31
  end
32
32
  end
33
33
 
@@ -59,10 +59,10 @@ def git_safe_needed?
59
59
  ENV["PATH"].include?(".git/safe/../../bin") && !Dir.exist?(".git/safe")
60
60
  end
61
61
 
62
- def with_original_bundler_env(&block)
62
+ def with_original_bundler_env(&)
63
63
  return yield unless defined?(Bundler)
64
64
 
65
- Bundler.with_original_env(&block)
65
+ Bundler.with_original_env(&)
66
66
  end
67
67
 
68
68
  def env(env_file, from:)
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.13.0
4
+ version: 0.14.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-04-12 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -215,14 +215,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
215
215
  requirements:
216
216
  - - ">="
217
217
  - !ruby/object:Gem::Version
218
- version: '3.0'
218
+ version: '3.1'
219
219
  required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  requirements:
221
221
  - - ">="
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
224
  requirements: []
225
- rubygems_version: 3.5.8
225
+ rubygems_version: 3.5.9
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: Generate your next Rails app interactively!