inline_forms_installer 8.1.67 → 8.1.70
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a76760c3472f54ae4118cbc75a0a651c2c898742ef0ed5369c9278cb2a220772
|
|
4
|
+
data.tar.gz: 6801b1b3425f0167c246221a7ea95b86fe55bebbcefd5587d67acad9cc2733a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc729a5297f2491e0236235eeb9e249c386d38eb3efd15c4401e4dbcc0a2f461fe18bfda459a17fb8550ef1303ed837eb3bb2aba131f87eb141ff218429a05d8
|
|
7
|
+
data.tar.gz: e942c5ad03e09a0bd905eca34817e9056004d4d54ee748e827be96b333b766280e7308032d15d20ac50432e4d74dae3de2c3b408b6aa21896ebd1229613fd229
|
|
@@ -88,7 +88,7 @@ end
|
|
|
88
88
|
# agnostic `X.Y.Z` form; `force: true` avoids Thor's interactive overwrite
|
|
89
89
|
# prompt when Rails' value differs (it always does, now that we drop the
|
|
90
90
|
# RVM-only `ruby-` prefix).
|
|
91
|
-
create_file ".ruby-version", "#{ENV.fetch('ruby_version', '4.0.
|
|
91
|
+
create_file ".ruby-version", "#{ENV.fetch('ruby_version', '4.0.10')}\n", force: true
|
|
92
92
|
if (gemset = ENV["inline_forms_rvm_gemset"]).to_s != ""
|
|
93
93
|
create_file ".ruby-gemset", "#{gemset}\n"
|
|
94
94
|
end
|
|
@@ -201,8 +201,11 @@ gem_group :development do
|
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
gem_group :production do
|
|
204
|
+
# The ExecJS runtime (embedded V8) terser runs on, so no node is needed.
|
|
204
205
|
gem 'mini_racer'
|
|
205
|
-
|
|
206
|
+
# JavaScript compressor (config.assets.js_compressor in production.rb).
|
|
207
|
+
# uglifier is ES5-era and cannot parse Turbo 8's ES2022 bundle.
|
|
208
|
+
gem 'terser'
|
|
206
209
|
end
|
|
207
210
|
|
|
208
211
|
say "- Running bundle..."
|
|
@@ -774,6 +777,16 @@ gsub_file "config/environments/production.rb",
|
|
|
774
777
|
gsub_file "config/environments/production.rb",
|
|
775
778
|
"# config.force_ssl = true", "config.force_ssl = true"
|
|
776
779
|
|
|
780
|
+
# JavaScript compression on assets:precompile. Nothing else sets a compressor,
|
|
781
|
+
# and the gem alone (production group) does not switch it on.
|
|
782
|
+
say "- Setting js_compressor = :terser in environments/production.rb..."
|
|
783
|
+
insert_into_file "config/environments/production.rb", <<-JS_COMPRESSOR.strip_heredoc.indent(2), after: "Rails.application.configure do\n"
|
|
784
|
+
# Compress JavaScript with terser (ES2022-capable), which runs on mini_racer;
|
|
785
|
+
# both are in the Gemfile's production group.
|
|
786
|
+
config.assets.js_compressor = :terser
|
|
787
|
+
|
|
788
|
+
JS_COMPRESSOR
|
|
789
|
+
|
|
777
790
|
# devise mailer stuff
|
|
778
791
|
say "- Injecting devise mailer stuff in environments/production.rb..."
|
|
779
792
|
# strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
|
2
2
|
|
|
3
3
|
module InlineFormsInstaller
|
|
4
|
-
VERSION = "8.1.
|
|
4
|
+
VERSION = "8.1.70"
|
|
5
5
|
|
|
6
6
|
# Canonical bare Ruby version (must match gemspec `required_ruby_version`).
|
|
7
7
|
# Written verbatim into generated apps' `.ruby-version` for rbenv/chruby/asdf/
|
|
8
8
|
# mise (which need the bare `X.Y.Z` form). For RVM installs the Creator writes
|
|
9
9
|
# the `ruby-X.Y.Z` form instead, because RVM's `.ruby-version` reader rejects a
|
|
10
10
|
# bare version. See Creator#create (ENV["ruby_version"]).
|
|
11
|
-
TARGET_RUBY_VERSION = "4.0.
|
|
11
|
+
TARGET_RUBY_VERSION = "4.0.10"
|
|
12
12
|
|
|
13
13
|
# Kept in sync with inline_forms gem releases from the same repo tag.
|
|
14
14
|
INLINE_FORMS_VERSION = VERSION
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "../example_app/example_integration_test_case"
|
|
4
|
+
|
|
5
|
+
# Production minifies JavaScript with terser on mini_racer (8.1.69; uglifier
|
|
6
|
+
# before, which nothing switched on and which cannot parse Turbo 8's ES2022).
|
|
7
|
+
# The test env does not load the production group, so this reads the generated
|
|
8
|
+
# files; a real assets:precompile is checked by hand on a release.
|
|
9
|
+
class ExampleAppProductionJsCompressorTest < ExampleAppIntegrationTestCase
|
|
10
|
+
test "production config sets the terser compressor" do
|
|
11
|
+
config = File.read(Rails.root.join("config", "environments", "production.rb"))
|
|
12
|
+
|
|
13
|
+
assert_match(/^ config\.assets\.js_compressor = :terser$/, config,
|
|
14
|
+
"expected the installer to set js_compressor in production.rb")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
test "the production group has terser and mini_racer, and uglifier is gone" do
|
|
18
|
+
gemfile = File.read(Rails.root.join("Gemfile"))
|
|
19
|
+
production = gemfile[/^group :production do\n(.*?)^end/m, 1]
|
|
20
|
+
|
|
21
|
+
assert production, "expected a production group in the Gemfile"
|
|
22
|
+
assert_match(/gem ["']terser["']/, production)
|
|
23
|
+
assert_match(/gem ["']mini_racer["']/, production)
|
|
24
|
+
assert_no_match(/gem ["']uglifier["']/, gemfile)
|
|
25
|
+
end
|
|
26
|
+
end
|
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.
|
|
4
|
+
version: 8.1.70
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ace Suares
|
|
@@ -108,6 +108,7 @@ files:
|
|
|
108
108
|
- lib/installer_templates/example_app_tests/test/integration/example_app_photo_comments_test.rb
|
|
109
109
|
- lib/installer_templates/example_app_tests/test/integration/example_app_photo_revert_test.rb
|
|
110
110
|
- lib/installer_templates/example_app_tests/test/integration/example_app_photos_test.rb
|
|
111
|
+
- lib/installer_templates/example_app_tests/test/integration/example_app_production_js_compressor_test.rb
|
|
111
112
|
- lib/installer_templates/example_app_tests/test/integration/example_app_production_ssl_test.rb
|
|
112
113
|
- lib/installer_templates/example_app_tests/test/integration/example_app_routing_test.rb
|
|
113
114
|
- lib/installer_templates/example_app_tests/test/integration/example_app_sass_deprecations_test.rb
|
|
@@ -160,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
160
161
|
- !ruby/object:Gem::Version
|
|
161
162
|
version: '0'
|
|
162
163
|
requirements: []
|
|
163
|
-
rubygems_version: 4.0.
|
|
164
|
+
rubygems_version: 4.0.20
|
|
164
165
|
specification_version: 4
|
|
165
166
|
summary: CLI and Rails app template for generating inline_forms applications.
|
|
166
167
|
test_files: []
|