meta-tags 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +9 -5
- data/CHANGELOG.md +5 -0
- data/README.md +10 -0
- data/lib/meta_tags/meta_tags_collection.rb +18 -8
- data/lib/meta_tags/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b90c0d13b837e1d5736014dd1907c589db8515da
|
4
|
+
data.tar.gz: 09064672e14acc5a9cbec0aae1fbc31e5e43d9a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49fbc418b77ab01cc64d5ad7bd63aae28fda4fba04cae0c45cb0dfc131bc80c05497abd1779ddc64fbb11b83e8449c82a136ab49230c90c99e6ea6d505366a6
|
7
|
+
data.tar.gz: 5520dff10b082e2c5c908a30f61507d096022e4c614e731e2af69b4d2ee536ceae0e14182969d4aaa01e7f007d6123cd97110ea14079fb6dbfa07979c306766a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
@@ -9,18 +9,22 @@ env:
|
|
9
9
|
matrix:
|
10
10
|
- RAILS_VERSION=4.2.10
|
11
11
|
- RAILS_VERSION=5.0.6
|
12
|
-
- RAILS_VERSION=5.1.
|
12
|
+
- RAILS_VERSION=5.1.5
|
13
13
|
|
14
14
|
rvm:
|
15
|
-
- 2.2.
|
16
|
-
- 2.3.
|
17
|
-
- 2.4.
|
18
|
-
- 2.5.
|
15
|
+
- 2.2.10
|
16
|
+
- 2.3.7
|
17
|
+
- 2.4.4
|
18
|
+
- 2.5.1
|
19
19
|
|
20
20
|
notifications:
|
21
21
|
recipients:
|
22
22
|
- kpumuk@kpumuk.info
|
23
23
|
|
24
|
+
before_install:
|
25
|
+
- gem update --system
|
26
|
+
- gem install bundler -v 1.16.1
|
27
|
+
|
24
28
|
before_script:
|
25
29
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
26
30
|
- chmod +x ./cc-test-reporter
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 2.9.0 (March 29, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.8.0...v2.9.0)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
- Added ability to add `index` robots meta tag (thanks to @rafallo)
|
5
|
+
|
1
6
|
## 2.8.0 (February 28, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.7.1...v2.8.0)
|
2
7
|
|
3
8
|
Features:
|
data/README.md
CHANGED
@@ -147,6 +147,7 @@ Use these options to customize the title format:
|
|
147
147
|
* `:lowercase` — when true, the page name will be lowercase;
|
148
148
|
* `:reverse` — when true, the page and site names will be reversed;
|
149
149
|
* `:noindex` — add noindex meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
150
|
+
* `:index` — add index meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
150
151
|
* `:nofollow` — add nofollow meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
151
152
|
* `:follow` – add follow meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
152
153
|
* `:noarchive` – add noarchive meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
@@ -344,6 +345,15 @@ Further reading:
|
|
344
345
|
* [Blocking Google](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93708)
|
345
346
|
* [Using meta tags to block access to your site](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93710)
|
346
347
|
|
348
|
+
### Index
|
349
|
+
|
350
|
+
Although it is not required to add 'index' to 'robots' as it is default value for Google, some SEO specialists recommend to add it to website
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
set_meta_tags index: true
|
354
|
+
# <meta name="robots" content="index">
|
355
|
+
```
|
356
|
+
|
347
357
|
### Nofollow
|
348
358
|
|
349
359
|
Nofollow meta tag tells a search engine not to follow the links on a specific
|
@@ -138,18 +138,19 @@ module MetaTags
|
|
138
138
|
# @return [Hash<String,String>] noindex attributes.
|
139
139
|
#
|
140
140
|
def extract_noindex
|
141
|
-
noindex_name,
|
141
|
+
noindex_name, noindex_value = extract_noindex_attribute(:noindex)
|
142
|
+
index_name, index_value = extract_noindex_attribute(:index)
|
143
|
+
|
142
144
|
nofollow_name, nofollow_value = extract_noindex_attribute(:nofollow)
|
143
|
-
follow_name,
|
145
|
+
follow_name, follow_value = extract_noindex_attribute(:follow)
|
144
146
|
|
145
|
-
noindex_attributes = if noindex_name == follow_name && (
|
146
|
-
|
147
|
-
|
148
|
-
{ noindex_name => [noindex_value, nofollow_value].compact.join(', ') }
|
147
|
+
noindex_attributes = if noindex_name == follow_name && (noindex_value || follow_value)
|
148
|
+
# noindex has higher priority than index and follow has higher priority than nofollow
|
149
|
+
[[noindex_name, noindex_value || index_value], [follow_name, follow_value || nofollow_value]]
|
149
150
|
else
|
150
|
-
|
151
|
+
[[index_name, index_value], [follow_name, follow_value], [noindex_name, noindex_value], [nofollow_name, nofollow_value]]
|
151
152
|
end
|
152
|
-
append_noarchive_attribute noindex_attributes
|
153
|
+
append_noarchive_attribute group_attributes_by_key noindex_attributes
|
153
154
|
end
|
154
155
|
|
155
156
|
protected
|
@@ -205,5 +206,14 @@ module MetaTags
|
|
205
206
|
end
|
206
207
|
noindex
|
207
208
|
end
|
209
|
+
|
210
|
+
# Convert array of arrays to hashes and concatenate values
|
211
|
+
#
|
212
|
+
# @param [Array<Array>] attributes list of noindex keys and values
|
213
|
+
# @return [Hash<String, String>] hash of grouped noindex keys and values
|
214
|
+
#
|
215
|
+
def group_attributes_by_key(attributes)
|
216
|
+
Hash[attributes.group_by(&:first).map { |k, v| [k, v.map(&:last).compact.join(', ')] }]
|
217
|
+
end
|
208
218
|
end
|
209
219
|
end
|
data/lib/meta_tags/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Shteflyuk
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
QwaoNrsQi488Dsk54YiNQWVouzfjRqEa4uUxSyKmRfQp7MNILESAOCXM+wZIxanu
|
31
31
|
C9c9eUxgNTnHhsR3sK0QCIMwtUI=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-03-
|
33
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: actionpack
|
metadata.gz.sig
CHANGED
Binary file
|