dub_thee 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +13 -6
- data/Rakefile +1 -2
- data/lib/dub_thee/railtie.rb +3 -1
- data/lib/dub_thee/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 38b220e3c836d31613d101c1a14d554497e15d3060398adcbb4ffd1721542e0b
|
4
|
+
data.tar.gz: 9baa0a82adc48b0e49b587a1c8210c50c714dbaa9154e170d81db9a49dba11fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
18
|
+
t.test_files = FileList['test/**/*_test.rb'].exclude('test/tmp/**/*')
|
20
19
|
t.verbose = false
|
21
20
|
end
|
22
21
|
|
data/lib/dub_thee/railtie.rb
CHANGED
data/lib/dub_thee/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
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
|