meta-tags 2.2.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,23 +6,3 @@ RSpec::Core::RakeTask.new(:spec)
6
6
 
7
7
  task test: :spec
8
8
  task default: :spec
9
-
10
- desc 'Starts irb with MetaTags gem loaded'
11
- task :console do
12
- require 'irb'
13
-
14
- $:.unshift File.expand_path('../lib', __FILE__)
15
- require 'meta_tags'
16
- ARGV.clear
17
- IRB.start
18
- end
19
-
20
- require 'yard'
21
- YARD::Rake::YardocTask.new(:yard) do |t|
22
- t.options = ['--title', 'MetaTags Documentation']
23
- if ENV['PRIVATE']
24
- t.options.concat ['--protected', '--private']
25
- else
26
- t.options.concat ['--protected', '--no-private']
27
- end
28
- end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "meta_tags"
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
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -32,6 +32,7 @@ module MetaTags
32
32
  render_hash(tags, :og, name_key: :property)
33
33
  render_hash(tags, :al, name_key: :property)
34
34
  render_hash(tags, :fb, name_key: :property)
35
+ render_hash(tags, :article, name_key: :property)
35
36
  render_hashes(tags)
36
37
  render_custom(tags)
37
38
 
@@ -1,4 +1,4 @@
1
1
  module MetaTags
2
2
  # Gem version.
3
- VERSION = '2.2.0'
3
+ VERSION = '2.3.1'
4
4
  end
@@ -1,33 +1,31 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path('../lib', __FILE__)
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'meta_tags/version'
4
5
 
5
- Gem::Specification.new do |s|
6
- s.name = 'meta-tags'
7
- s.version = MetaTags::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.license = "MIT"
10
- s.authors = ['Dmytro Shteflyuk']
11
- s.email = ['kpumuk@kpumuk.info']
12
- s.homepage = 'http://github.com/kpumuk/meta-tags'
13
- s.summary = %q{Collection of SEO helpers for Ruby on Rails.}
14
- s.description = %q{Search Engine Optimization (SEO) plugin for Ruby on Rails applications.}
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "meta-tags"
8
+ spec.version = MetaTags::VERSION
9
+ spec.authors = ["Dmytro Shteflyuk"]
10
+ spec.email = ["kpumuk@kpumuk.info"]
15
11
 
16
- s.add_dependency 'actionpack', '>= 3.2.0'
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.}
14
+ spec.homepage = "http://github.com/kpumuk/meta-tags"
15
+ spec.license = "MIT"
16
+ spec.platform = Gem::Platform::RUBY
17
17
 
18
- s.add_development_dependency 'rake'
19
- s.add_development_dependency 'rspec', '~> 3.3.0'
20
- s.add_development_dependency 'rspec-html-matchers'
21
- s.add_development_dependency 'yard'
22
- s.add_development_dependency 'bluecloth'
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
23
22
 
24
- s.cert_chain = ['certs/kpumuk.pem']
25
- s.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $0 =~ /gem\z/
23
+ spec.add_dependency "actionpack", ">= 3.2.0", "<= 5.1.0"
26
24
 
27
- s.files = `git ls-files`.split("\n")
28
- s.test_files = `git ls-files -- {spec}/*`.split("\n")
29
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
30
- s.extra_rdoc_files = ['README.md', 'CHANGELOG.md']
31
- s.rdoc_options = ['--charset=UTF-8']
32
- s.require_paths = ['lib']
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rspec", "~> 3.5.0"
27
+ spec.add_development_dependency "rspec-html-matchers", "~> 0.8.0"
28
+
29
+ spec.cert_chain = ["certs/kpumuk.pem"]
30
+ spec.signing_key = File.expand_path("~/.ssh/gem-kpumuk.pem") if $0 =~ /gem\z/
33
31
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta-tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmytro Shteflyuk
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
@@ -30,7 +30,7 @@ cert_chain:
30
30
  He5T3dBG5WWdIclQcE+JgohBpQ78TcVs1pFNjFmW9pC/P7Rm2GlYqOPHBQG1/Qx9
