inline_forms_installer 8.1.1 → 8.1.3

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: b52ad53c2bf545f31ee62580ea64c9e0ee3652938a85a18f812ebf84044374e5
4
- data.tar.gz: d0570d54df08235abf7aee6b1cdf6e5f942aa49d99fbcb903a007682e04e9ea8
3
+ metadata.gz: 6b4f54ce386e1f7b9b8052cb1817c837a94a1cb4b315887a19456d1c054f8a28
4
+ data.tar.gz: 2597296ce7e66de213ba8eef07191b924c355258f45210cbf6380c1ffa695891
5
5
  SHA512:
6
- metadata.gz: 61bdd6c15f62a1f6261039eab68e62fbdc29babda7b0dcd8d3da33c2ca0b021712cd7bce602577f90594c3476da86e13e8356773d92dec1da16cab509af03534
7
- data.tar.gz: '00842465140c3164bfba1437ce6ae97691728f18bf454885280fe5f401fe959ab6cd0d186b82791bd6070af6c95b945a19aba02ddc12f7363392221fa28de20d'
6
+ metadata.gz: 6517c3d2c92010b5f9f8032206e8bad5d14bf5d11b77c186d807fed490680534952d136aa2e63ebd485878d17561a66a7c7477126fface669d447e63d69aa245
7
+ data.tar.gz: 243c4dee8186095ec2d8fd84a34a204bcf6deecf74360e01069b3396435dfad83fc12162fb347d704bf51e6a95301b9ef768b93185551f763523e6344fee27cd
@@ -67,6 +67,25 @@ module InlineFormsInstaller
67
67
  exit 1
68
68
  end
69
69
 
70
+ # The example app always generates Photo / Apartment / Owner; the
71
+ # installer always generates Locale / Role (and the Devise-backed user
72
+ # model with the chosen class name). Reject `-U <reserved>` early
73
+ # rather than letting `rails g inline_forms` collide with an
74
+ # already-generated app/models/<reserved>.rb at install time.
75
+ example_reserved = %w[Photo Apartment Owner].freeze
76
+ installer_reserved = %w[Locale Role].freeze
77
+ if installer_reserved.include?(user_model_cfg.class_name)
78
+ say "Error: -U #{user_model_cfg.class_name} conflicts with an installer-generated model " \
79
+ "(#{installer_reserved.join(', ')}); choose a different class name.", :red
80
+ exit 1
81
+ end
82
+ if install_example? && example_reserved.include?(user_model_cfg.class_name)
83
+ say "Error: -U #{user_model_cfg.class_name} conflicts with an --example model " \
84
+ "(#{example_reserved.join(', ')}); choose a different class name " \
85
+ "or drop --example.", :red
86
+ exit 1
87
+ end
88
+
70
89
  inline_forms_version = InlineFormsInstaller.inline_forms_version
71
90
  # The Gemfile pins `gem "inline_forms", "~> 8"`, so Bundler resolves the
72
91
  # highest 8.x available on RubyGems at install time. The
@@ -122,7 +141,7 @@ module InlineFormsInstaller
122
141
  Gem::Specification
123
142
  .find_all_by_name("rails")
124
143
  .map(&:version)
125
- .select { |v| v >= Gem::Version.new("8.0") && v < Gem::Version.new("8.1") }
144
+ .select { |v| v >= Gem::Version.new("8.1") && v < Gem::Version.new("8.2") }
126
145
  .max
127
146
  rescue StandardError
128
147
  nil
@@ -70,12 +70,12 @@ use_app_rvm_gemset!
70
70
  remove_file 'Gemfile' if File.exist?('Gemfile')
71
71
  create_file 'Gemfile', "# created by inline_forms_installer #{ENV['inline_forms_installer_version']} on #{Date.today}\n"
72
72
 
73
- # Creator invokes `rails _8.0.x_ new`, which emits `load_defaults 8.0` and removes
74
- # `new_framework_defaults_8_0.rb`. Normalize anyway when an older generator left another minor.
73
+ # Creator invokes `rails _8.1.x_ new`, which emits `load_defaults 8.1` and removes
74
+ # `new_framework_defaults_8_1.rb`. Normalize anyway when an older generator left another minor.
75
75
  if File.exist?('config/application.rb')
