titler 0.4.3 → 0.4.4

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
  SHA1:
3
- metadata.gz: 13a4789f584a25f99bc7f62278d51238c373fc82
4
- data.tar.gz: 6147df5590bb509ac1a1ec81c131a45c580e2305
3
+ metadata.gz: 51c3b8c39cea79ca4a980b8e94d9340b767c2eba
4
+ data.tar.gz: 120347193ab92790dbce2ef753961a0c71f20ced
5
5
  SHA512:
6
- metadata.gz: b1bcbb281628b14ba404ab580bb6be95e02565a2df2fb18b19d843da664d449e08152c580325036dbfbe600dd4eae5ca77d09235f3f4f031bdbbf2dfff8dbd2b
7
- data.tar.gz: 586bf7c2df9ec8d7ed60c3e094cf237c29b75521d48862a6ca3374ba73219a3cf47510094d3585f23cbc930f3b6facc71b0c7f321fb8d3b0330e6c990a3cc3a9
6
+ metadata.gz: b805ae7d3553b134a6965eb7671fab6c489c38d1c3b5d3f924ccc7181d6361a1869fdfd029dcdcf48a5246147647ac3b7524897cd1f1e4c9d69193c9a45936d7
7
+ data.tar.gz: d497dcba674cb65fb0ee88e4b432872ef0801f97c9e93120d0dca686dbab0cc93b6f40e137194c8f0709ff4aab50d16613c7d1d2b8c35fb11980403613bb67d2
@@ -60,7 +60,11 @@ module Titler
60
60
  end
61
61
 
62
62
  def app_name
63
- name = @i18n.exists?('titler.app_name') ? @i18n.t('titler.app_name') : Rails.application.class.to_s.split("::").first
63
+ if @i18n.exists?('titler.app_name') && @i18n.t('titler.app_name').present?
64
+ @i18n.t('titler.app_name')
65
+ else
66
+ Rails.application.class.to_s.split("::").first
67
+ end
64
68
  end
65
69
 
66
70
  def app_tagline
@@ -1,3 +1,3 @@
1
1
  module Titler
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
@@ -53,7 +53,16 @@ describe Titler::TitlerHelper do
53
53
  expect(titler_helper.titler).to eq(expected_title)
54
54
  end
55
55
 
56
- it '(3) adds tagline to defaults' do
56
+ it '(3) uses default app name if i18n.t is blank' do
57
+ controller = MockController.new
58
+ stub_rails(controller, 'production', nil)
59
+ load_translations({ app_name: '' })
60
+
61
+ expected_title = "#{env_prefix}#{controller.controller_name.titleize} #{controller.action_name.titleize} - #{app_name}"
62
+ expect(titler_helper.titler).to eq(expected_title)
63
+ end
64
+
65
+ it '(4) adds tagline to defaults' do
57
66
  controller = MockController.new
58
67
  stub_rails(controller, 'production', nil)
59
68
  load_translations({ app_tagline: 'All the News' })
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: titler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Travis Pierce
@@ -253,7 +253,6 @@ files:
253
253
  - spec/configure_spec.rb
254
254
  - spec/helpers/titler_helper_spec.rb
255
255
  - spec/spec_helper.rb
256
- - titler-0.0.1.gem
257
256
  - titler.gemspec
258
257
  homepage: https://github.com/roberttravispierce/titler
259
258
  licenses: