meta-tags 2.7.0 → 2.7.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +1 -0
- data/.travis.yml +9 -7
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -9
- data/README.md +1 -0
- data/lib/meta_tags/configuration.rb +9 -20
- data/lib/meta_tags/text_normalizer.rb +4 -4
- data/lib/meta_tags/version.rb +1 -2
- data/meta-tags.gemspec +3 -4
- 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: 3cbf0214f6d3ba9770a84ac08dc4303f20e0d726
|
4
|
+
data.tar.gz: a1f5551f63cb4a585abad57c39f30e49fd1778f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c72b7d6871d77bb21794f44ca57e96a1af0749c81796e0a4559e6cba072b57101c9b2c7feafdfc9e519695327d0b153821ba506e7be5e4454c534883d3a32e92
|
7
|
+
data.tar.gz: 2dcb87e0d686cb34072731a02ec355f09eda6e9d207d7abfa65380844489289a7ddb932a660e587902c53d0d66304db2b7a233f544f8e0693d09c2c444b96133
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -5,15 +5,17 @@ env:
|
|
5
5
|
global:
|
6
6
|
- CC_TEST_REPORTER_ID=8792cbc0d1780830ddd3dd7eb1c25f09f386ba8f04449ad830039469406a6ab3
|
7
7
|
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
|
8
|
+
- ENABLE_CODE_COVERAGE=1
|
8
9
|
matrix:
|
9
|
-
- RAILS_VERSION=4.2.
|
10
|
-
- RAILS_VERSION=5.0.
|
11
|
-
- RAILS_VERSION=5.1.
|
10
|
+
- RAILS_VERSION=4.2.10
|
11
|
+
- RAILS_VERSION=5.0.6
|
12
|
+
- RAILS_VERSION=5.1.4
|
12
13
|
|
13
14
|
rvm:
|
14
|
-
- 2.2.
|
15
|
-
- 2.3.
|
16
|
-
- 2.4.
|
15
|
+
- 2.2.9
|
16
|
+
- 2.3.6
|
17
|
+
- 2.4.3
|
18
|
+
- 2.5.0
|
17
19
|
|
18
20
|
notifications:
|
19
21
|
recipients:
|
@@ -24,4 +26,4 @@ before_script:
|
|
24
26
|
- chmod +x ./cc-test-reporter
|
25
27
|
|
26
28
|
after_script:
|
27
|
-
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --coverage-input-type
|
29
|
+
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --coverage-input-type simplecov || true; fi
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 2.7.1 (February 1, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.7.0...v2.7.1)
|
2
|
+
|
3
|
+
Changes:
|
4
|
+
- Properly generate Open Graph meta tags for object types that fail to provide a proper scope (e.g. `restaurant:contact_info` metadata for `restaurant:restaurant` object type).
|
5
|
+
|
6
|
+
Bugfixes:
|
7
|
+
- Description truncated to empty string and removed from meta tags when limit is set to `0` (while documentation suggests we should remove limits in this case).
|
8
|
+
|
1
9
|
## 2.7.0 (November 22, 2017) [☰](https://github.com/kpumuk/meta-tags/compare/v2.6.0...v2.7.0)
|
2
10
|
|
3
11
|
Changes:
|
data/Gemfile
CHANGED
@@ -3,15 +3,7 @@ source 'http://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in meta-tags.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
7
|
-
gem 'actionpack', git: 'https://github.com/rails/rails.git'
|
8
|
-
elsif ENV['RAILS_VERSION']
|
9
|
-
gem 'actionpack', "~> #{ENV['RAILS_VERSION']}"
|
10
|
-
end
|
11
|
-
|
12
|
-
if RUBY_VERSION =~ /^2\.0\./
|
13
|
-
gem 'nokogiri', '~> 1.6.8.1'
|
14
|
-
end
|
6
|
+
gem 'actionpack', "~> #{ENV['RAILS_VERSION']}" if ENV['RAILS_VERSION']
|
15
7
|
|
16
8
|
group :test do
|
17
9
|
gem 'simplecov'
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
[](https://codeclimate.com/github/kpumuk/meta-tags)
|
6
6
|
[](https://codeclimate.com/github/kpumuk/meta-tags/coverage)
|
7
7
|
[](https://badge.fury.io/rb/meta-tags)
|
8
|
+
[](https://github.com/kpumuk/meta-tags/blob/master/CHANGELOG.md)
|
8
9
|
|
9
10
|
Search Engine Optimization (SEO) plugin for Ruby on Rails applications.
|
10
11
|
|
@@ -40,31 +40,20 @@ module MetaTags
|
|
40
40
|
'fb',
|
41
41
|
'og',
|
42
42
|
# Facebook OpenGraph Object Types https://developers.facebook.com/docs/reference/opengraph
|
43
|
+
# Note that these tags are used in a regex, so including e.g. 'restaurant' will affect
|
44
|
+
# 'restaurant:category', 'restaurant:price_rating', and anything else under that namespace.
|
43
45
|
'article',
|
44
46
|
'book',
|
45
|
-
'books
|
46
|
-
'
|
47
|
-
'
|
48
|
-
'
|
49
|
-
'
|
50
|
-
'game:achievement',
|
51
|
-
'music:album',
|
52
|
-
'music:playlist',
|
53
|
-
'music:radio_station',
|
54
|
-
'music:song',
|
47
|
+
'books',
|
48
|
+
'business',
|
49
|
+
'fitness',
|
50
|
+
'game',
|
51
|
+
'music',
|
55
52
|
'place',
|
56
53
|
'product',
|
57
|
-
'product:group',
|
58
|
-
'product:item',
|
59
54
|
'profile',
|
60
|
-
'restaurant
|
61
|
-
'
|
62
|
-
'restaurant:menu_section',
|
63
|
-
'restaurant:restaurant',
|
64
|
-
'video:episode',
|
65
|
-
'video:movie',
|
66
|
-
'video:other',
|
67
|
-
'video:tv_show',
|
55
|
+
'restaurant',
|
56
|
+
'video',
|
68
57
|
].freeze
|
69
58
|
end
|
70
59
|
|
@@ -114,7 +114,7 @@ module MetaTags
|
|
114
114
|
Array(strings).flatten.map(&method(:cleanup_string))
|
115
115
|
end
|
116
116
|
|
117
|
-
# Truncates a string to a specific limit.
|
117
|
+
# Truncates a string to a specific limit. Return string without truncation when limit 0 or nil
|
118
118
|
#
|
119
119
|
# @param [String] string input strings.
|
120
120
|
# @param [Integer,nil] limit characters number to truncate to.
|
@@ -122,8 +122,8 @@ module MetaTags
|
|
122
122
|
# @return [String] truncated string.
|
123
123
|
#
|
124
124
|
def truncate(string, limit = nil, natural_separator = ' ')
|
125
|
-
|
126
|
-
string
|
125
|
+
return string if limit.to_i == 0
|
126
|
+
helpers.truncate(string, length: limit, separator: natural_separator, omission: '', escape: false)
|
127
127
|
end
|
128
128
|
|
129
129
|
# Truncates a string to a specific limit.
|
@@ -165,7 +165,7 @@ module MetaTags
|
|
165
165
|
end
|
166
166
|
|
167
167
|
def truncate_title(site_title, title, separator)
|
168
|
-
if MetaTags.config.title_limit
|
168
|
+
if MetaTags.config.title_limit.to_i > 0
|
169
169
|
site_title_limited_length, title_limited_length = calculate_title_limits(site_title, title, separator)
|
170
170
|
|
171
171
|
title = title_limited_length > 0 ? truncate_array(title, title_limited_length, separator) : []
|
data/lib/meta_tags/version.rb
CHANGED
data/meta-tags.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'meta_tags/version'
|
@@ -9,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
9
8
|
spec.authors = ["Dmytro Shteflyuk"]
|
10
9
|
spec.email = ["kpumuk@kpumuk.info"]
|
11
10
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
11
|
+
spec.summary = "Collection of SEO helpers for Ruby on Rails."
|
12
|
+
spec.description = "Search Engine Optimization (SEO) plugin for Ruby on Rails applications."
|
14
13
|
spec.homepage = "http://github.com/kpumuk/meta-tags"
|
15
14
|
spec.license = "MIT"
|
16
15
|
spec.platform = Gem::Platform::RUBY
|
@@ -27,5 +26,5 @@ Gem::Specification.new do |spec|
|
|
27
26
|
spec.add_development_dependency "rspec-html-matchers", "~> 0.9.1"
|
28
27
|
|
29
28
|
spec.cert_chain = ["certs/kpumuk.pem"]
|
30
|
-
spec.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $PROGRAM_NAME
|
29
|
+
spec.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $PROGRAM_NAME.end_with?('gem')
|
31
30
|
end
|
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.7.
|
4
|
+
version: 2.7.1
|
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:
|
33
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: actionpack
|
metadata.gz.sig
CHANGED
Binary file
|