tuning 0.1.3 → 0.2.2
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/MIT-LICENSE +1 -1
- data/README.rdoc +13 -4
- data/lib/tuning.rb +1 -0
- data/lib/tuning/action_controller/base.rb +1 -1
- data/lib/tuning/action_view/base.rb +4 -7
- data/lib/tuning/action_view/template.rb +29 -0
- data/lib/tuning/railtie.rb +1 -0
- data/lib/tuning/version.rb +1 -1
- data/test/dummy/app/views/layouts/application.html.erb +3 -3
- data/test/dummy/app/views/pages/_dummy.html.erb +0 -0
- data/test/dummy/app/views/pages/empty.html.erb +0 -0
- data/test/dummy/app/views/pages/index.html.erb +1 -1
- data/test/dummy/app/views/pages/other.html.erb +1 -1
- data/test/dummy/config/locales/en.yml +6 -8
- data/test/dummy/config/routes.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +1878 -0
- data/test/dummy/log/test.log +5896 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/seo_test.rb +21 -0
- metadata +38 -11
- data/test/set_meta_test.rb +0 -17
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/seo_test.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class SeoTest < ActionView::TestCase
|
4
|
+
|
5
|
+
test "should populate meta using the path of the template as key" do
|
6
|
+
render template: 'pages/index', layout: 'layouts/application'
|
7
|
+
assert_select 'title', I18n.t('pages.index.title')
|
8
|
+
assert_select "meta[content='#{I18n.t('pages.index.description')}']"
|
9
|
+
assert_select "meta[content='#{I18n.t('pages.index.keywords')}']"
|
10
|
+
|
11
|
+
render template: 'pages/other', layout: 'layouts/application'
|
12
|
+
assert_select 'title', I18n.t('pages.other.title', name: 'other')
|
13
|
+
assert_select "meta[content='#{I18n.t('pages.other.description', name: 'other')}']"
|
14
|
+
assert_select "meta[content='#{I18n.t('pages.other.keywords', name: 'other')}']"
|
15
|
+
|
16
|
+
render template: 'pages/empty', layout: 'layouts/application'
|
17
|
+
assert_select 'title', ''
|
18
|
+
assert_select "meta[content='']", 2
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tuning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Museways
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,28 +16,34 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.1.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.2.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
29
|
+
version: 3.1.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.2.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: sqlite3
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
39
|
+
version: '1.3'
|
34
40
|
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
|
-
- - "
|
44
|
+
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
46
|
+
version: '1.3'
|
41
47
|
description: Common used tools extracted into a gem.
|
42
48
|
email:
|
43
49
|
- hello@mattways.com
|
@@ -51,6 +57,7 @@ files:
|
|
51
57
|
- lib/tuning.rb
|
52
58
|
- lib/tuning/action_controller/base.rb
|
53
59
|
- lib/tuning/action_view/base.rb
|
60
|
+
- lib/tuning/action_view/template.rb
|
54
61
|
- lib/tuning/railtie.rb
|
55
62
|
- lib/tuning/version.rb
|
56
63
|
- test/active_trail_test.rb
|
@@ -64,6 +71,8 @@ files:
|
|
64
71
|
- test/dummy/app/controllers/status_controller.rb
|
65
72
|
- test/dummy/app/helpers/application_helper.rb
|
66
73
|
- test/dummy/app/views/layouts/application.html.erb
|
74
|
+
- test/dummy/app/views/pages/_dummy.html.erb
|
75
|
+
- test/dummy/app/views/pages/empty.html.erb
|
67
76
|
- test/dummy/app/views/pages/index.html.erb
|
68
77
|
- test/dummy/app/views/pages/other.html.erb
|
69
78
|
- test/dummy/bin/bundle
|
@@ -86,19 +95,27 @@ files:
|
|
86
95
|
- test/dummy/config/initializers/wrap_parameters.rb
|
87
96
|
- test/dummy/config/locales/en.yml
|
88
97
|
- test/dummy/config/routes.rb
|
98
|
+
- test/dummy/db/development.sqlite3
|
89
99
|
- test/dummy/db/schema.rb
|
100
|
+
- test/dummy/log/development.log
|
90
101
|
- test/dummy/log/test.log
|
91
102
|
- test/dummy/public/404.html
|
92
103
|
- test/dummy/public/422.html
|
93
104
|
- test/dummy/public/500.html
|
94
105
|
- test/dummy/public/favicon.ico
|
106
|
+
- test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
|
107
|
+
- test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
108
|
+
- test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
|
109
|
+
- test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
110
|
+
- test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
111
|
+
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
95
112
|
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
96
113
|
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
97
114
|
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
98
115
|
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
99
116
|
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
100
117
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
101
|
-
- test/
|
118
|
+
- test/seo_test.rb
|
102
119
|
- test/status_test.rb
|
103
120
|
- test/test_helper.rb
|
104
121
|
homepage: https://github.com/museways/tuning
|
@@ -113,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
130
|
requirements:
|
114
131
|
- - ">="
|
115
132
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
133
|
+
version: 1.9.3
|
117
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
135
|
requirements:
|
119
136
|
- - ">="
|
@@ -135,6 +152,8 @@ test_files:
|
|
135
152
|
- test/dummy/app/controllers/status_controller.rb
|
136
153
|
- test/dummy/app/helpers/application_helper.rb
|
137
154
|
- test/dummy/app/views/layouts/application.html.erb
|
155
|
+
- test/dummy/app/views/pages/_dummy.html.erb
|
156
|
+
- test/dummy/app/views/pages/empty.html.erb
|
138
157
|
- test/dummy/app/views/pages/index.html.erb
|
139
158
|
- test/dummy/app/views/pages/other.html.erb
|
140
159
|
- test/dummy/bin/bundle
|
@@ -157,7 +176,9 @@ test_files:
|
|
157
176
|
- test/dummy/config/locales/en.yml
|
158
177
|
- test/dummy/config/routes.rb
|
159
178
|
- test/dummy/config.ru
|
179
|
+
- test/dummy/db/development.sqlite3
|
160
180
|
- test/dummy/db/schema.rb
|
181
|
+
- test/dummy/log/development.log
|
161
182
|
- test/dummy/log/test.log
|
162
183
|
- test/dummy/public/404.html
|
163
184
|
- test/dummy/public/422.html
|
@@ -165,12 +186,18 @@ test_files:
|
|
165
186
|
- test/dummy/public/favicon.ico
|
166
187
|
- test/dummy/Rakefile
|
167
188
|
- test/dummy/README.rdoc
|
189
|
+
- test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
|
190
|
+
- test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
191
|
+
- test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
|
192
|
+
- test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
193
|
+
- test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
194
|
+
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
168
195
|
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
169
196
|
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
170
197
|
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
171
198
|
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
172
199
|
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
173
200
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
174
|
-
- test/
|
201
|
+
- test/seo_test.rb
|
175
202
|
- test/status_test.rb
|
176
203
|
- test/test_helper.rb
|
data/test/set_meta_test.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class SetMetaTest < ActionView::TestCase
|
4
|
-
|
5
|
-
test "should populate meta using the path of the template as key" do
|
6
|
-
render template: 'pages/index', layout: 'layouts/application'
|
7
|
-
assert_select 'title', I18n.t('pages.index.meta.title')
|
8
|
-
assert_select "meta[content='#{I18n.t('pages.index.meta.description')}']"
|
9
|
-
assert_select "meta[content='#{I18n.t('pages.index.meta.keywords')}']"
|
10
|
-
|
11
|
-
render template: 'pages/other', layout: 'layouts/application'
|
12
|
-
assert_select 'title', I18n.t('pages.other.meta.title', name: 'other')
|
13
|
-
assert_select "meta[content='#{I18n.t('pages.other.meta.description', name: 'other')}']"
|
14
|
-
assert_select "meta[content='#{I18n.t('pages.other.meta.keywords', name: 'other')}']"
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|