jekyll-bits 0.9.1 → 0.9.2

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: 7e1c6383b3f68eb499d63fcdc8114e7174363c67
4
- data.tar.gz: 86d221fff58f65de172a3c0d943fec58fbccaeb2
3
+ metadata.gz: e69e9a6979a133e0615b75613d910522231104e5
4
+ data.tar.gz: fc0536c6114c8f885a5d79edde30554ff531b052
5
5
  SHA512:
6
- metadata.gz: d7912af577bb6e0ef248fdcff1e169d7035b4326651b20ae1562ecb0ce1f35c7fc3fb17379aab75dff646312f5f34fe8a8278bdcce6fe1470ca5bb5e9959bedf
7
- data.tar.gz: b4b282e36eeaa04c8e88f3f28efe34a31b9927f5871c9ebb9d9d06d0b22e9cbf39d42f88e4bd173c6d779c3f45055e32ed33b8eaef7da85908fe7d2c834e690d
6
+ metadata.gz: aaf041fee3a6b949cbc2531f3b02e67be331fab5e2113f47b236ba4c04b4762ce96780b6efcf0ef6652e4d4ac7b8f9e2028351c8e4327e9028a70650a92e73af
7
+ data.tar.gz: dd6d4e837bc94d590e4204ca5f7e3aa125cd663317e6c222c8097be574afad34809a17b13cb67f5b6ed040737f071c3f02182e19aa1c56a0059b8c3d1ec6317c
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.9.1'
11
+ s.version = '0.9.2'
12
12
  s.license = 'MIT'
13
13
  s.summary = 'Jekyll Bits'
14
14
  s.description = 'Useful and very simple Jekyll plugins'
@@ -68,6 +68,8 @@ module Jekyll
68
68
 
69
69
  private
70
70
 
71
+ @home = nil
72
+
71
73
  def uri(page)
72
74
  uri = ''
73
75
  uri = page['image'] if page['image']
@@ -80,12 +82,21 @@ module Jekyll
80
82
  end
81
83
  end
82
84
  uri = URI.parse(uri)
83
- unless %w(http https).include?(uri.scheme)
84
- home = Jekyll.configuration({})['url']
85
- uri = home.gsub(%r{/$}, '') + uri.to_s unless home.nil?
86
- end
85
+ uri = home + uri.to_s unless %w(http https).include?(uri.scheme)
87
86
  uri.to_s
88
87
  end
88
+
89
+ def home
90
+ if @home.nil?
91
+ @home = Jekyll.configuration({})['url']
92
+ if @home.nil?
93
+ @home = ''
94
+ else
95
+ @home.gsub!(%r{/$}, '')
96
+ end
97
+ end
98
+ @home
99
+ end
89
100
  end
90
101
 
91
102
  # Box for testing and calling static methods.
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.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko