dub_thee 1.0.0 → 1.0.1

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
- SHA1:
3
- metadata.gz: 934690dd04c86383e636b7a32ae526de47acc1db
4
- data.tar.gz: a4070ef08d619e323763a4b0c5f81a582467657c
2
+ SHA256:
3
+ metadata.gz: 38b220e3c836d31613d101c1a14d554497e15d3060398adcbb4ffd1721542e0b
4
+ data.tar.gz: 9baa0a82adc48b0e49b587a1c8210c50c714dbaa9154e170d81db9a49dba11fe
5
5
  SHA512:
6
- metadata.gz: 61be7efc186a27a6cf2c3ee197f79bed02a3e9da671bc4a9973a3b3978c5e8d501337141e28baaaa4d23c5ba1672b07f8c5e3ebae285118f631b6b9573d1537f
7
- data.tar.gz: e002fc8c0e57d3bba551ef4a46072a4b0763ad2a41be578386b393f4a11a5ac65d6198a1cfdc26af569757227b385f00d87a6eb8702e7bb6299f0980609a0a16
6
+ metadata.gz: 557eb1498eefafa3f4c5ea2ad08eda41e7c91903d13d283d00f1349d0daa252050ded13fbf9a939f00ccf3fd6f2986c0c5ab0ec55e3547c90103b75652073c32
7
+ data.tar.gz: ce8b71ace9f27d55060ceabf44217218da319aabfa0e6dc351742ad9049bbcf7ea47b981e30f68a3aaed97c7c0a84cfd1285976aad71b0d13f5c8c50c6118c1b
data/README.md CHANGED
@@ -3,8 +3,9 @@
3
3
  Rails page titles via I18n. For example, given the following
4
4
  application layout:
5
5
 
6
- ```erb
6
+ ```html+erb
7
7
  <!-- app/views/layouts/application.html.erb -->
8
+
8
9
  <html>
9
10
  <head>
10
11
  <title><%= page_title %> | My Web Site</title>
@@ -16,7 +17,8 @@ application layout:
16
17
  And the following translations:
17
18
 
18
19
  ```yaml
19
- # config/locales/page_title.en.yml
20
+ ## config/locales/page_title.en.yml
21
+
20
22
  en:
21
23
  page_title:
22
24
  home:
@@ -41,7 +43,8 @@ is included to enable attribute interpolation. For example, given the
41
43
  following translations:
42
44
 
43
45
  ```yaml
44
- # config/locales/page_title.en.yml
46
+ ## config/locales/page_title.en.yml
47
+
45
48
  en:
46
49
  page_title:
47
50
  products:
@@ -63,7 +66,8 @@ of the controller, and `singular` is the `String#singularize`'d form of
63
66
  `plural`. For example, given the following translations:
64
67
 
65
68
  ```yaml
66
- # config/locales/page_title.en.yml
69
+ ## config/locales/page_title.en.yml
70
+
67
71
  en:
68
72
  page_title:
69
73
  index: "%{plural}"
@@ -85,7 +89,8 @@ return `@page_title`. Thus, individual views can implement more nuanced
85
89
  title logic. For example, given the following translations:
86
90
 
87
91
  ```yaml
88
- # config/locales/page_title.en.yml
92
+ ## config/locales/page_title.en.yml
93
+
89
94
  en:
90
95
  page_title:
91
96
  users:
@@ -94,9 +99,11 @@ en:
94
99
 
95
100
  And the following view:
96
101
 
97
- ```erb
102
+ ```html+erb
98
103
  <!-- app/views/users/show.html.erb -->
104
+
99
105
  <% @page_title = "Your Profile" if current_user == @user %>
106
+
100
107
  ...
101
108
  ```
102
109
 
data/Rakefile CHANGED
@@ -9,14 +9,13 @@ require 'yard'
9
9
  YARD::Rake::YardocTask.new(:doc) do |t|
10
10
  end
11
11
 
12
-
13
12
  require 'bundler/gem_tasks'
14
13
 
15
14
  require 'rake/testtask'
16
15
 
17
16
  Rake::TestTask.new(:test) do |t|
18
17
  t.libs << 'test'
19
- t.pattern = 'test/**/*_test.rb'
18
+ t.test_files = FileList['test/**/*_test.rb'].exclude('test/tmp/**/*')
20
19
  t.verbose = false
21
20
  end
22
21
 
@@ -2,7 +2,9 @@ module DubThee
2
2
  # @!visibility private
3
3
  class Railtie < ::Rails::Railtie
4
4
  initializer "dub_thee" do
5
- ActionView::Base.send(:include, DubThee::PageTitleHelper)
5
+ ActiveSupport.on_load :action_view do
6
+ include DubThee::PageTitleHelper
7
+ end
6
8
  end
7
9
  end
8
10
  end
@@ -1,3 +1,3 @@
1
1
  module DubThee
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dub_thee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Hefner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-09 00:00:00.000000000 Z
11
+ date: 2019-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.1'
27
27
  - !ruby/object:Gem::Dependency
@@ -100,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubyforge_project:
104
- rubygems_version: 2.5.2.1
103
+ rubygems_version: 3.0.1
105
104
  signing_key:
106
105
  specification_version: 4
107
106
  summary: Rails page titles via I18n