76
76
  gsub_file 'config/application.rb',
77
77
  /config\.load_defaults\s+\d+\.\d+/,
78
- 'config.load_defaults 8.0'
78
+ 'config.load_defaults 8.1'
79
79
  end
80
80
 
81
81
  add_source 'https://rubygems.org'
@@ -106,10 +106,10 @@ gem 'jquery-ui-rails', '4.0.3'
106
106
  # foundation-icons-sass-rails depended on sass-rails).
107
107
  gem 'mini_magick'
108
108
  gem 'mysql2'
109
- gem 'paper_trail', '~> 16.0'
110
- gem 'rails-i18n', '~> 8.0'
109
+ gem 'paper_trail', '~> 17.0'
110
+ gem 'rails-i18n', '~> 8.1'
111
111
  gem 'rails-jquery-autocomplete'
112
- gem 'rails', '~> 8.0'
112
+ gem 'rails', '~> 8.1'
113
113
  gem 'rake'
114
114
  gem 'rvm'
115
115
  gem 'dartsass-rails'
@@ -285,7 +285,7 @@ create_file "db/migrate/" +
285
285
  Time.now.utc.strftime("%Y%m%d%H%M%S") +
286
286
  "_" +
287
287
  "#{user_cfg.devise_migration_basename}.rb", <<-DEVISE_MIGRATION.strip_heredoc
288
- class #{user_cfg.devise_migration_class} < ActiveRecord::Migration[8.0]
288
+ class #{user_cfg.devise_migration_class} < ActiveRecord::Migration[8.1]
289
289
 
290
290
  def change
291
291
  create_table(:#{user_cfg.table_name}) do |t|
@@ -425,7 +425,7 @@ create_file "db/migrate/" +
425
425
  Time.now.utc.strftime("%Y%m%d%H%M%S") +
426
426
  "_" +
427
427
  "#{user_cfg.join_migration_basename}.rb", <<-ROLES_MIGRATION.strip_heredoc
428
- class #{user_cfg.join_migration_class} < ActiveRecord::Migration[8.0]
428
+ class #{user_cfg.join_migration_class} < ActiveRecord::Migration[8.1]
429
429
  def self.up
430
430
  create_table :#{user_cfg.join_table}, :id => false, :force => true do |t|
431
431
  t.integer :role_id
@@ -840,7 +840,7 @@ if ENV['install_example'] == 'true'
840
840
  sleep 1
841
841
  add_owner_ts = Time.now.utc.strftime("%Y%m%d%H%M%S")
842
842
  create_file "db/migrate/#{add_owner_ts}_add_owner_to_apartments.rb", <<-ADD_OWNER.strip_heredoc
843
- class AddOwnerToApartments < ActiveRecord::Migration[8.0]
843
+ class AddOwnerToApartments < ActiveRecord::Migration[8.1]
844
844
  def change
845
845
  add_reference :apartments, :owner, null: true, foreign_key: true
846
846
  end
@@ -919,7 +919,7 @@ if ENV['install_example'] == 'true'
919
919
  sleep 1
920
920
  seed_ts = Time.now.utc.strftime("%Y%m%d%H%M%S")
921
921
  create_file "db/migrate/#{seed_ts}_seed_example_apartments_and_owners.rb", <<-SEED_MIGRATION.strip_heredoc
922
- class SeedExampleApartmentsAndOwners < ActiveRecord::Migration[8.0]
922
+ class SeedExampleApartmentsAndOwners < ActiveRecord::Migration[8.1]
923
923
  # ---------------------------------------------------------------
924
924
  # Apartment seed gallery
925
925
  # ---------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineFormsInstaller
3
- VERSION = "8.1.1"
3
+ VERSION = "8.1.3"
4
4
 
5
5
  # Written into generated apps' `.ruby-version` (must match gemspec `required_ruby_version`).
6
6
  TARGET_RUBY_VERSION = "ruby-4.0.4"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms_installer
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.1
4
+ version: 8.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  requirements: []
136
- rubygems_version: 4.0.10
136
+ rubygems_version: 4.0.12
137
137
  specification_version: 4
138
138
  summary: CLI and Rails app template for generating inline_forms applications.
139
139
  test_files: []