jekyll-sass-converter 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-sass-converter/version.rb +1 -1
- data/lib/jekyll/converters/scss.rb +27 -5
- 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: 645b96822c506f0d86f27cce5dc09793c4842982
|
4
|
+
data.tar.gz: 9eff7d0b5b3f471bc4d898edeb447aae620f3601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d06aefb9977c5861b8871db35659fc9b0e50b7870f329f83eeef738f3a5ef74ccba66c48ea989aed5f16152fc808fe0fe375c209c7938e96f9f9d16e2e4e8ee5
|
7
|
+
data.tar.gz: 2bf05d542e7e713970b2b5b3e7f4c25c95ba2b5d6f05fdaf6d1c217aa93527b911191dbe969fed816885dbeecfd1ccbd9700ed695b7ab0ff40a61e0f147e0712
|
@@ -71,15 +71,32 @@ module Jekyll
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def sass_dir_relative_to_site_source
|
74
|
-
Jekyll.sanitized_path(
|
74
|
+
Jekyll.sanitized_path(site_source, sass_dir)
|
75
75
|
end
|
76
76
|
|
77
77
|
def sass_load_paths
|
78
|
+
paths = user_sass_load_paths + [sass_dir_relative_to_site_source]
|
79
|
+
|
78
80
|
if safe?
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
# Sanitize paths to prevent any attack vectors (.e.g. `/**/*`)
|
82
|
+
paths.map! { |path| Jekyll.sanitized_path(site_source, path) }
|
83
|
+
end
|
84
|
+
|
85
|
+
# Expand file globs (e.g. `node_modules/*/node_modules` )
|
86
|
+
Dir.chdir(site_source) do
|
87
|
+
paths = paths.map { |path| Dir.glob(path) }.flatten.uniq
|
88
|
+
|
89
|
+
paths.map! do |path|
|
90
|
+
if safe?
|
91
|
+
# Sanitize again in case globbing was able to do something crazy.
|
92
|
+
Jekyll.sanitized_path(site_source, path)
|
93
|
+
else
|
94
|
+
File.expand_path(path)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
paths.select { |path| File.directory?(path) }
|
83
100
|
end
|
84
101
|
|
85
102
|
def allow_caching?
|
@@ -105,6 +122,11 @@ module Jekyll
|
|
105
122
|
rescue ::Sass::SyntaxError => e
|
106
123
|
raise SyntaxError.new("#{e.to_s} on line #{e.sass_line}")
|
107
124
|
end
|
125
|
+
|
126
|
+
private
|
127
|
+
def site_source
|
128
|
+
@site_source ||= File.expand_path(@config["source"]).freeze
|
129
|
+
end
|
108
130
|
end
|
109
131
|
end
|
110
132
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-sass-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.5.1
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: A basic Sass converter for Jekyll.
|