inline_forms_installer 8.1.59 → 8.1.60
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 +4 -4
- data/lib/inline_forms_installer/installer_core.rb +11 -3
- data/lib/inline_forms_installer/version.rb +1 -1
- data/lib/installer_templates/dartsass/inline_forms_dartsass_builds.rb +15 -5
- data/lib/installer_templates/example_app_tests/test/integration/example_app_dartsass_build_test.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 216f417bd81b48d798076676ab738b5cccd3cb975dcd111bf7eec4d0c4209611
|
|
4
|
+
data.tar.gz: 6cc34bbd9d1579ff0be367a8b1ded62b35f0c303e02daec2e4079326ec71b617
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3330d050fb3a4d7fc9995e26a032736c00e28c1df3d1cdd57a7a3adbeae7da4826fb90114807799fc0dd110084840ed18f2139b19e0af9a43c2e53196ac25cb
|
|
7
|
+
data.tar.gz: e662affa087a5c224743d3c76d28d0829cb6261ef2353d5a790a891c85cd60479ed05d8a5897b29c4f0923754949c3457d8e41f7f3447312564726ffe1253327
|
|
@@ -1259,9 +1259,13 @@ if ENV['install_example'] == 'true'
|
|
|
1259
1259
|
end
|
|
1260
1260
|
|
|
1261
1261
|
def down
|
|
1262
|
+
# apartments.owner_id and apartments.phase_id have foreign keys:
|
|
1263
|
+
# release the apartments (seeded or not) that point at a seeded owner
|
|
1264
|
+
# or phase before destroying it, or destroy raises.
|
|
1262
1265
|
OWNERS.each do |spec|
|
|
1263
|
-
owner = Owner.find_by(name: spec[:name])
|
|
1264
|
-
owner
|
|
1266
|
+
owner = Owner.find_by(name: spec[:name]) or next
|
|
1267
|
+
Apartment.where(owner_id: owner.id).update_all(owner_id: nil)
|
|
1268
|
+
owner.destroy
|
|
1265
1269
|
end
|
|
1266
1270
|
APARTMENTS.each do |spec|
|
|
1267
1271
|
apt = Apartment.find_by(name: spec[:name])
|
|
@@ -1270,7 +1274,11 @@ if ENV['install_example'] == 'true'
|
|
|
1270
1274
|
apt.photos.destroy_all
|
|
1271
1275
|
apt.destroy
|
|
1272
1276
|
end
|
|
1273
|
-
PHASES.each
|
|
1277
|
+
PHASES.each do |spec|
|
|
1278
|
+
phase = Phase.find_by(name: spec[:name]) or next
|
|
1279
|
+
Apartment.where(phase_id: phase.id).update_all(phase_id: nil)
|
|
1280
|
+
phase.destroy
|
|
1281
|
+
end
|
|
1274
1282
|
end
|
|
1275
1283
|
end
|
|
1276
1284
|
SEED_MIGRATION
|
|
@@ -23,8 +23,18 @@ Rails.application.config.dartsass.builds = {
|
|
|
23
23
|
# inline_forms_install/*_main.scss entries would resolve to the PREVIOUS OUTPUT
|
|
24
24
|
# app/assets/builds/inline_forms/{inline_forms,devise}.css instead of the gem's
|
|
25
25
|
# .scss: from the second build on, each build re-imports its own stale result
|
|
26
|
-
# and gem stylesheet changes never reach the app.
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
# and gem stylesheet changes never reach the app.
|
|
27
|
+
#
|
|
28
|
+
# The gem dir goes in front of the runner's own --load-path list, as a
|
|
29
|
+
# separate argument: not in build_options (the runner splits every entry there
|
|
30
|
+
# on whitespace, which breaks a gem path with a space in it) and not first on
|
|
31
|
+
# config.assets.paths (Sprockets would then resolve inline_forms/*.css to the
|
|
32
|
+
# gem's .scss instead of the compiled build).
|
|
33
|
+
require "dartsass/runner"
|
|
34
|
+
|
|
35
|
+
module InlineFormsDartsassLoadPath
|
|
36
|
+
def dartsass_load_paths
|
|
37
|
+
[ "--load-path", InlineForms::Engine.root.join("app/assets/stylesheets").to_s ] + super
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
Dartsass::Runner.singleton_class.prepend(InlineFormsDartsassLoadPath)
|
data/lib/installer_templates/example_app_tests/test/integration/example_app_dartsass_build_test.rb
CHANGED
|
@@ -17,7 +17,8 @@ class ExampleAppDartsassBuildTest < ActiveSupport::TestCase
|
|
|
17
17
|
command = Dartsass::Runner.dartsass_compile_command
|
|
18
18
|
first_load_path = command.index { |arg| arg == "--load-path" || arg.start_with?("--load-path=") }
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# Two arguments, so a gem path with a space stays one argument.
|
|
21
|
+
assert_equal [ "--load-path", gem_stylesheets ], command[first_load_path, 2]
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
%w[inline_forms devise].each do |entry|
|