sassc-embedded 1.77.0 → 1.77.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d513301805669f2944f1dcc4f6ee8775554122531c7d41abca281c05acbb8351
4
- data.tar.gz: 4a1576efa981b9c3e9b56a201793675d4764bb66b03cae8ea3f369eba9ed9f3f
3
+ metadata.gz: a4b63d6cb7265fce189ee1c9dd5a5e6c06a2ae5d0d0ccf2fe88bf9ea15a0b4f2
4
+ data.tar.gz: 9742024209ffbcd80ec482028500370fb12343af829e814b3e4daf9d15e3a7f0
5
5
  SHA512:
6
- metadata.gz: 10bf726fb6e87dabcdb0003c8dd104675233fc56800bac7b27b13ce936e568bf0c24ec7638325aa30bba01320b5e8b2f0bb95d93a69126fdd60df515382edf65
7
- data.tar.gz: 4998fcb9dd6b735b93802d32ea5067834e75dedcfd2ba6ee32debc3ec24bbe8dc6f6cb0347a265596f2ae0b3f00b78e436282f264f144bd9ee7e401f1fed3395
6
+ metadata.gz: d332ab05fee496aa0bcd14aad0d623a4309ef9244cf30125f191fc5542bc79c7cf2effe8e0ec2069a59384c621467097977b70c030e465c798f5b46860159ecb
7
+ data.tar.gz: e14c9ffb2dc052809527cc30619fa28224457523780237fd44004f953de09e867fb0ea2b1933a23cece2cb6cb3c8cb8ce2264096848c8cb86acd8876d55cec7a
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.77.0'
5
+ VERSION = '1.77.1'
6
6
  end
7
7
  end
@@ -46,11 +46,11 @@ module SassC
46
46
  css = result.css
47
47
  css += "\n" unless css.empty?
48
48
  unless @source_map.nil? || omit_source_map_url?
49
- url = URI.parse(output_url || file_url)
49
+ url = Uri.parse(output_url || file_url)
50
50
  source_mapping_url = if source_map_embed?
51
51
  "data:application/json;base64,#{[@source_map].pack('m0')}"
52
52
  else
53
- URI.file_urls_to_relative_url(source_map_file_url, url)
53
+ Uri.file_urls_to_relative_url(source_map_file_url, url)
54
54
  end
55
55
  css += "\n/*# sourceMappingURL=#{source_mapping_url} */"
56
56
  end
@@ -61,7 +61,7 @@ module SassC
61
61
  line = e.span&.start&.line
62
62
  line += 1 unless line.nil?
63
63
  url = e.span&.url
64
- path = (URI.file_urls_to_relative_path(url, URI.path_to_file_url("#{Dir.pwd}/")) if url&.start_with?('file:'))
64
+ path = (Uri.file_urls_to_relative_path(url, Uri.path_to_file_url("#{Dir.pwd}/")) if url&.start_with?('file:'))
65
65
  raise SyntaxError.new(e.full_message, filename: path, line:)
66
66
  end
67
67
 
@@ -69,19 +69,19 @@ module SassC
69
69
  raise NotRenderedError unless @loaded_urls
70
70
 
71
71
  Dependency.from_filenames(@loaded_urls.filter_map do |url|
72
- URI.file_url_to_path(url) if url.start_with?('file:') && !url.include?('?') && url != file_url
72
+ Uri.file_url_to_path(url) if url.start_with?('file:') && !url.include?('?') && url != file_url
73
73
  end)
74
74
  end
75
75
 
76
76
  def source_map
77
77
  raise NotRenderedError unless @source_map
78
78
 
79
- url = URI.parse(source_map_file_url || file_url)
79
+ url = Uri.parse(source_map_file_url || file_url)
80
80
  data = JSON.parse(@source_map)
81
- data['file'] = URI.file_urls_to_relative_url(output_url, url) if output_url
81
+ data['file'] = Uri.file_urls_to_relative_url(output_url, url) if output_url
82
82
  data['sources'].map! do |source|
83
83
  if source.start_with?('file:')
84
- URI.file_urls_to_relative_url(source, url)
84
+ Uri.file_urls_to_relative_url(source, url)
85
85
  else
86
86
  source
87
87
  end
@@ -93,7 +93,7 @@ module SassC
93
93
  private
94
94
 
95
95
  def file_url
96
- @file_url ||= URI.path_to_file_url(File.absolute_path(filename || 'stdin'))
96
+ @file_url ||= Uri.path_to_file_url(File.absolute_path(filename || 'stdin'))
97
97
  end
98
98
 
99
99
  def output_path
@@ -103,7 +103,7 @@ module SassC
103
103
  end
104
104
 
105
105
  def output_url
106
- @output_url ||= (URI.path_to_file_url(File.absolute_path(output_path)) if output_path)
106
+ @output_url ||= (Uri.path_to_file_url(File.absolute_path(output_path)) if output_path)
107
107
  end
108
108
 
109
109
  def source_map_file_url
@@ -112,7 +112,7 @@ module SassC
112
112
  # SassC does not encode path as uri for sourceMappingURL, which is technically wrong.
113
113
  # However, this behavior has been abused to append query string to sourceMappingURL.
114
114
  components = source_map_file.split('?', 2)
115
- components[0] = URI.path_to_file_url(File.absolute_path(components[0]))
115
+ components[0] = Uri.path_to_file_url(File.absolute_path(components[0]))
116
116
  components.join('?')
117
117
  end
118
118
  end
@@ -317,12 +317,12 @@ module SassC
317
317
 
318
318
  containing_url = context.containing_url
319
319
 
320
- path = URI.decode_uri_component(url)
321
- parent_path = URI.file_url_to_path(containing_url)
320
+ path = Uri.decode_uri_component(url)
321
+ parent_path = Uri.file_url_to_path(containing_url)
322
322
  parent_dir = File.dirname(parent_path)
323
323
 
324
324
  if containing_url.include?('?')
325
- canonical_url = URI.path_to_file_url(File.absolute_path(path, parent_dir))
325
+ canonical_url = Uri.path_to_file_url(File.absolute_path(path, parent_dir))
326
326
  if @importer_results.key?(canonical_url)
327
327
  canonical_url
328
328
  else
@@ -359,7 +359,7 @@ module SassC
359
359
 
360
360
  def resolve_file_url(path, parent_dir, from_import)
361
361
  resolved = FileSystemImporter.resolve_path(File.absolute_path(path, parent_dir), from_import)
362
- URI.path_to_file_url(resolved) unless resolved.nil?
362
+ Uri.path_to_file_url(resolved) unless resolved.nil?
363
363
  end
364
364
 
365
365
  def syntax(path)
@@ -375,7 +375,7 @@ module SassC
375
375
 
376
376
  def import_to_native(import, parent_dir, from_import, canonicalize)
377
377
  if import.source
378
- canonical_url = URI.path_to_file_url(File.absolute_path(import.path, parent_dir))
378
+ canonical_url = Uri.path_to_file_url(File.absolute_path(import.path, parent_dir))
379
379
  @importer_results[canonical_url] = if import.source.is_a?(Hash)
380
380
  {
381
381
  contents: import.source[:contents],
@@ -394,13 +394,13 @@ module SassC
394
394
  return resolve_file_url(import.path, parent_dir, from_import)
395
395
  end
396
396
 
397
- URI.encode_uri_path_component(import.path)
397
+ Uri.encode_uri_path_component(import.path)
398
398
  end
399
399
 
400
400
  def imports_to_native(imports, parent_dir, from_import, url, containing_url)
401
401
  return import_to_native(imports.first, parent_dir, from_import, true) if imports.one?
402
402
 
403
- canonical_url = "#{containing_url}?url=#{URI.encode_uri_query_component(url)}&from_import=#{from_import}"
403
+ canonical_url = "#{containing_url}?url=#{Uri.encode_uri_query_component(url)}&from_import=#{from_import}"
404
404
  @importer_results[canonical_url] = {
405
405
  contents: imports.flat_map do |import|
406
406
  at_rule = from_import ? '@import' : '@forward'
@@ -564,15 +564,11 @@ module SassC
564
564
  end
565
565
  end
566
566
 
567
- module URI
567
+ module Uri
568
568
  module_function
569
569
 
570
- def join(...)
571
- ::URI.join(...).to_s
572
- end
573
-
574
- def parse(str)
575
- ::URI.parse(str)
570
+ def parse(...)
571
+ ::URI.parse(...)
576
572
  end
577
573
 
578
574
  def encode_uri_path_component(str)
@@ -623,5 +619,5 @@ module SassC
623
619
  end
624
620
  end
625
621
 
626
- private_constant :URI
622
+ private_constant :Uri
627
623
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.77.0
4
+ version: 1.77.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -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.0
82
+ source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.1
83
83
  funding_uri: https://github.com/sponsors/ntkme
84
84
  rubygems_mfa_required: 'true'
85
85
  post_install_message: