meta_tags-rails 1.1.0 → 1.1.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: 807097d6d5b1ccf24d1ab4ea890f6c4eb99f17d4
4
- data.tar.gz: 706635320906ea8377d49bb3025fca4d4a886d1c
3
+ metadata.gz: d79752b421de3cbd0287dacf55bb01888cabe78c
4
+ data.tar.gz: ac2ded5d6926d8c77c1d75c2c74eddae9cd5d712
5
5
  SHA512:
6
- metadata.gz: 86a9ae9bb75d89e9321321012e7564eddc0c0057322a768ced90a70baa7a568be6c7672377cb9327f89f3cd1f71121ae7252b86f12fd617250f58baee684524f
7
- data.tar.gz: cf90284bae016aeb2121e508e04eb4142d370e363df6a888510f9bad70b061b2ed05aab880071ff9194da3645e7fe1f15e5ef920f346e1fc7e612d7a6096b4b3
6
+ metadata.gz: 0e14b962b4d8da9413701e3af0536b51e85983255af70f81512b8373dcc6bd08f71f06a7f0f182564ff7878e49d778b5962de3d652535fc3957597d8c0796169
7
+ data.tar.gz: 61bf02aa314c06f0bfd080d4def8efe9dd5b0ee4e219156605e6983f9211a2a2e6667db91363f923bd7fffcce164470dbce3595a2021964acb985ba9cd899ca1
data/.travis.yml CHANGED
@@ -15,11 +15,11 @@ env:
15
15
  - "RAILS_VERSION=5.0.0"
16
16
 
17
17
  matrix:
18
- allow_failures:
18
+ exclude:
19
19
  - env: "RAILS_VERSION=5.0.0"
20
- rvm:
21
- - 2.0.0
22
- - 2.1.7
20
+ rvm: 2.0.0
21
+ - env: "RAILS_VERSION=5.0.0"
22
+ rvm: 2.1.7
23
23
 
24
24
  notifications:
25
25
  recipients:
data/README.md CHANGED
@@ -161,19 +161,6 @@ Further reading:
161
161
  * [Favicon](https://www.wikiwand.com/en/Favicon)
162
162
  * [Touch Icons](https://mathiasbynens.be/notes/touch-icons)
163
163
 
164
- ### Author links
165
-
166
- Link to your Google+ profile using rel="author"
167
-
168
- ```ruby
169
- set_meta_tags author: "http://yourgplusprofile.com/profile/url"
170
- # => <link rel="author" href="http://yourgplusprofile.com/profile/url" />
171
- ```
172
-
173
- Further reading:
174
-
175
- * [About rel="author"](https://support.google.com/webmasters/answer/2539557?hl=en)
176
-
177
164
  ### Publisher links
178
165
 
179
166
  Link to your Google+ profile using rel="publisher"
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "meta_tags-rails"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -32,6 +32,8 @@ module MetaTags
32
32
  render_hash(tags, :og, name_key: :property)
33
33
  render_hash(tags, :fb, name_key: :property)
34
34
  render_hash(tags, :al, name_key: :property)
35
+ render_hash(tags, :article, name_key: :property)
36
+
35
37
  render_hashes(tags)
36
38
  render_custom(tags)
37
39
 
@@ -1,4 +1,4 @@
1
1
  module MetaTags
2
2
  # Gem version.
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
data/spec/spec_helper.rb CHANGED
@@ -8,11 +8,6 @@ require 'rspec-html-matchers'
8
8
 
9
9
  RSpec.configure do |config|
10
10
  if config.files_to_run.one?
11
- # RSpec filters the backtrace by default so as not to be so noisy.
12
- # This causes the full backtrace to be printed when running a single
13
- # spec file (e.g. to troubleshoot a particular spec failure).
14
- config.full_backtrace = true
15
-
16
11
  # Use the documentation formatter for detailed output,
17
12
  # unless a formatter has already been configured
18
13
  # (e.g. via a command-line flag).
@@ -0,0 +1,34 @@
1
+ require "spec_helper"
2
+
3
+ describe MetaTags::ViewHelper, "displaying Article meta tags" do
4
+ subject { ActionView::Base.new }
5
+
6
+ it "should display meta tags specified with :article" do
7
+ subject.set_meta_tags(article: {
8
+ author: "https://www.facebook.com/facebook"
9
+ })
10
+ subject.display_meta_tags(site: "someSite").tap do |meta|
11
+ expect(meta).to have_tag("meta", with: { content: "https://www.facebook.com/facebook", property: "article:author" })
12
+ end
13
+ end
14
+
15
+ it "should use deep merge when displaying open graph meta tags" do
16
+ subject.set_meta_tags(article: { author: "https://www.facebook.com/facebook" })
17
+ subject.display_meta_tags(article: { publisher: "https://www.facebook.com/Google/" }).tap do |meta|
18
+ expect(meta).to have_tag("meta", with: { content: "https://www.facebook.com/facebook", property: "article:author" })
19
+ expect(meta).to have_tag("meta", with: { content: "https://www.facebook.com/Google/", property: "article:publisher" })
20
+ end
21
+ end
22
+
23
+ it "should not display meta tags without content" do
24
+ subject.set_meta_tags(article: {
25
+ author: "",
26
+ publisher: ""
27
+ })
28
+ subject.display_meta_tags(site: "someSite").tap do |meta|
29
+ expect(meta).to_not have_tag("meta", with: { content: "", property: "article:author" })
30
+ expect(meta).to_not have_tag("meta", with: { content: "", property: "article:publisher" })
31
+ end
32
+ end
33
+
34
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta_tags-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmytro Shteflyuk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-04 00:00:00.000000000 Z
12
+ date: 2016-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -98,7 +98,9 @@ dependencies:
98
98
  description: Search Engine Optimization (SEO) plugin for Ruby on Rails applications.
99
99
  email:
100
100
  - Elektron1c97@gmail.com
101
- executables: []
101
+ executables:
102
+ - console
103
+ - setup
102
104
  extensions: []
103
105
  extra_rdoc_files:
104
106
  - README.md
@@ -114,6 +116,8 @@ files:
114
116
  - MIT-LICENSE
115
117
  - README.md
116
118
  - Rakefile
119
+ - bin/console
120
+ - bin/setup
117
121
  - lib/meta_tags-rails.rb
118
122
  - lib/meta_tags-rails/configuration.rb
119
123
  - lib/meta_tags-rails/content_tag.rb
@@ -130,6 +134,7 @@ files:
130
134
  - spec/spec_helper.rb
131
135
  - spec/text_normalizer/normalize_title_spec.rb
132
136
  - spec/text_normalizer/truncate_array_spec.rb
137
+ - spec/view_helper/article_spec.rb
133
138
  - spec/view_helper/charset_spec.rb
134
139
  - spec/view_helper/custom_spec.rb
135
140
  - spec/view_helper/description_spec.rb