31
31
  ySbbrGHRLVz8DCxQbhKw+mdT5bg=
32
32
  -----END CERTIFICATE-----
33
- date: 2016-08-24 00:00:00.000000000 Z
33
+ date: 2016-09-14 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: actionpack
@@ -39,6 +39,9 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: 3.2.0
42
+ - - "<="
43
+ - !ruby/object:Gem::Version
44
+ version: 5.1.0
42
45
  type: :runtime
43
46
  prerelease: false
44
47
  version_requirements: !ruby/object:Gem::Requirement
@@ -46,91 +49,63 @@ dependencies:
46
49
  - - ">="
47
50
  - !ruby/object:Gem::Version
48
51
  version: 3.2.0
52
+ - - "<="
53
+ - !ruby/object:Gem::Version
54
+ version: 5.1.0
49
55
  - !ruby/object:Gem::Dependency
50
56
  name: rake
51
57
  requirement: !ruby/object:Gem::Requirement
52
58
  requirements:
53
- - - ">="
59
+ - - "~>"
54
60
  - !ruby/object:Gem::Version
55
- version: '0'
61
+ version: '10.0'
56
62
  type: :development
57
63
  prerelease: false
58
64
  version_requirements: !ruby/object:Gem::Requirement
59
65
  requirements:
60
- - - ">="
66
+ - - "~>"
61
67
  - !ruby/object:Gem::Version
62
- version: '0'
68
+ version: '10.0'
63
69
  - !ruby/object:Gem::Dependency
64
70
  name: rspec
65
71
  requirement: !ruby/object:Gem::Requirement
66
72
  requirements:
67
73
  - - "~>"
68
74
  - !ruby/object:Gem::Version
69
- version: 3.3.0
75
+ version: 3.5.0
70
76
  type: :development
71
77
  prerelease: false
72
78
  version_requirements: !ruby/object:Gem::Requirement
73
79
  requirements:
74
80
  - - "~>"
75
81
  - !ruby/object:Gem::Version
76
- version: 3.3.0
82
+ version: 3.5.0
77
83
  - !ruby/object:Gem::Dependency
78
84
  name: rspec-html-matchers
79
85
  requirement: !ruby/object:Gem::Requirement
80
86
  requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- type: :development
85
- prerelease: false
86
- version_requirements: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- - !ruby/object:Gem::Dependency
92
- name: yard
93
- requirement: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- type: :development
99
- prerelease: false
100
- version_requirements: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- - !ruby/object:Gem::Dependency
106
- name: bluecloth
107
- requirement: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
87
+ - - "~>"
110
88
  - !ruby/object:Gem::Version
111
- version: '0'
89
+ version: 0.8.0
112
90
  type: :development
113
91
  prerelease: false
114
92
  version_requirements: !ruby/object:Gem::Requirement
115
93
  requirements:
116
- - - ">="
94
+ - - "~>"
117
95
  - !ruby/object:Gem::Version
118
- version: '0'
96
+ version: 0.8.0
119
97
  description: Search Engine Optimization (SEO) plugin for Ruby on Rails applications.
120
98
  email:
121
99
  - kpumuk@kpumuk.info
122
100
  executables: []
123
101
  extensions: []
124
- extra_rdoc_files:
125
- - README.md
126
- - CHANGELOG.md
102
+ extra_rdoc_files: []
127
103
  files:
128
104
  - ".codeclimate.yml"
129
105
  - ".gitignore"
130
106
  - ".hound.yml"
131
107
  - ".rspec"
132
108
  - ".rubocop.yml"
133
- - ".ruby-gemset"
134
109
  - ".ruby-version"
135
110
  - ".travis.yml"
136
111
  - CHANGELOG.md
@@ -138,6 +113,8 @@ files:
138
113
  - MIT-LICENSE
139
114
  - README.md
140
115
  - Rakefile
116
+ - bin/console
117
+ - bin/setup
141
118
  - certs/kpumuk.pem
142
119
  - lib/meta-tags.rb
143
120
  - lib/meta_tags.rb
@@ -151,32 +128,12 @@ files:
151
128
  - lib/meta_tags/version.rb
152
129
  - lib/meta_tags/view_helper.rb
153
130
  - meta-tags.gemspec
154
- - spec/configuration_spec.rb
155
- - spec/controller_helper_spec.rb
156
- - spec/spec_helper.rb
157
- - spec/text_normalizer/normalize_title_spec.rb
158
- - spec/text_normalizer/truncate_array_spec.rb
159
- - spec/view_helper/charset_spec.rb
160
- - spec/view_helper/custom_spec.rb
161
- - spec/view_helper/description_spec.rb
162
- - spec/view_helper/icon_spec.rb
163
- - spec/view_helper/keywords_spec.rb
164
- - spec/view_helper/links_spec.rb
165
- - spec/view_helper/module_spec.rb
166
- - spec/view_helper/noindex_spec.rb
167
- - spec/view_helper/open_graph_spec.rb
168
- - spec/view_helper/open_search_spec.rb
169
- - spec/view_helper/refresh_spec.rb
170
- - spec/view_helper/title_spec.rb
171
- - spec/view_helper/twitter_spec.rb
172
- - spec/view_helper_spec.rb
173
131
  homepage: http://github.com/kpumuk/meta-tags
174
132
  licenses:
175
133
  - MIT
176
134
  metadata: {}
177
135
  post_install_message:
178
- rdoc_options:
179
- - "--charset=UTF-8"
136
+ rdoc_options: []
180
137
  require_paths:
181
138
  - lib
182
139
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -191,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
148
  version: '0'
192
149
  requirements: []
193
150
  rubyforge_project:
194
- rubygems_version: 2.4.5.1
151
+ rubygems_version: 2.5.1
195
152
  signing_key:
196
153
  specification_version: 4
197
154
  summary: Collection of SEO helpers for Ruby on Rails.
