sass 3.5.7 → 3.6.0
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/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/extra/sass-spec-ref.sh +9 -1
- data/lib/sass/importers/filesystem.rb +4 -2
- data/lib/sass/script/lexer.rb +8 -12
- data/lib/sass/script/value/color.rb +3 -2
- data/test/sass/script_test.rb +0 -2
- data/test/sass/value_helpers_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82509c4a444a2c000d6f55f2d47502dcb94b70e903da358f22e00869cd292d35
|
4
|
+
data.tar.gz: 79d675357ab4eefa7cb6960d489de1ee2f2c73e901b8142865db5cdf54821357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 701b7fdcc0f1a03af08ef639680040b307f2e5e3210cd785434ec8296ccfb5a10dc1258906914fdacf73414a3c8aaeaa5179d545faa524b6e450cc39c0980069
|
7
|
+
data.tar.gz: 8db9b3fa129857550a352af2973cd9795874645ef8fc869a6c1c13643e01fbd98cacd79e11af9a88004f630847ec0b3ea6db8ddeb7baec847068c2ec47f160fc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.6.0
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
19 September 2018 17:19:09 UTC
|
data/extra/sass-spec-ref.sh
CHANGED
@@ -18,7 +18,15 @@ fi
|
|
18
18
|
|
19
19
|
>&2 echo "Fetching pull request $TRAVIS_PULL_REQUEST..."
|
20
20
|
|
21
|
-
|
21
|
+
url=https://api.github.com/repos/sass/ruby-sass/pulls/$TRAVIS_PULL_REQUEST
|
22
|
+
if [ -z "$GITHUB_AUTH" ]; then
|
23
|
+
>&2 echo "Fetching pull request info without authentication"
|
24
|
+
JSON=$(curl -L -sS $url)
|
25
|
+
else
|
26
|
+
>&2 echo "Fetching pull request info as sassbot"
|
27
|
+
JSON=$(curl -u "sassbot:$GITHUB_AUTH" -L -sS $url)
|
28
|
+
fi
|
29
|
+
>&2 echo "$JSON"
|
22
30
|
|
23
31
|
RE_SPEC_PR="sass\/sass-spec(#|\/pull\/)([0-9]+)"
|
24
32
|
|
@@ -154,7 +154,9 @@ module Sass
|
|
154
154
|
[Sass::Util.cleanpath(full_path).to_s, s]
|
155
155
|
end
|
156
156
|
end.flatten(1)
|
157
|
-
|
157
|
+
if found.empty? && split(name)[2].nil? && File.directory?("#{dir}/#{name}")
|
158
|
+
return find_real_file("#{dir}/#{name}", "index", options)
|
159
|
+
end
|
158
160
|
|
159
161
|
if found.size > 1 && !@same_name_warnings.include?(found.first.first)
|
160
162
|
found.each {|(f, _)| @same_name_warnings << f}
|
@@ -202,7 +204,7 @@ WARNING
|
|
202
204
|
|
203
205
|
def _find(dir, name, options)
|
204
206
|
full_filename, syntax = Sass::Util.destructure(find_real_file(dir, name, options))
|
205
|
-
return unless full_filename && File.readable?(full_filename)
|
207
|
+
return unless full_filename && File.file?(full_filename) && File.readable?(full_filename)
|
206
208
|
|
207
209
|
# TODO: this preserves historical behavior, but it's possible
|
208
210
|
# :filename should be either normalized to the native format
|
data/lib/sass/script/lexer.rb
CHANGED
@@ -368,24 +368,20 @@ MESSAGE
|
|
368
368
|
# IDs in properties are used in the Basic User Interface Module
|
369
369
|
# (http://www.w3.org/TR/css3-ui/).
|
370
370
|
return unless scan(REGULAR_EXPRESSIONS[:id])
|
371
|
-
if @scanner[0] =~ /^\#[0-9a-fA-F]+$/
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
filename = @options[:filename]
|
376
|
-
Sass::Util.sass_warn <<MESSAGE
|
377
|
-
DEPRECATION WARNING on line #{line}, column #{offset}#{" of #{filename}" if filename}:
|
378
|
-
The value "#{@scanner[0]}" is currently parsed as a string, but it will be parsed as a color in
|
379
|
-
future versions of Sass. Use "unquote('#{@scanner[0]}')" to continue parsing it as a string.
|
380
|
-
MESSAGE
|
381
|
-
end
|
371
|
+
if @scanner[0] =~ /^\#[0-9a-fA-F]+$/ &&
|
372
|
+
(@scanner[0].length == 4 || @scanner[0].length == 5 ||
|
373
|
+
@scanner[0].length == 7 || @scanner[0].length == 9)
|
374
|
+
return [:color, Script::Value::Color.from_hex(@scanner[0])]
|
382
375
|
end
|
383
376
|
[:ident, @scanner[0]]
|
384
377
|
end
|
385
378
|
|
386
379
|
def color
|
387
380
|
return unless @scanner.match?(REGULAR_EXPRESSIONS[:color])
|
388
|
-
|
381
|
+
unless @scanner[0].length == 4 || @scanner[0].length == 5 ||
|
382
|
+
@scanner[0].length == 7 || @scanner[0].length == 9
|
383
|
+
return
|
384
|
+
end
|
389
385
|
script_color = Script::Value::Color.from_hex(scan(REGULAR_EXPRESSIONS[:color]))
|
390
386
|
[:color, script_color]
|
391
387
|
end
|
@@ -277,13 +277,14 @@ module Sass::Script::Value
|
|
277
277
|
#
|
278
278
|
# @return [Color]
|
279
279
|
def self.from_hex(hex_string, alpha = nil)
|
280
|
-
unless hex_string =~ /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})
|
281
|
-
hex_string =~ /^#?([0-9a-f])([0-9a-f])([0-9a-f])
|
280
|
+
unless hex_string =~ /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i ||
|
281
|
+
hex_string =~ /^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i
|
282
282
|
raise ArgumentError.new("#{hex_string.inspect} is not a valid hex color.")
|
283
283
|
end
|
284
284
|
red = $1.ljust(2, $1).to_i(16)
|
285
285
|
green = $2.ljust(2, $2).to_i(16)
|
286
286
|
blue = $3.ljust(2, $3).to_i(16)
|
287
|
+
alpha = $4.ljust(2, $4).to_i(16).to_f / 0xff if $4
|
287
288
|
|
288
289
|
hex_string = "##{hex_string}" unless hex_string[0] == ?#
|
289
290
|
attrs = {:red => red, :green => green, :blue => blue, :representation => hex_string}
|
data/test/sass/script_test.rb
CHANGED
@@ -608,8 +608,6 @@ WARNING
|
|
608
608
|
'Invalid CSS after "": expected expression (e.g. 1px, bold), was "#1"') {eval("#1")}
|
609
609
|
assert_raise_message(Sass::SyntaxError,
|
610
610
|
'Invalid CSS after "": expected expression (e.g. 1px, bold), was "#12"') {eval("#12")}
|
611
|
-
assert_raise_message(Sass::SyntaxError,
|
612
|
-
'Invalid CSS after "": expected expression (e.g. 1px, bold), was "#1234"') {eval("#1234")}
|
613
611
|
assert_raise_message(Sass::SyntaxError,
|
614
612
|
'Invalid CSS after "": expected expression (e.g. 1px, bold), was "#12345"') {eval("#12345")}
|
615
613
|
assert_raise_message(Sass::SyntaxError, 'Invalid CSS after "": expected expression (e.g. ' \
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sass-listen
|