jekyll-bits 0.10 → 0.11

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: 9d22107988f9c8e070cf89b4c696efba03332646
4
- data.tar.gz: 73e9695d2d435083409c1ff625d6825e9d237c6b
3
+ metadata.gz: 5dff4c198c29671f9e82d985e6f8776105ac8e51
4
+ data.tar.gz: b8298a9b0df0f362fad5804a9e92ecdb5c5431ae
5
5
  SHA512:
6
- metadata.gz: 38d51536086b52e83707a643117d4170e42271dd1a4936a2a1470b1313b182fec13ee481eedeae484c30963bb9eeeaab3e1b8f0a6cc1ac01d8c5ffae2f3b90bb
7
- data.tar.gz: 45679ad48423d2a70afae00e78c836e13f41d587cad9cc0831a10476f4106ad4773a4ff12d2e0bb24ddf8cb49caa24dc0edecede64d95fe24e60f7492540f6c4
6
+ metadata.gz: 7e21c6aaad88434cbf846e10f2ff513cb68b72f2cce1f7092004b058e72c2f1500a3923a8525014883203501b5b5dc262686bbb849e52b662cf46c227c4a6f94
7
+ data.tar.gz: 2f537d508ab083f18d074517ac0d5aa67132675be594f78e7f3ddb16728db4867e891c8735e38aaba95e01d6a3c72b53fdb7d8f6ec43e93e6978ab3d7f1228cd
data/jekyll-bits.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.rubygems_version = '2.2.2'
9
9
  s.required_ruby_version = '>= 1.9.3'
10
10
  s.name = 'jekyll-bits'
11
- s.version = '0.10'
11
+ s.version = '0.11'
12
12
  s.license = 'MIT'
13
13
  s.summary = 'Jekyll Bits'
14
14
  s.description = 'Useful and very simple Jekyll plugins'
@@ -40,8 +40,14 @@ module Jekyll
40
40
  path = File.join(Dir.pwd, path) unless \
41
41
  %w(http https).include?(URI.parse(uri).scheme)
42
42
  width, height = FastImage.size(path)
43
- html += "<meta name='og:image:width' content='#{width}'/>" if width
44
- html += "<meta name='og:image:height' content='#{height}'/>" if height
43
+ if width
44
+ html += "<meta name='og:image:width' content='#{width}'/>
45
+ <meta name='twitter:image:width' content='#{width}'/>"
46
+ end
47
+ if height
48
+ html += "<meta name='og:image:height' content='#{height}'/>
49
+ <meta name='twitter:image:height' content='#{height}'/>"
50
+ end
45
51
  html
46
52
  end
47
53
 
data/test/test_picture.rb CHANGED
@@ -56,6 +56,8 @@ module Jekyll
56
56
  assert_match(/meta/, html)
57
57
  assert_contains("<meta name='og:image:width' content='1280'/>", html)
58
58
  assert_contains("<meta name='og:image:height' content='543'/>", html)
59
+ assert_contains("<meta name='twitter:image:width' content='1280'/>", html)
60
+ assert_contains("<meta name='twitter:image:height' content='543'/>", html)
59
61
  end
60
62
 
61
63
  def test_generates_html_simple_body
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-bits
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.10'
4
+ version: '0.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-23 00:00:00.000000000 Z
11
+ date: 2017-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll