sassc-embedded 1.77.5 → 1.77.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +41 -30
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abfda7ec1954206ddeaa5615edb426019fbe31b3eefd755b70123790d7184e17
|
4
|
+
data.tar.gz: 82c27c03bb0cafb0066e9e0cb06a6facef27306a3d39bf8ac586ee807e5bd9ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ab470b94835dcde4f7c3430b9410535645f4b335283cd777a06932eba4c378fde7319c5c1bf76f127be4c4f36761efb24d99e0de7926a39443832bd84ce60d8
|
7
|
+
data.tar.gz: ae24593c836f5878d120ea0d43feea97bba1dabbb80ac4dc347972f840a4321d60cfeca92d071573a6cc6ec7051026919a397b1e707dc5295cbd87fc38a00742
|
data/lib/sassc/embedded.rb
CHANGED
@@ -588,40 +588,51 @@ module SassC
|
|
588
588
|
::URI::RFC3986_PARSER.parse(...)
|
589
589
|
end
|
590
590
|
|
591
|
+
encode_uri_hash = {}
|
592
|
+
decode_uri_hash = {}
|
593
|
+
256.times do |i|
|
594
|
+
c = -[i].pack('C')
|
595
|
+
h = c.unpack1('H')
|
596
|
+
l = c.unpack1('h')
|
597
|
+
pdd = -"%#{h}#{l}"
|
598
|
+
pdu = -"%#{h}#{l.upcase}"
|
599
|
+
pud = -"%#{h.upcase}#{l}"
|
600
|
+
puu = -pdd.upcase
|
601
|
+
encode_uri_hash[c] = puu
|
602
|
+
decode_uri_hash[pdd] = c
|
603
|
+
decode_uri_hash[pdu] = c
|
604
|
+
decode_uri_hash[pud] = c
|
605
|
+
decode_uri_hash[puu] = c
|
606
|
+
end.freeze
|
607
|
+
encode_uri_hash.freeze
|
608
|
+
decode_uri_hash.freeze
|
609
|
+
|
591
610
|
{
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
611
|
+
uri_path_component: "!$&'()*+,;=:/@",
|
612
|
+
uri_query_component: "!$&'()*+,;=:/?@",
|
613
|
+
uri_component: nil,
|
614
|
+
uri: "!$&'()*+,;=:/?#[]@"
|
596
615
|
}
|
597
|
-
.each do |symbol,
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
end.force_encoding(str.encoding)
|
616
|
+
.each do |symbol, unescaped|
|
617
|
+
encode_regexp = Regexp.new("[^0-9A-Za-z#{Regexp.escape("-._~#{unescaped}")}]", Regexp::NOENCODING)
|
618
|
+
|
619
|
+
define_method(:"encode_#{symbol}") do |str|
|
620
|
+
str.b.gsub(encode_regexp, encode_uri_hash).force_encoding(str.encoding)
|
603
621
|
end
|
604
|
-
end
|
605
622
|
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
define_method(symbol) do |str|
|
620
|
-
str.gsub(regexp) do |match|
|
621
|
-
decoded = [match.reverse].pack('h2')
|
622
|
-
preserve_escaped.include?(decoded) ? match : decoded
|
623
|
-
end.force_encoding(str.encoding)
|
624
|
-
end
|
623
|
+
next if symbol.match?(/_.+_/o)
|
624
|
+
|
625
|
+
decode_regexp = /%[0-9A-Fa-f]{2}/o
|
626
|
+
decode_uri_hash_with_preserve_escaped = if unescaped.nil? || unescaped.empty?
|
627
|
+
decode_uri_hash
|
628
|
+
else
|
629
|
+
decode_uri_hash.to_h do |key, value|
|
630
|
+
[key, unescaped.include?(value) ? key : value]
|
631
|
+
end.freeze
|
632
|
+
end
|
633
|
+
|
634
|
+
define_method(:"decode_#{symbol}") do |str|
|
635
|
+
str.gsub(decode_regexp, decode_uri_hash_with_preserve_escaped).force_encoding(str.encoding)
|
625
636
|
end
|
626
637
|
end
|
627
638
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.77.
|
4
|
+
version: 1.77.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass-embedded
|
@@ -79,7 +79,7 @@ licenses:
|
|
79
79
|
metadata:
|
80
80
|
bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
|
81
81
|
documentation_uri: https://rubydoc.info/gems/sassc
|
82
|
-
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.
|
82
|
+
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.6
|
83
83
|
funding_uri: https://github.com/sponsors/ntkme
|
84
84
|
rubygems_mfa_required: 'true'
|
85
85
|
post_install_message:
|