jekyll-unsanitize 0.3 → 0.4
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 +4 -4
- data/lib/jekyll-unsanitize.rb +10 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1151fdbe30f04e02885dc1469467959ea32a9345
|
4
|
+
data.tar.gz: f6832549e1f60e891e540610453f770633b78c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31e8767cd4f157f1eb966947731ff41c3d65b319b27a16c9adb5a1ed09f343f45db6f50c648fd45f14cba29fcd8851d8e21ffd683f471adf11c6f7bc7f919431
|
7
|
+
data.tar.gz: c9431a8b28492698bf6bad755463125252821b3dc04815195e3234b27bae8e9e9597c1c745c5b6a7d2e00f30717ecbad0463aa853b08b3e1031d65696f902d66
|
data/lib/jekyll-unsanitize.rb
CHANGED
@@ -9,7 +9,7 @@ module Jekyll
|
|
9
9
|
base_directory
|
10
10
|
elsif questionable_path.start_with?(base_directory)
|
11
11
|
questionable_path
|
12
|
-
elsif File.exists?(questionable_path)
|
12
|
+
elsif File.exists?(questionable_path) and questionable_path != '/'
|
13
13
|
File.expand_path(questionable_path)
|
14
14
|
else
|
15
15
|
File.join(base_directory, questionable_path)
|
@@ -18,17 +18,15 @@ module Jekyll
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
class
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
[parent_dir] + parent_dirs(parent_dir)
|
31
|
-
end
|
21
|
+
class Cleaner
|
22
|
+
def parent_dirs(file)
|
23
|
+
parent_dir = File.dirname(file)
|
24
|
+
if parent_dir == '/'
|
25
|
+
[]
|
26
|
+
elsif parent_dir == site.dest
|
27
|
+
[]
|
28
|
+
else
|
29
|
+
[parent_dir] + parent_dirs(parent_dir)
|
32
30
|
end
|
33
31
|
end
|
34
32
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-unsanitize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sumit Khanna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Removes source base requirement for Jekyll
|
13
|
+
description: Removes source base requirement for Jekyll 3.0.1
|
14
14
|
email: sumit@penguindreams.org
|
15
15
|
executables: []
|
16
16
|
extensions: []
|