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 +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +7 -3
- data/{Gemfile → Gemfile.mm3} +4 -2
- data/Gemfile.mm4 +23 -0
- data/fixtures/test-app/source/layout.slim +1 -1
- data/fixtures/test-blog/source/layout.slim +2 -2
- data/lib/middleman-ogp/extension.rb +17 -4
- data/lib/middleman-ogp/version.rb +1 -1
- data/middleman-ogp.gemspec +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06a47dbe1d43eadc2986af4ed48387c2549c313c
|
4
|
+
data.tar.gz: 9e43b8b331044d136958eb88a96f9c64f4eff3f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ab7e36a2608652c10d909c049b3a2015e35996475ad229c989599b36c1f408e08674e7e0eb9ba8aee7e6f77993bac82d5a77d6d924424de237a4246912ab915
|
7
|
+
data.tar.gz: 5728656b532f26049f2aa794098cc1af38e6df939a02d5f1b36c756067bac1026587dea1eab438c1ff66a430ecdf49d186ce575bd4a926b507e03a30b12215cd
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -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
|
-
|
16
|
+
before_install: "ln -s \"Gemfile.mm${MM_VERSION}\" Gemfile"
|
13
17
|
|
14
|
-
|
18
|
+
script: "bundle exec rake test"
|
data/{Gemfile → Gemfile.mm3}
RENAMED
@@ -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", "~>
|
13
|
+
gem "cucumber", "~> 2.4.0"
|
14
14
|
gem "fivemat"
|
15
|
-
gem "aruba", "~> 0.
|
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
|
+
|
data/Gemfile.mm4
ADDED
@@ -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,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
|
-
|
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)
|
data/middleman-ogp.gemspec
CHANGED
@@ -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", ["
|
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
|
+
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:
|
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
|