inline_forms_installer 8.1.66 → 8.1.67
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 +3 -8
- data/lib/inline_forms_installer/version.rb +1 -1
- data/lib/installer_templates/example_app_tests/test/integration/example_app_layout_title_test.rb +20 -0
- data/lib/installer_templates/example_app_tests/test/integration/example_app_stylesheet_test.rb +1 -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: 92b94c504a30ef6f73464e503084798e2c31430c8e85e5b04cdca08a3ebaa97d
|
|
4
|
+
data.tar.gz: f62914f1aedd9454d33d98f0b77d85f59b90b9c9b6c78f6d788873857451236f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20394d674b19997e310c03f2a477a6c02e1d18eccb51dc2f6b5fec1bc434fd4596b7cc23f1d55f3ee7022dcef84a28e5e933a5b3415bc5d368a1bc59e6224ca3
|
|
7
|
+
data.tar.gz: edec78e8ea5755243548ad2d373a1d126407119f15e3e64ebfb411f8cc651f39b45edca4281039572b2dbcfefffcbaab663225b0ba3b9709a6fe51629d011ac4
|
|
@@ -658,15 +658,10 @@ PT_YAML
|
|
|
658
658
|
say "- Creating application title via locales..."
|
|
659
659
|
create_file "config/locales/inline_forms_local.en.yml", <<-END_LOCALE.strip_heredoc
|
|
660
660
|
en:
|
|
661
|
-
#
|
|
662
|
-
#
|
|
661
|
+
# The application's name in the gem's titles, Devise pages included
|
|
662
|
+
# (InlineForms.application_title; in a locale without this key the
|
|
663
|
+
# ApplicationHelper#application_name below, which says the same).
|
|
663
664
|
application_name: #{app_name}
|
|
664
|
-
inline_forms:
|
|
665
|
-
general:
|
|
666
|
-
application_title: #{app_name}
|
|
667
|
-
devise:
|
|
668
|
-
title_for_devise: #{app_name}
|
|
669
|
-
welcome: Welcome to #{app_name}!
|
|
670
665
|
END_LOCALE
|
|
671
666
|
|
|
672
667
|
say "- Migrating Database (only when using sqlite)"
|
data/lib/installer_templates/example_app_tests/test/integration/example_app_layout_title_test.rb
CHANGED
|
@@ -20,6 +20,26 @@ class ExampleAppLayoutTitleTest < ExampleAppIntegrationTestCase
|
|
|
20
20
|
assert_equal ApplicationController.helpers.application_name, I18n.t(:application_name, locale: :en)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
# The gem's title keys are lambdas (lib/locales/inline_forms_titles.rb);
|
|
24
|
+
# a host's own translation of one must load after them to win.
|
|
25
|
+
test "the host's locale files load after the gem's title keys" do
|
|
26
|
+
paths = I18n.load_path.map(&:to_s)
|
|
27
|
+
gem_titles = paths.index { |path| path.end_with?("lib/locales/inline_forms_titles.rb") }
|
|
28
|
+
host = paths.index { |path| path.end_with?("config/locales/inline_forms_local.en.yml") }
|
|
29
|
+
|
|
30
|
+
assert gem_titles, "the gem's title keys are on the load path"
|
|
31
|
+
assert host, "the installer's locale file is on the load path"
|
|
32
|
+
assert_operator gem_titles, :<, host
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
test "the title keys say the app name in en and nl" do
|
|
36
|
+
name = ApplicationController.helpers.application_name
|
|
37
|
+
%i[en nl].each do |locale|
|
|
38
|
+
assert_equal name, I18n.t("inline_forms.general.application_title", locale: locale)
|
|
39
|
+
assert_equal name, I18n.t("inline_forms.devise.title_for_devise", locale: locale)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
23
43
|
test "apartments page title is the app name and version" do
|
|
24
44
|
get apartments_path
|
|
25
45
|
|
data/lib/installer_templates/example_app_tests/test/integration/example_app_stylesheet_test.rb
CHANGED
|
@@ -18,7 +18,7 @@ class ExampleAppStylesheetTest < ActiveSupport::TestCase
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
test "uninitialised top-bar submenus are hidden" do
|
|
21
|
-
assert_includes built("inline_forms"), ".dropdown.menu>li>ul.menu:not(.is-dropdown-submenu){display:none}"
|
|
21
|
+
assert_includes built("inline_forms"), ".dropdown.menu[data-dropdown-menu]>li>ul.menu:not(.is-dropdown-submenu){display:none}"
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
private
|