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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 189ba5e71c9aee58f109af59c1ee01054b3055f88991c1bbc1a9d2e56e710435
4
- data.tar.gz: e587e52585904ff80d026fced739045a7fc6b1258e3050b65bf5913c740a3508
3
+ metadata.gz: 92b94c504a30ef6f73464e503084798e2c31430c8e85e5b04cdca08a3ebaa97d
4
+ data.tar.gz: f62914f1aedd9454d33d98f0b77d85f59b90b9c9b6c78f6d788873857451236f
5
5
  SHA512:
6
- metadata.gz: 630596a0231449683d571153e2764c8678868a76646730d977d8efc322c450ec9d2765c5feafb94bd61c46d486ebe5f620720e2e83148c70aba831f13ce821e2
7
- data.tar.gz: c2329bc07c4804ac8e45ad70a8ac7951d969ef1a8f8dfd48bcf8787bea1d0815212d6c7b7057f7ce8847b7a1721d122d9288230baf1d00fa930b13da5c9e0246
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
- # <title> of every page in the inline_forms layout (falls back to
662
- # ApplicationHelper#application_name in locales that do not define it).
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)"
@@ -1,7 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module InlineFormsInstaller
4
- VERSION = "8.1.66"
4
+ VERSION = "8.1.67"
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/
@@ -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
 
@@ -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
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.66
4
+ version: 8.1.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares