sassc-embedded 1.77.2 → 1.77.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f6d451aad32416a320f1c23c4f312633e058955744c0da5a5e19ac967c2677d
4
- data.tar.gz: 4d21e4f1aa6a0d79d697237e1825a4b770d4b85472c7dc2e762dcbcf3c842b51
3
+ metadata.gz: 99fa34d4fed8be371256e537011984fe140afc7fe9cf899c8cb7b1ca25450bf3
4
+ data.tar.gz: 134de014d12ee7c95f06e5516ccc237b6c801c0762fa77d8be2121c9cf1c2ccd
5
5
  SHA512:
6
- metadata.gz: 2dfd35f4e9053a3a51c89197c0079a877b20d8ee9f76cde280f20a40382452220e4afe735777c4fa99b7fd65e1d50c2aeef2aa05bba05734ff771c3c13b9c898
7
- data.tar.gz: 8cde54ce2caca35192fcfd38c1f6244823c299924150418779e21e18635b7f3c70b1baef7a3cb8528d62ac598cfebd6388a51579a099aee1998351119e4c7ccd
6
+ metadata.gz: 15062c8552ed3210199f951aebf8eb698105131d36616f708e34fb9382b43c573a16bc4536c64159ead42f957001f5dea930812233a6f0e198d329dab24fb037
7
+ data.tar.gz: a3a2439a7a69cfdd35d3b5377ea081d46c81e027bba3c6cf5502d896694ba9b0bd73fb933283494ce05ab97f2d6d47bb585809ebe257c248005b8ba3fc7b0db5
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.77.2'
5
+ VERSION = '1.77.3'
6
6
  end
7
7
  end
@@ -552,32 +552,45 @@ module SassC
552
552
  module_function
553
553
 
554
554
  def parse(...)
555
- ::URI.parse(...)
555
+ ::URI::RFC3986_PARSER.parse(...)
556
556
  end
557
557
 
558
- def encode_uri_path_component(str)
559
- str.b.gsub(%r{[^0-9A-Za-z\-._~!$&'()*+,;=:@/]}n) do |match|
560
- format('%%%02X', match.unpack1('C'))
561
- end.force_encoding(str.encoding)
562
- end
563
-
564
- def encode_uri_query_component(str)
565
- str.b.gsub(%r{[^0-9A-Za-z\-._~!$&'()*+,;=:@/?]}n) do |match|
566
- format('%%%02X', match.unpack1('C'))
567
- end.force_encoding(str.encoding)
568
- end
569
-
570
- def encode_uri_component(str)
571
- str.b.gsub(/[^0-9A-Za-z\-._~]/n) do |match|
572
- format('%%%02X', match.unpack1('C'))
573
- end.force_encoding(str.encoding)
574
- end
558
+ {
559
+ encode_uri_path_component: "!$&'()*+,;=:/@",
560
+ encode_uri_query_component: "!$&'()*+,;=:/?@",
561
+ encode_uri_component: nil,
562
+ encode_uri: "!$&'()*+,;=:/?#[]@"
563
+ }
564
+ .each do |symbol, extra_unescaped|
565
+ regexp = Regexp.new("[^0-9A-Za-z#{Regexp.escape("-._~#{extra_unescaped}")}]", Regexp::NOENCODING)
566
+ define_method(symbol) do |str|
567
+ str.b.gsub(regexp) do |match|
568
+ "%#{match.unpack1('H2').upcase}"
569
+ end.force_encoding(str.encoding)
570
+ end
571
+ end
575
572
 
576
- def decode_uri_component(str)
577
- str.gsub(/%[0-9A-Fa-f]{2}/) do |match|
578
- [match[1, 2]].pack('H2')
573
+ {
574
+ decode_uri_component: nil,
575
+ decode_uri: "!$&'()*+,;=:/?#[]@"
576
+ }
577
+ .each do |symbol, preserve_escaped|
578
+ regexp = /%[0-9A-Fa-f]{2}/o
579
+ if preserve_escaped.nil?
580
+ define_method(symbol) do |str|
581
+ str.gsub(regexp) do |match|
582
+ [match[1, 2]].pack('H2')
583
+ end.force_encoding(str.encoding)
584
+ end
585
+ else
586
+ define_method(symbol) do |str|
587
+ str.gsub(regexp) do |match|
588
+ decoded = [match[1, 2]].pack('H2')
589
+ preserve_escaped.include?(decoded) ? match : decoded
590
+ end.force_encoding(str.encoding)
591
+ end
592
+ end
579
593
  end
580
- end
581
594
 
582
595
  def file_urls_to_relative_url(url, from_url)
583
596
  parse(url).route_from(from_url).to_s
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.2
4
+ version: 1.77.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-02 00:00:00.000000000 Z
11
+ date: 2024-07-05 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.2
82
+ source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.3
83
83
  funding_uri: https://github.com/sponsors/ntkme
84
84
  rubygems_mfa_required: 'true'
85
85
  post_install_message: