meta-tags 2.3.1 → 2.4.0

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: 2c0faa1dc2d5ab1ffe4f6f6e3a63e57f5f1fbe60
4
- data.tar.gz: d19eece643bc09cb81f5a316f513d7882c35913e
3
+ metadata.gz: e10c1cef57da31f1f17e97502e1ae12ae71f0586
4
+ data.tar.gz: dd9d0677e976064a46daca9af7c0e65b98f1be79
5
5
  SHA512:
6
- metadata.gz: 4af5c30565b86a315478893521a7014dd9f4efaf4fb6dc2b0b10272ccc10e5bb11d0029fbe9c7f79f4175dd8c2008e8a8fc6eb5b17e9c5f8eeab2f53ff0ee9f2
7
- data.tar.gz: 0de6ee391e6d72547d6ba08258c578ea09c6808927a1035bdf9fb76bf8b1ef3e2cb52b6ac34ec0ea146f734cedd35f5fc88da15dad73c9a5302d8d883a28b555
6
+ metadata.gz: 521cf206e6f20cea380044475fd91eb65f42cd886a9ced13492f41cdb8479b619b93d765c3e515a54e7a5e20f8d8cd1c60031aeba6b7ad673a0568b3b23cab12
7
+ data.tar.gz: ba48215860943a1b5932a6713b1c020f14c99125f35ecdfe45ac0bc6b4463e223715af2632f827b180a1faa77f8c16f7d7dc71e8c81e4ef2cdfed632de8ce324
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -28,3 +28,6 @@ notifications:
28
28
  addons:
29
29
  code_climate:
30
30
  repo_token: "8792cbc0d1780830ddd3dd7eb1c25f09f386ba8f04449ad830039469406a6ab3"
31
+
32
+ after_success:
33
+ - bundle exec codeclimate-test-reporter
@@ -1,3 +1,11 @@
1
+ ## 2.4.0 (December 8, 2016)
2
+
3
+ Features:
4
+ - Added amphtml links support
5
+
6
+ Bugfixes:
7
+ - Fixed `place` attribute meta tag generation
8
+
1
9
  ## 2.3.1 (September 13, 2016)
2
10
 
3
11
  Changes:
data/Gemfile CHANGED
@@ -8,5 +8,6 @@ if ENV['RAILS_VERSION']
8
8
  end
9
9
 
10
10
  group :test do
11
- gem 'codeclimate-test-reporter', require: false
11
+ gem 'simplecov'
12
+ gem 'codeclimate-test-reporter', '~> 1.0.0'
12
13
  end
data/README.md CHANGED
@@ -50,11 +50,11 @@ the this title bar to determine what the page is all about.
50
50
 
51
51
  ```ruby
52
52
  set_meta_tags title: 'Member Login'
53
- # <title>Some Page Title</title>
53
+ # <title>Member Login</title>
54
54
  set_meta_tags site: 'Site Title', title: 'Member Login'
55
- # <title>Site Title | Page Title</title>
55
+ # <title>Site Title | Member Login</title>
56
56
  set_meta_tags site: 'Site Title', title: 'Member Login', reverse: true
57
- # <title>Page Title | Site Title</title>
57
+ # <title>Member Login | Site Title</title>
58
58
  ```
59
59
 
60
60
  Recommended title tag length: up to <b>70 characters</b>, <b>10 words</b>.
@@ -252,13 +252,32 @@ Further reading:
252
252
 
253
253
  ### image_src links
254
254
 
255
- Basically, when you submit/share this to Facebook , this helps Facebook determine which image to put next to the link. If this is not present, Facebook tries to put in the first image it finds on the page, which may not be the best one to represent your site.
255
+ Basically, when you submit/share this to Facebook , this helps Facebook determine
256
+ which image to put next to the link. If this is not present, Facebook tries to
257
+ put in the first image it finds on the page, which may not be the best one to
258
+ represent your site.
256
259
 
257
260
  ```ruby
258
261
  set_meta_tags image_src: "http://yoursite.com/icons/icon_32.png"
259
262
  # <link rel="image_src" href="http://yoursite.com/icons/icon_32.png" />
260
263
  ```
261
264
 
265
+ ### amphtml links
266
+
267
+ AMP is a way to build web pages for static content that render fast. If you have
268
+ two versions of the page – non-AMP and AMP, you can link the AMP version from
269
+ normal one using `amphtml` tag:
270
+
271
+ ```ruby
272
+ set_meta_tags amphtml: url_for(format: :amp, only_path: false)
273
+ # <link rel="amphtml" href="https://www.example.com/document.amp">
274
+ ```
275
+
276
+ To link back to normal version, use `canonical`.
277
+
278
+ * [What Is AMP?](https://www.ampproject.org/learn/about-amp/)
279
+ * [Make Your Page Discoverable](https://www.ampproject.org/docs/guides/discovery)
280
+
262
281
  ### Refresh interval and redirect URL
263
282
 
264
283
  Meta refresh is a method of instructing a web browser to automatically
@@ -33,6 +33,7 @@ module MetaTags
33
33
  render_hash(tags, :al, name_key: :property)
34
34
  render_hash(tags, :fb, name_key: :property)
35
35
  render_hash(tags, :article, name_key: :property)
36
+ render_hash(tags, :place, name_key: :property)
36
37
  render_hashes(tags)
37
38
  render_custom(tags)
38
39
 
@@ -150,7 +151,7 @@ module MetaTags
150
151
  # @param [Array<Tag>] tags a buffer object to store tag in.
151
152
  #
152
153
  def render_links(tags)
153
- [ :canonical, :prev, :next, :author, :publisher, :image_src ].each do |tag_name|
154
+ [ :amphtml, :canonical, :prev, :next, :author, :publisher, :image_src ].each do |tag_name|
154
155
  href = meta_tags.extract(tag_name)
155
156
  if href.present?
156
157
  @normalized_meta_tags[tag_name] = href
@@ -1,4 +1,4 @@
1
1
  module MetaTags
2
2
  # Gem version.
3
- VERSION = '2.3.1'
3
+ VERSION = '2.4.0'
4
4
  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.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmytro Shteflyuk
@@ -30,7 +30,7 @@ cert_chain:
30
30
  He5T3dBG5WWdIclQcE+JgohBpQ78TcVs1pFNjFmW9pC/P7Rm2GlYqOPHBQG1/Qx9
31
31
  ySbbrGHRLVz8DCxQbhKw+mdT5bg=
32
32
  -----END CERTIFICATE-----
33
- date: 2016-09-14 00:00:00.000000000 Z
33
+ date: 2016-12-08 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: actionpack
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.5.1
151
+ rubygems_version: 2.6.7
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Collection of SEO helpers for Ruby on Rails.
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- �z�� �]ߑ������Gz��Pz�>m:�2T�|j��#�N1t��~���ߪ�Zr��^ 6f�܍�*�Y_=J~kkn)��eؔA_+�*�{�aEآd׬S|`�i����昘� ����#:�R7R��t���EL���[}cU��.��\�d�[~k�M[��M~����:"�u*T�_�~"�Sɴ3�c���M�>TJ��iCۻ
2
- G�����XE}�$��S���s/yP)�����0�� ��
1
+ m�>�m8V qB�njQ2�:?;