metadata.gz.sig CHANGED
@@ -1,4 +1,2 @@
1
- ��y�j�7�ˎ��dLLc�Ԅ~��J����~*�vU�'���0B7�yZ�c{1IK^�'���sh���kEbl<���io�� 䤱���k1V*�ϡ|��?
2
- U7!���E�kV;�i��Q�#A���%�b�򦰗���J�y@X��}#�ȓV�(�歽��/��a
3
- ����+��O ɾ5›2..�Fn�,1vmvX���%�+6[���r�
4
- �4*���FgW�
1
+ z�� �]ߑ������Gz��Pz�>m:�2T�|j��#�N1�t��~���ߪ�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 +0,0 @@
1
- meta-tags
@@ -1,14 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe MetaTags::Configuration do
4
- it 'should be returned by MetaTags.config' do
5
- expect(MetaTags.config).to be_instance_of(MetaTags::Configuration)
6
- end
7
-
8
- it 'should be yielded by MetaTags.configure' do
9
- MetaTags.configure do |c|
10
- expect(c).to be_instance_of(MetaTags::Configuration)
11
- expect(c).to be(MetaTags.config)
12
- end
13
- end
14
- end
@@ -1,45 +0,0 @@
1
- require 'spec_helper'
2
-
3
- class MetaTagsController < ActionController::Base
4
- def index
5
- @page_title = 'title'
6
- @page_keywords = 'key1, key2, key3'
7
- @page_description = 'description'
8
-
9
- if Gem.loaded_specs["actionpack"].version > Gem::Version.new('4.2.0')
10
- render plain: '_rendered_'
11
- else
12
- render text: '_rendered_'
13
- end
14
- end
15
-
16
- public :set_meta_tags, :meta_tags
17
- end
18
-
19
- describe MetaTags::ControllerHelper do
20
- subject {
21
- MetaTagsController.new.tap do |c|
22
- c.response = ActionDispatch::TestResponse.new
23
- end
24
- }
25
-
26
- context 'module' do
27
- it 'should be mixed into ActionController::Base' do
28
- expect(ActionController::Base.included_modules).to include(MetaTags::ControllerHelper)
29
- end
30
-
31
- it 'should respond to "set_meta_tags" helper' do
32
- expect(subject).to respond_to(:set_meta_tags)
33
- end
34
- end
35
-
36
- describe '.render' do
37
- it 'should set meta tags from instance variables' do
38
- subject.index
39
- expect(subject.response.body).to eq('_rendered_')
40
- expect(subject.meta_tags.meta_tags).to eq('title' => 'title', 'keywords' => 'key1, key2, key3', 'description' => 'description')
41
- end
42
- end
43
-
44
- it_behaves_like '.set_meta_tags'
45
- end
@@ -1,84 +0,0 @@
1
- if ENV['CODECLIMATE_REPO_TOKEN'] && RUBY_VERSION > '1.8.7'
2
- require "codeclimate-test-reporter"
3
- CodeClimate::TestReporter.start
4
- end
5
-
6
- require 'meta_tags'
7
- require 'rspec-html-matchers'
8
-
9
- RSpec.configure do |config|
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
- # Use the documentation formatter for detailed output,
17
- # unless a formatter has already been configured
18
- # (e.g. via a command-line flag).
19
- config.formatter = 'doc' if config.formatters.none?
20
- end
21
-
22
- # Run specs in random order to surface order dependencies. If you find an
23
- # order dependency and want to debug it, you can fix the order by providing
24
- # the seed, which is printed after each run.
25
- # --seed 1234
26
- config.order = :random
27
-
28
- # Seed global randomization in this process using the `--seed` CLI option.
29
- # Setting this allows you to use `--seed` to deterministically reproduce
30
- # test failures related to randomization by passing the same `--seed` value
31
- # as the one that triggered the failure.
32
- Kernel.srand config.seed
33
-
34
- config.include RSpecHtmlMatchers
35
-
36
- # rspec-expectations config goes here. You can use an alternate
37
- # assertion/expectation library such as wrong or the stdlib/minitest
38
- # assertions if you prefer.
39
- config.expect_with :rspec do |expectations|
40
- # Enable only the newer, non-monkey-patching expect syntax.
41
- # For more details, see:
42
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
43
- expectations.syntax = :expect
44
- end
45
-
46
- # rspec-mocks config goes here. You can use an alternate test double
47
- # library (such as bogus or mocha) by changing the `mock_with` option here.
48
- config.mock_with :rspec do |mocks|
49
- # Enable only the newer, non-monkey-patching expect syntax.
50
- # For more details, see:
51
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
52
- mocks.syntax = :expect
53
-
54
- # Prevents you from mocking or stubbing a method that does not exist on
55
- # a real object. This is generally recommended.
56
- mocks.verify_partial_doubles = true
57
- end
58
- end
59
-
60
- shared_examples_for '.set_meta_tags' do
61
- it 'should update meta tags' do
62
- subject.set_meta_tags(title: 'hello')
63
- expect(subject.meta_tags[:title]).to eq('hello')
64
-
65
- subject.set_meta_tags(title: 'world')
66
- expect(subject.meta_tags[:title]).to eq('world')
67
- end
68
-
69
- it 'should use deep merge when updating meta tags' do
70
- subject.set_meta_tags(og: { title: 'hello' })
71
- expect(subject.meta_tags[:og]).to eq('title' => 'hello')
72
-
73
- subject.set_meta_tags(og: { description: 'world' })
74
- expect(subject.meta_tags[:og]).to eq('title' => 'hello', 'description' => 'world')
75
-
76
- subject.set_meta_tags(og: { admin: { id: 1 } } )
77
- expect(subject.meta_tags[:og]).to eq('title' => 'hello', 'description' => 'world', 'admin' => { 'id' => 1 })
78
- end
79
-
80
- it 'should normalize :open_graph to :og' do
81
- subject.set_meta_tags(open_graph: { title: 'hello' })
82
- expect(subject.meta_tags[:og]).to eq('title' => 'hello')
83
- end
84
- end