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 +4 -4
- data/jekyll-bits.gemspec +1 -1
- data/lib/jekyll-bits/picture.rb +15 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e69e9a6979a133e0615b75613d910522231104e5
|
4
|
+
data.tar.gz: fc0536c6114c8f885a5d79edde30554ff531b052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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'
|
data/lib/jekyll-bits/picture.rb
CHANGED
@@ -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.
|