meta-tags 2.7.0 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64868c217c0bd18d347bce58037545188b8851d5
4
- data.tar.gz: 59dc18e5c1710abdaaa8d54dd6fddf1205683502
3
+ metadata.gz: 3cbf0214f6d3ba9770a84ac08dc4303f20e0d726
4
+ data.tar.gz: a1f5551f63cb4a585abad57c39f30e49fd1778f6
5
5
  SHA512:
6
- metadata.gz: c8a2e2c7c67e25ae2dd712be8d7b7fd55ef3bd9fc4bf1cd3518c4592f468198b785ca74473cf761cd7ac7e84397a42b8fdaa222769f09e3b4cc12b55cce69897
7
- data.tar.gz: 46bdf3b8d22288b62bfb8a072cdcd859c85f7ef865bcaeb18f21ba3d3ff9de15a18d21d628cfbdb5727aaa53b18c0f14bb2840a53760631b2b7adfa08cb1544d
6
+ metadata.gz: c72b7d6871d77bb21794f44ca57e96a1af0749c81796e0a4559e6cba072b57101c9b2c7feafdfc9e519695327d0b153821ba506e7be5e4454c534883d3a32e92
7
+ data.tar.gz: 2dcb87e0d686cb34072731a02ec355f09eda6e9d207d7abfa65380844489289a7ddb932a660e587902c53d0d66304db2b7a233f544f8e0693d09c2c444b96133
Binary file
data.tar.gz.sig CHANGED
Binary file
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ coverage
7
7
  doc
8
8
  pkg
9
9
  *.gem
10
+ .idea
@@ -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.9
10
- - RAILS_VERSION=5.0.5
11
- - RAILS_VERSION=5.1.3
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.7
15
- - 2.3.4
16
- - 2.4.1
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 clover || true; fi
29
+ - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --coverage-input-type simplecov || true; fi
@@ -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
- if ENV['RAILS_VERSION'] == 'edge'
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
  [![Code Climate](https://codeclimate.com/github/kpumuk/meta-tags/badges/gpa.svg)](https://codeclimate.com/github/kpumuk/meta-tags)
6
6
  [![Test Coverage](https://codeclimate.com/github/kpumuk/meta-tags/badges/coverage.svg)](https://codeclimate.com/github/kpumuk/meta-tags/coverage)
7
7
  [![Gem Downloads](https://img.shields.io/gem/dt/meta-tags.svg)](https://badge.fury.io/rb/meta-tags)
8
+ [![Changelog](https://img.shields.io/badge/Changelog-latest-blue.svg)](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:author',
46
- 'books:book',
47
- 'books:genre',
48
- 'business:business',
49
- 'fitness:course',
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:menu',
61
- 'restaurant:menu_item',
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
- string = helpers.truncate(string, length: limit, separator: natural_separator, omission: '', escape: false) if limit
126
- string.html_safe
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 && MetaTags.config.title_limit > 0
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) : []
@@ -1,5 +1,4 @@
1
1
  module MetaTags
2
2
  # Gem version.
3
-
4
- VERSION = '2.7.0'
3
+ VERSION = '2.7.1'.freeze
5
4
  end
@@ -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 = %q{Collection of SEO helpers for Ruby on Rails.}
13
- spec.description = %q{Search Engine Optimization (SEO) plugin for Ruby on Rails applications.}
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 =~ /gem\z/
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.0
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: 2017-11-22 00:00:00.000000000 Z
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