rails_meta_tags 0.2.9 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 25ce6e958e3bb55102d5934f72f982c76b10add7
4
+ data.tar.gz: 6f922e2d5994d157c9133ce5ed870c92b91a335a
5
+ SHA512:
6
+ metadata.gz: f0e32547217c2744f2b99bcbcd5f7f51796e05cada057d8ffd52c74588920215db8a898ce3e00e45cce963dc7ff43524970f7ea1d312ff5ee6a6da1fad6e0c13
7
+ data.tar.gz: f541a0a9a1af87a84e7b51b2e708c79bf5165b0c4922f6092c2487ce05d1d7034f5a33331e029115cfc2aabf499aae8f0c066f078be79bbef96d52fe903a5828
data/.gitignore ADDED
@@ -0,0 +1,52 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # bundler
12
+ .bundle
13
+
14
+ # jeweler generated
15
+ pkg
16
+
17
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18
+ #
19
+ # * Create a file at ~/.gitignore
20
+ # * Include files you want ignored
21
+ # * Run: git config --global core.excludesfile ~/.gitignore
22
+ #
23
+ # After doing this, these files will be ignored in all your git projects,
24
+ # saving you from having to 'pollute' every project you touch with them
25
+ #
26
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
27
+ #
28
+ # For MacOS:
29
+ #
30
+ #.DS_Store
31
+
32
+ # For TextMate
33
+ #*.tmproj
34
+ #tmtags
35
+
36
+ # For emacs:
37
+ #*~
38
+ #\#*
39
+ #.\#*
40
+
41
+ # For vim:
42
+ #*.swp
43
+
44
+ # For redcar:
45
+ #.redcar
46
+
47
+ # For rubinius:
48
+ #*.rbc
49
+
50
+ .rvmrc
51
+ .ruby-gemset
52
+ .ruby-version
data/Gemfile CHANGED
@@ -1,13 +1,4 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- gem "activesupport", "~> 3.2"
1
+ source 'https://rubygems.org'
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "rspec", "~> 2.13.0"
10
- gem "bundler", "~> 1.3.4"
11
- gem "jeweler", "~> 1.8.4"
12
- gem "simplecov", ">= 0"
13
- end
3
+ # Specify your gem's dependencies in rails_meta_tags.gemspec
4
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,22 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rails_meta_tags (0.3.1)
5
+ activesupport (~> 3.2)
6
+
1
7
  GEM
2
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
3
9
  specs:
4
10
  activesupport (3.2.13)
5
11
  i18n (= 0.6.1)
6
12
  multi_json (~> 1.0)
7
13
  diff-lcs (1.2.1)
8
- git (1.2.5)
9
14
  i18n (0.6.1)
10
- jeweler (1.8.4)
11
- bundler (~> 1.0)
12
- git (>= 1.2.5)
13
- rake
14
- rdoc
15
- json (1.7.7)
16
15
  multi_json (1.7.1)
17
16
  rake (10.0.3)
18
- rdoc (4.0.0)
19
- json (~> 1.4)
20
17
  rspec (2.13.0)
21
18
  rspec-core (~> 2.13.0)
22
19
  rspec-expectations (~> 2.13.0)
@@ -25,17 +22,15 @@ GEM
25
22
  rspec-expectations (2.13.0)
26
23
  diff-lcs (>= 1.1.3, < 2.0)
27
24
  rspec-mocks (2.13.0)
28
- simplecov (0.7.1)
29
- multi_json (~> 1.0)
30
- simplecov-html (~> 0.7.1)
31
- simplecov-html (0.7.1)
32
25
 
33
26
  PLATFORMS
34
27
  ruby
35
28
 
36
29
  DEPENDENCIES
37
- activesupport (~> 3.2)
38
- bundler (~> 1.3.4)
39
- jeweler (~> 1.8.4)
30
+ bundler (~> 1.11.2)
31
+ rails_meta_tags!
32
+ rake (~> 10.0)
40
33
  rspec (~> 2.13.0)
41
- simplecov
34
+
35
+ BUNDLED WITH
36
+ 1.11.2
data/LICENSE.txt CHANGED
@@ -1,20 +1,21 @@
1
- Copyright (c) 2011 Mateo Murphy
1
+ The MIT License (MIT)
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
3
+ Copyright (c) 2016 Mateo Murphy
10
4
 
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
13
11
 
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -25,6 +25,7 @@ Easy meta tag generation for rails apps
25
25
  * identifier - dc
26
26
  * language
27
27
  * content_type
28
+ * viewport
28
29
 
29
30
  Properties marked "og" and "dc" will be mapped to their open graph and dublin core properties, respectively
30
31
 
@@ -38,6 +39,7 @@ Properties marked "og" and "dc" will be mapped to their open graph and dublin co
38
39
  config.defaults.url :canonical_url
39
40
  config.defaults.image :mutek_logo_url
40
41
  config.defaults.description :default_description
42
+ config.defaults.viewport "width=device-width"
41
43
  end
42
44
 
43
45
  Strings will be used as is, symbols will be called as instance methods on the current controller
data/Rakefile CHANGED
@@ -1,49 +1,6 @@
1
- # encoding: utf-8
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
2
3
 
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "rails_meta_tags"
18
- gem.homepage = "http://github.com/mateomurphy/rails_meta_tags"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Metatag library for rails}
21
- gem.description = %Q{Easily manage your meta tags in rails projects}
22
- gem.email = "mateo.murphy@gmail.com"
23
- gem.authors = ["Mateo Murphy"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rspec/core'
29
- require 'rspec/core/rake_task'
30
- RSpec::Core::RakeTask.new(:spec) do |spec|
31
- spec.pattern = FileList['spec/**/*_spec.rb']
32
- end
33
-
34
- RSpec::Core::RakeTask.new(:rcov) do |spec|
35
- spec.pattern = 'spec/**/*_spec.rb'
36
- spec.rcov = true
37
- end
4
+ RSpec::Core::RakeTask.new(:spec)
38
5
 
39
6
  task :default => :spec
40
-
41
- require 'rdoc/task'
42
- RDoc::Task.new do |rdoc|
43
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
-
45
- rdoc.rdoc_dir = 'rdoc'
46
- rdoc.title = "rails_meta_tags #{version}"
47
- rdoc.rdoc_files.include('README*')
48
- rdoc.rdoc_files.include('lib/**/*.rb')
49
- end
@@ -4,27 +4,27 @@ module Rails
4
4
  module MetaTags
5
5
  class Builder
6
6
  delegate :request, :tag, :content_tag, :to => :@view_context
7
-
7
+
8
8
  attr_accessor :resource
9
-
9
+
10
10
  DC_TERMS = %w(creator subject created language identifier publisher)
11
- OG_PROPERTIES= %w(type image url audio description locale site_name video)
12
-
11
+ OG_PROPERTIES= %w(type image url audio description locale site_name video image:height image:width)
12
+
13
13
  def initialize(view_context)
14
14
  @view_context = view_context
15
15
  @data = MetaTags.defaults.to_hash
16
16
  end
17
-
17
+
18
18
  PROPERTIES.each do |t|
19
19
  class_eval "def #{t}=(val); self[:#{t}] = val; end"
20
- class_eval "def #{t}; self[:#{t}]; end"
20
+ class_eval "def #{t}; self[:#{t}]; end"
21
21
  end
22
-
22
+
23
23
  def [](tag)
24
24
  tag = tag.to_sym
25
-
25
+
26
26
  return resource.meta[tag] if resource && resource.meta[tag].present?
27
-
27
+
28
28
  if @data[tag].is_a?(Symbol)
29
29
  @view_context.send(@data[tag])
30
30
  elsif @data[tag].respond_to?(:call)
@@ -33,16 +33,16 @@ module Rails
33
33
  @data[tag]
34
34
  end
35
35
  end
36
-
36
+
37
37
  def []=(tag, value)
38
38
  @data[tag.to_sym] = value
39
- end
40
-
39
+ end
40
+
41
41
  def full_title
42
42
  if value_present?(:title)
43
- [self[:title], MetaTags.defaults[:site_name]].flatten.join(MetaTags.seperator).html_safe
43
+ [self[:title], self[:site_name]].flatten.join(MetaTags.seperator).html_safe
44
44
  else
45
- MetaTags.defaults[:site_name]
45
+ self[:site_name]
46
46
  end
47
47
  end
48
48
 
@@ -50,14 +50,14 @@ module Rails
50
50
  if value_present?(:title)
51
51
  self[:title]
52
52
  else
53
- MetaTags.defaults[:site_name]
53
+ self[:site_name]
54
54
  end
55
55
  end
56
56
 
57
57
  def value_present?(term)
58
58
  self[term].present?
59
59
  end
60
-
60
+
61
61
  def render_tags
62
62
  tags = []
63
63
  tags << tag(:meta, :'http-equiv' => "Content-Type", :content => content_type)
@@ -65,19 +65,22 @@ module Rails
65
65
  tags << content_tag(:title, full_title)
66
66
  tags << tag(:meta, :name => 'description', :content => description)
67
67
 
68
-
68
+
69
69
  tags << tag(:meta, :name => "dcterms.title", :content => title_or_site_name)
70
70
  DC_TERMS.each do |term|
71
71
  tags << tag(:meta, :name => "dcterms.#{term}", :content => self[term]) if value_present?(term)
72
72
  end
73
-
74
- tags << tag(:meta, :property => "og:title", :content => title_or_site_name)
73
+
74
+ tags << tag(:meta, :property => "og:title", :content => title_or_site_name)
75
75
  OG_PROPERTIES.each do |property|
76
- tags << tag(:meta, :property => "og:#{property}", :content => self[property]) if value_present?(property)
76
+ key = property.gsub(':', '_')
77
+ tags << tag(:meta, :property => "og:#{property}", :content => self[key]) if value_present?(key)
77
78
  end
78
-
79
+
80
+ tags << tag(:meta, :name => "viewport", :content => viewport)
81
+
79
82
  tags.join("\n").html_safe
80
83
  end
81
84
  end
82
85
  end
83
- end
86
+ end
@@ -4,26 +4,26 @@ module Rails
4
4
  module ModelSupport
5
5
  autoload :Data, 'rails/meta_tags/model_support/data'
6
6
  autoload :DataConfig, 'rails/meta_tags/model_support/data_config'
7
-
7
+
8
8
  extend ActiveSupport::Concern
9
9
 
10
10
  # defaults specific to model support
11
11
  DEFAULTS = { :title => :to_s, :created => lambda { |r| r.updated_at.strftime('%Y-%m-%d') } }.freeze
12
-
12
+
13
13
  module ClassMethods
14
14
  def meta(&block)
15
15
  raise "no block given" unless block
16
-
16
+
17
17
  if ancestor = meta_ancestor
18
18
  @data = DataConfig.new(ancestor.to_hash)
19
19
  else
20
20
  @data = DataConfig.new(DEFAULTS.dup)
21
21
  end
22
-
22
+
23
23
  @data.configure_via_block(block)
24
24
  @data
25
25
  end
26
-
26
+
27
27
  def meta_ancestor
28
28
  ancestors.each do |ancestor|
29
29
  next if ancestor == ModelSupport || ancestor == self
@@ -31,7 +31,7 @@ module Rails
31
31
  end
32
32
  nil
33
33
  end
34
-
34
+
35
35
  def meta_config
36
36
  @data || meta_ancestor
37
37
  end
@@ -0,0 +1,5 @@
1
+ module Rails
2
+ module MetaTags
3
+ VERSION = "0.3.1"
4
+ end
5
+ end
@@ -1,14 +1,18 @@
1
+ require "rails/meta_tags/version"
2
+
1
3
  module Rails
2
4
  module MetaTags
3
5
  autoload :ControllerMethods, 'rails/meta_tags/controller_methods'
4
6
  autoload :Builder, 'rails/meta_tags/builder'
5
- autoload :Config, 'rails/meta_tags/config'
7
+ autoload :Config, 'rails/meta_tags/config'
6
8
  autoload :ModelSupport, 'rails/meta_tags/model_support'
7
-
9
+
8
10
  PROPERTIES = [
9
11
  :title,
10
12
  :type,
11
13
  :image,
14
+ :image_width,
15
+ :image_height,
12
16
  :url,
13
17
  :description,
14
18
  :audio,
@@ -24,16 +28,17 @@ module Rails
24
28
  :created,
25
29
  :identifier,
26
30
  :language,
27
- :content_type
28
- ]
29
-
31
+ :content_type,
32
+ :viewport
33
+ ]
34
+
30
35
  mattr_accessor :seperator
31
36
  @@seperator = " | "
32
37
 
33
38
  def self.config
34
39
  yield self
35
40
  end
36
-
41
+
37
42
  def self.defaults
38
43
  @defaults ||= Config.new
39
44
  end
@@ -46,5 +51,6 @@ module Rails
46
51
  defaults.language { |c| I18n.locale.to_s }
47
52
  defaults.identifier { |c| c.request.url }
48
53
  defaults.url { |c| c.request.url }
54
+ defaults.viewport "width=device-width"
49
55
  end
50
56
  end
@@ -1,74 +1,26 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rails/meta_tags/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "rails_meta_tags"
8
- s.version = "0.2.9"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rails_meta_tags"
8
+ spec.version = Rails::MetaTags::VERSION
9
+ spec.authors = ["Mateo Murphy"]
10
+ spec.email = ["mateo.murphy@gmail.com"]
9
11
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Mateo Murphy"]
12
- s.date = "2013-03-19"
13
- s.description = "Easily manage your meta tags in rails projects"
14
- s.email = "mateo.murphy@gmail.com"
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rspec",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "README.md",
26
- "Rakefile",
27
- "VERSION",
28
- "lib/rails/meta_tags.rb",
29
- "lib/rails/meta_tags/builder.rb",
30
- "lib/rails/meta_tags/config.rb",
31
- "lib/rails/meta_tags/controller_methods.rb",
32
- "lib/rails/meta_tags/model_support.rb",
33
- "lib/rails/meta_tags/model_support/data.rb",
34
- "lib/rails/meta_tags/model_support/data_config.rb",
35
- "lib/rails_meta_tags.rb",
36
- "rails_meta_tags.gemspec",
37
- "spec/builder_spec.rb",
38
- "spec/metatags_spec.rb",
39
- "spec/model_support_spec.rb",
40
- "spec/spec_helper.rb",
41
- "spec/support/models.rb",
42
- "spec/support/request.rb"
43
- ]
44
- s.homepage = "http://github.com/mateomurphy/rails_meta_tags"
45
- s.licenses = ["MIT"]
46
- s.require_paths = ["lib"]
47
- s.rubygems_version = "1.8.25"
48
- s.summary = "Metatag library for rails"
12
+ spec.summary = "Metatag library for rails"
13
+ spec.description = "Easily manage your meta tags in rails projects"
14
+ spec.homepage = "https://github.com/mateomurphy/rails_meta_tags"
15
+ spec.license = "MIT"
49
16
 
50
- if s.respond_to? :specification_version then
51
- s.specification_version = 3
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
52
21
 
53
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
- s.add_runtime_dependency(%q<activesupport>, ["~> 3.2"])
55
- s.add_development_dependency(%q<rspec>, ["~> 2.13.0"])
56
- s.add_development_dependency(%q<bundler>, ["~> 1.3.4"])
57
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
58
- s.add_development_dependency(%q<simplecov>, [">= 0"])
59
- else
60
- s.add_dependency(%q<activesupport>, ["~> 3.2"])
61
- s.add_dependency(%q<rspec>, ["~> 2.13.0"])
62
- s.add_dependency(%q<bundler>, ["~> 1.3.4"])
63
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
64
- s.add_dependency(%q<simplecov>, [">= 0"])
65
- end
66
- else
67
- s.add_dependency(%q<activesupport>, ["~> 3.2"])
68
- s.add_dependency(%q<rspec>, ["~> 2.13.0"])
69
- s.add_dependency(%q<bundler>, ["~> 1.3.4"])
70
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
71
- s.add_dependency(%q<simplecov>, [">= 0"])
72
- end
22
+ spec.add_runtime_dependency "activesupport", "~> 3.2"
23
+ spec.add_development_dependency "bundler", "~> 1.11.2"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rspec", "~> 2.13.0"
73
26
  end
74
-
metadata CHANGED
@@ -1,112 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_meta_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mateo Murphy
9
8
  autorequire:
10
- bindir: bin
9
+ bindir: exe
11
10
  cert_chain: []
12
- date: 2013-03-19 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.2'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.2'
30
- - !ruby/object:Gem::Dependency
31
- name: rspec
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 2.13.0
38
- type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 2.13.0
46
27
  - !ruby/object:Gem::Dependency
47
28
  name: bundler
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ~>
31
+ - - "~>"
52
32
  - !ruby/object:Gem::Version
53
- version: 1.3.4
33
+ version: 1.11.2
54
34
  type: :development
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ~>
38
+ - - "~>"
60
39
  - !ruby/object:Gem::Version
61
- version: 1.3.4
40
+ version: 1.11.2
62
41
  - !ruby/object:Gem::Dependency
63
- name: jeweler
42
+ name: rake
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ~>
45
+ - - "~>"
68
46
  - !ruby/object:Gem::Version
69
- version: 1.8.4
47
+ version: '10.0'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ~>
52
+ - - "~>"
76
53
  - !ruby/object:Gem::Version
77
- version: 1.8.4
54
+ version: '10.0'
78
55
  - !ruby/object:Gem::Dependency
79
- name: simplecov
56
+ name: rspec
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ! '>='
59
+ - - "~>"
84
60
  - !ruby/object:Gem::Version
85
- version: '0'
61
+ version: 2.13.0
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ! '>='
66
+ - - "~>"
92
67
  - !ruby/object:Gem::Version
93
- version: '0'
68
+ version: 2.13.0
94
69
  description: Easily manage your meta tags in rails projects
95
- email: mateo.murphy@gmail.com
70
+ email:
71
+ - mateo.murphy@gmail.com
96
72
  executables: []
97
73
  extensions: []
98
- extra_rdoc_files:
99
- - LICENSE.txt
100
- - README.md
74
+ extra_rdoc_files: []
101
75
  files:
102
- - .document
103
- - .rspec
76
+ - ".document"
77
+ - ".gitignore"
78
+ - ".rspec"
104
79
  - Gemfile
105
80
  - Gemfile.lock
106
81
  - LICENSE.txt
107
82
  - README.md
108
83
  - Rakefile
109
- - VERSION
110
84
  - lib/rails/meta_tags.rb
111
85
  - lib/rails/meta_tags/builder.rb
112
86
  - lib/rails/meta_tags/config.rb
@@ -114,40 +88,31 @@ files:
114
88
  - lib/rails/meta_tags/model_support.rb
115
89
  - lib/rails/meta_tags/model_support/data.rb
116
90
  - lib/rails/meta_tags/model_support/data_config.rb
91
+ - lib/rails/meta_tags/version.rb
117
92
  - lib/rails_meta_tags.rb
118
93
  - rails_meta_tags.gemspec
119
- - spec/builder_spec.rb
120
- - spec/metatags_spec.rb
121
- - spec/model_support_spec.rb
122
- - spec/spec_helper.rb
123
- - spec/support/models.rb
124
- - spec/support/request.rb
125
- homepage: http://github.com/mateomurphy/rails_meta_tags
94
+ homepage: https://github.com/mateomurphy/rails_meta_tags
126
95
  licenses:
127
96
  - MIT
97
+ metadata: {}
128
98
  post_install_message:
129
99
  rdoc_options: []
130
100
  require_paths:
131
101
  - lib
132
102
  required_ruby_version: !ruby/object:Gem::Requirement
133
- none: false
134
103
  requirements:
135
- - - ! '>='
104
+ - - ">="
136
105
  - !ruby/object:Gem::Version
137
106
  version: '0'
138
- segments:
139
- - 0
140
- hash: 1189833049492688519
141
107
  required_rubygems_version: !ruby/object:Gem::Requirement
142
- none: false
143
108
  requirements:
144
- - - ! '>='
109
+ - - ">="
145
110
  - !ruby/object:Gem::Version
146
111
  version: '0'
147
112
  requirements: []
148
113
  rubyforge_project:
149
- rubygems_version: 1.8.25
114
+ rubygems_version: 2.4.6
150
115
  signing_key:
151
- specification_version: 3
116
+ specification_version: 4
152
117
  summary: Metatag library for rails
153
118
  test_files: []
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.9
data/spec/builder_spec.rb DELETED
@@ -1,25 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- module Rails::MetaTags
4
- describe Builder do
5
- describe '#render_tags' do
6
- subject { Builder.new(MockViewContext.new) }
7
- specify { subject.render_tags.should_not be_nil }
8
- end
9
-
10
- describe 'using a resource' do
11
- subject {
12
- b = Builder.new(MockViewContext.new)
13
- b.resource = TestObject.new
14
- b
15
- }
16
- it 'returns the title of the resource' do
17
- subject.title.should == 'new article'
18
- end
19
-
20
- it 'returns the title of the resource' do
21
- subject.full_title.should == 'new article | SITE'
22
- end
23
- end
24
- end
25
- end
@@ -1,9 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- module Rails
4
- describe MetaTags do
5
- specify do
6
- MetaTags.defaults[:site_name].should == "SITE"
7
- end
8
- end
9
- end
@@ -1,49 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Rails::MetaTags
4
- describe TestObject do
5
- describe ".meta_config" do
6
- specify { TestObject.meta_config.should be_a(ModelSupport::DataConfig) }
7
- end
8
-
9
- describe '#meta' do
10
- subject { TestObject.new}
11
- specify { subject.meta.type.should == 'website' }
12
- specify { subject.meta.title.should == 'new article' }
13
- specify { subject.meta.description.should == 'new hotness' }
14
- specify { subject.meta.url.should be_nil }
15
- end
16
- end
17
-
18
- describe TestObjectChildNoMeta do
19
- describe ".meta_ancestor" do
20
- specify { TestObjectChildNoMeta.meta_ancestor.should be_a(ModelSupport::DataConfig) }
21
- end
22
-
23
- describe ".meta_config" do
24
- specify { TestObjectChildNoMeta.meta_config.should be_a(ModelSupport::DataConfig) }
25
- end
26
-
27
- describe '#meta' do
28
- subject { TestObjectChildNoMeta.new}
29
- specify { subject.meta.type.should == 'website' }
30
- specify { subject.meta.title.should == 'new article' }
31
- specify { subject.meta.description.should == 'new hotness' }
32
- specify { subject.meta.url.should be_nil }
33
- end
34
- end
35
-
36
- describe TestObjectChildOwnMeta do
37
- describe ".meta_config" do
38
- specify { TestObjectChildOwnMeta.meta_config.should be_a(ModelSupport::DataConfig) }
39
- end
40
-
41
- describe '#meta' do
42
- subject { TestObjectChildOwnMeta.new}
43
- specify { subject.meta.type.should == 'website' }
44
- specify { subject.meta.title.should == 'new sub article' }
45
- specify { subject.meta.description.should == 'new hotness' }
46
- specify { subject.meta.url.should == 'http://test.com' }
47
- end
48
- end
49
- end
data/spec/spec_helper.rb DELETED
@@ -1,14 +0,0 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rspec'
4
- require 'rails_meta_tags'
5
-
6
- require 'active_support/core_ext/string'
7
-
8
- # Requires supporting files with custom matchers and macros, etc,
9
- # in ./support/ and its subdirectories.
10
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
11
-
12
- RSpec.configure do |config|
13
-
14
- end
@@ -1,36 +0,0 @@
1
- module Rails::MetaTags
2
- class TestObject
3
- include ModelSupport
4
-
5
- meta do
6
- type 'website'
7
- title :title
8
- description do |o|
9
- o.subtitle
10
- end
11
- end
12
-
13
- def title
14
- 'new article'
15
- end
16
-
17
- def subtitle
18
- 'new hotness'
19
- end
20
-
21
- end
22
-
23
- class TestObjectChildNoMeta < TestObject
24
-
25
- end
26
-
27
- class TestObjectChildOwnMeta < TestObject
28
- meta do
29
- url 'http://test.com'
30
- end
31
-
32
- def title
33
- 'new sub article'
34
- end
35
- end
36
- end
@@ -1,31 +0,0 @@
1
- module Rails::MetaTags
2
- class MockRequest
3
- def url
4
- "url"
5
- end
6
- end
7
-
8
- class MockViewContext
9
- def request
10
- MockRequest.new
11
- end
12
-
13
- def tag(*args)
14
- args.inspect
15
- end
16
-
17
- def content_tag(*args)
18
- args.inspect
19
- end
20
-
21
- end
22
-
23
- class MockController
24
- def self.helper_method(*args)
25
-
26
- end
27
-
28
- include ControllerMethods
29
-
30
- end
31
- end