jekyll-bits 0.8 → 0.9
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 +7 -1
- data/test/test__helper.rb +29 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e44870c10f5898196828cc4af8d346b8f59e945
|
4
|
+
data.tar.gz: 0d4bdf271f8fd494419d7cc714fbaa3a2fceb03a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bacd8306ac47ecb1651c844bf567e7f837736b7ee0048242842820de4188305990099d77bb917b0dd69c5a55f39a1a8637d49c9bcde12969ba7f4d9ce8d9ba0c
|
7
|
+
data.tar.gz: 35873ac787d46e64913c2baafc6aa29842c262b7ef9ac4c7e60bf0446c7771283167731494b9db7a125c79fd72594d5d97c16b26da31b854ca0993eb3a9af8ac
|
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.
|
11
|
+
s.version = '0.9'
|
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
@@ -24,6 +24,7 @@
|
|
24
24
|
|
25
25
|
require 'digest/md5'
|
26
26
|
require 'liquid'
|
27
|
+
require 'uri'
|
27
28
|
|
28
29
|
# Jekyll module
|
29
30
|
module Jekyll
|
@@ -78,7 +79,12 @@ module Jekyll
|
|
78
79
|
uri = yaml
|
79
80
|
end
|
80
81
|
end
|
81
|
-
uri
|
82
|
+
uri = URI.parse(uri)
|
83
|
+
unless %w(http https).include?(uri.scheme)
|
84
|
+
home = Jekyll.configuration({})['url']
|
85
|
+
uri = home.gsub(%r{/$}, '') + uri unless home.nil?
|
86
|
+
end
|
87
|
+
uri.to_s
|
82
88
|
end
|
83
89
|
end
|
84
90
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2016 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
module Jekyll
|
26
|
+
def self.configuration(_)
|
27
|
+
{}
|
28
|
+
end
|
29
|
+
end
|
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.
|
4
|
+
version: '0.9'
|
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-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- jekyll-bits.gemspec
|
142
142
|
- lib/jekyll-bits.rb
|
143
143
|
- lib/jekyll-bits/picture.rb
|
144
|
+
- test/test__helper.rb
|
144
145
|
- test/test_picture.rb
|
145
146
|
homepage: http://github.com/yegor256/jekyll-bits
|
146
147
|
licenses:
|
@@ -168,4 +169,5 @@ signing_key:
|
|
168
169
|
specification_version: 2
|
169
170
|
summary: Jekyll Bits
|
170
171
|
test_files:
|
172
|
+
- test/test__helper.rb
|
171
173
|
- test/test_picture.rb
|