jekyll-bits 0.13 → 0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '080d052dc01a1779061444c19bf76e9cf898e0d6'
4
- data.tar.gz: c87d46d7082537d79df4c10fb0e27f18f2541fd2
3
+ metadata.gz: 122342a2c6700b64c568ff83f4b96b6840194697
4
+ data.tar.gz: 317fc9bf12f3ffc3db8b835f677efd70cfd81085
5
5
  SHA512:
6
- metadata.gz: e8251889a392d2e9053cdd9e8878a0d6ce3e9e467b687199cfe2ee7a0edc023df2f8c954f09f26603ed6f92c999beaec79a503e7c5523663278c215bd2d24f64
7
- data.tar.gz: 24cdd0c677b6261b61e3f265b081f534658bf8d67f2b5744ce76fb9cbefa84887aabb7e757acf991fd91925fe21f1f9840d15ca2a0fa73fdcf36058508ac8020
6
+ metadata.gz: 7887e9e68115a34ba7785215153050a645ee850088e496b54b71f14d5bea5bbd368882dfc0a5c79ca370653d5c9dfc185378803c7623c672c32f6c27ed83574b
7
+ data.tar.gz: 464fb8e889306f29c1ed9624a7d1374fe42cba80fb630e72f7b1defa47eeaa241e01700dbf3938550ba0e9fb0afa4341b2fafd64407b43f8270dce1922d8f3e2
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.13'
11
+ s.version = '0.14'
12
12
  s.license = 'MIT'
13
13
  s.summary = 'Jekyll Bits'
14
14
  s.description = 'Useful and very simple Jekyll plugins'
@@ -32,7 +32,7 @@ module Jekyll
32
32
  # All our custom filters
33
33
  module JbFilters
34
34
  def jb_picture_head(page)
35
- uri = uri(page)
35
+ uri = abs(uri(page))
36
36
  return '' if uri.empty?
37
37
  html = "<meta name='og:image' content='#{CGI.escapeElement(uri)}'/>"
38
38
  html += "<meta name='twitter:image' content='#{CGI.escapeElement(uri)}'/>"
@@ -97,6 +97,10 @@ content='#{CGI.escapeHTML(alt(page))}'/>"
97
97
  uri = yaml
98
98
  end
99
99
  end
100
+ uri.to_s
101
+ end
102
+
103
+ def abs(uri)
100
104
  unless uri.empty?
101
105
  uri = URI.parse(uri)
102
106
  uri = home + uri.to_s unless %w(http https).include?(uri.scheme)
data/test/test_picture.rb CHANGED
@@ -97,7 +97,7 @@ module Jekyll
97
97
  )
98
98
  assert_match(/figcaption/, html)
99
99
  assert_match(/figure/, html)
100
- assert_match(/<figcaption id='79535e1e'>it is &lt;simple&gt;/, html)
100
+ assert_match(/<figcaption id='d9d1da45'>it is &lt;simple&gt;/, html)
101
101
  assert_match(/alt='nothing &#39;to&#39; say'/, html)
102
102
  assert_match(/width='500'/, html)
103
103
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-bits
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.13'
4
+ version: '0.14'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko