middleman-ogp 1.0.4 → 1.1.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: 1f7a5f4b243909d06f5f4f61011e561be8c440ad
4
- data.tar.gz: f8bb1f3431ea81b651eb58ed7fa58069520ca22a
3
+ metadata.gz: 06a47dbe1d43eadc2986af4ed48387c2549c313c
4
+ data.tar.gz: 9e43b8b331044d136958eb88a96f9c64f4eff3f2
5
5
  SHA512:
6
- metadata.gz: ffae72c9b95445b0660f70ab2160c22584e450ab05fb2fc1651210f7e8c25f87dfe1fee352c489947055da2e3d04e17c636e5f1b60fec94508972988da38f637
7
- data.tar.gz: dbeac35022a41b1dda2dd9f35ac396c85f358a95aa2dd00b163cdba268612e88a6c49c8a7cb2f6fa0b3d9b7a87c7029abfaf7456c8177a0a762dff6b867f51ce
6
+ metadata.gz: 5ab7e36a2608652c10d909c049b3a2015e35996475ad229c989599b36c1f408e08674e7e0eb9ba8aee7e6f77993bac82d5a77d6d924424de237a4246912ab915
7
+ data.tar.gz: 5728656b532f26049f2aa794098cc1af38e6df939a02d5f1b36c756067bac1026587dea1eab438c1ff66a430ecdf49d186ce575bd4a926b507e03a30b12215cd
data/.gitignore CHANGED
@@ -5,7 +5,7 @@ pkg
5
5
  .sass-cache
6
6
  .sassc
7
7
  .tmp
8
- Gemfile.lock
8
+ Gemfile*.lock
9
9
  docs
10
10
  .rbenv-*
11
11
  .*.swp
@@ -16,3 +16,4 @@ tmp
16
16
  Makefile
17
17
  .mm-pid-*
18
18
  *.gem
19
+ .ruby-version
@@ -1,14 +1,18 @@
1
1
  rvm:
2
- - 1.9.3
3
2
  - 2.0.0
4
3
  - 2.1.0
4
+ - 2.2.2
5
+ - 2.3.1
5
6
  - jruby-19mode
7
+ env:
8
+ - MM_VERSION=3 TEST=true
9
+ - MM_VERSION=4 TEST=true
6
10
 
7
11
  # Bug in jRuby w/ Rouge: https://github.com/jruby/jruby/issues/1392
8
12
  matrix:
9
13
  allow_failures:
10
14
  - rvm: jruby-19mode
11
15
 
12
- script: "bundle exec rake test"
16
+ before_install: "ln -s \"Gemfile.mm${MM_VERSION}\" Gemfile"
13
17
 
14
- env: TEST=true
18
+ script: "bundle exec rake test"
@@ -10,12 +10,14 @@ gem "rake", "~> 10.1.0", :require => false
10
10
  gem "yard", "~> 0.8.0", :require => false
11
11
 
12
12
  # Test tools
13
- gem "cucumber", "~> 1.3.1"
13
+ gem "cucumber", "~> 2.4.0"
14
14
  gem "fivemat"
15
- gem "aruba", "~> 0.5.1"
15
+ gem "aruba", "~> 0.14.0"
16
16
  gem "rspec"
17
17
 
18
18
  gem "slim"
19
19
 
20
20
  # Code Quality
21
21
  gem "cane", :platforms => [:mri_19, :mri_20], :require => false
22
+
23
+
@@ -0,0 +1,23 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "middleman-core", '~> 4.0'
4
+ gem "middleman-cli", '~> 4.0'
5
+ gem "middleman-blog", '~> 4.0'
6
+
7
+ # Specify your gem's dependencies in middleman-ogp.gemspec
8
+ gemspec
9
+
10
+ gem "rake", "~> 10.1.0", :require => false
11
+ gem "yard", "~> 0.8.0", :require => false
12
+
13
+ # Test tools
14
+ gem "cucumber", "~> 2.4.0"
15
+ gem "fivemat"
16
+ gem "aruba", "~> 0.14.0"
17
+ gem "rspec"
18
+ gem 'capybara', '~> 2.7', '>= 2.7.1'
19
+
20
+ gem "slim"
21
+
22
+ # Code Quality
23
+ gem "cane", :platforms => [:mri_19, :mri_20], :require => false
@@ -1,7 +1,7 @@
1
1
  html
2
2
  head
3
3
  meta charset="utf-8"
4
- title= data.page.title
4
+ title= current_page.data.title
5
5
  - ogp_tags do|name, value|
6
6
  meta property=name content=value
7
7
 
@@ -1,10 +1,10 @@
1
1
  html
2
2
  head
3
3
  meta charset="utf-8"
4
- title= data.page.title
4
+ title= current_page.data.title
5
5
  - ogp_tags do|name, value|
6
6
  meta property=name content=value
7
7
 
8
8
  body
9
9
  .container
10
- = yield
10
+ = yield
@@ -1,3 +1,7 @@
1
+ require 'padrino-helpers'
2
+ require 'active_support'
3
+ require 'middleman-core/extensions'
4
+
1
5
  module Middleman
2
6
  module OGP
3
7
  class OGPExtension < Extension
@@ -59,7 +63,7 @@ module Middleman
59
63
  end
60
64
 
61
65
  module Helper
62
- include Padrino::Helpers::TagHelpers
66
+ include ::Padrino::Helpers::TagHelpers
63
67
  mattr_accessor :namespaces
64
68
  mattr_accessor :blog
65
69
  mattr_accessor :auto
@@ -106,15 +110,24 @@ module Middleman
106
110
  og_tag(key, v, prefix, &block)
107
111
  }.join("\n")
108
112
  else
109
- block.call [prefix].concat(key).join(':'), obj.to_s
113
+ if obj.respond_to?(:value)
114
+ value = obj.value
115
+ if value.is_a?(Middleman::Util::EnhancedHash)
116
+ value.map{|k,v|
117
+ og_tag(k.to_s.empty? ? key.dup : (key.dup << k.to_s) , v, prefix, &block)
118
+ }.join("\n")
119
+ else
120
+ raise 'Unknown value'
121
+ end
122
+ else
123
+ block.call [prefix].concat(key).join(':'), obj.to_s
124
+ end
110
125
  end
111
126
  end
112
-
113
127
  end
114
128
  end
115
129
  end
116
130
 
117
-
118
131
  class Hash
119
132
 
120
133
  def deep_merge4(other_hash, &block)
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module OGP
3
- VERSION = "1.0.4"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -15,5 +15,5 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files -z`.split("\0")
16
16
  s.test_files = `git ls-files -z -- {fixtures,features,spec}/*`.split("\0")
17
17
  s.require_paths = ["lib"]
18
- s.add_runtime_dependency("middleman-core", ["~> 3.2"])
18
+ s.add_runtime_dependency("middleman-core", [">= 3.2"])
19
19
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-ogp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Nagase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-11 00:00:00.000000000 Z
11
+ date: 2016-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
27
  description: OpenGraph Protocol Helper for Middleman
@@ -35,7 +35,8 @@ files:
35
35
  - .travis.yml
36
36
  - CHANGELOG.md
37
37
  - CONTRIBUTING.md
38
- - Gemfile
38
+ - Gemfile.mm3
39
+ - Gemfile.mm4
39
40
  - LICENSE.md
40
41
  - README.md
41
42
  - Rakefile
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  version: '0'
82
83
  requirements: []
83
84
  rubyforge_project:
84
- rubygems_version: 2.0.14
85
+ rubygems_version: 2.0.14.1
85
86
  signing_key:
86
87
  specification_version: 4
87
88
  summary: OpenGraph Protocol Helper for Middleman