sassc-embedded 1.64.1 → 1.68.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 519d9a7796c0476fcb6fade84dbd2cf9f2d8fdee276ac28dfc9fb13895640645
4
- data.tar.gz: 6baaf9cd2d19147644f6c1c320492947f4af5f4c1e4886437e1906cda93643fd
3
+ metadata.gz: 9d6968d22e46dba726fb31a708a2b58bf2ac9c43f812c85d0e03e3b2be87326c
4
+ data.tar.gz: 612860bf91158cee9dfed8d8fed1d2258c4c209f888cf3b179e308ddb0a99b16
5
5
  SHA512:
6
- metadata.gz: ac771c550f630bb8d1d363dc7d84a9c18d04161b54f91eed048651db39e0e1ba06d65b249dfec6604fb14c3b9e1ff552c911a54d10e61ea3795e808acfbdb259
7
- data.tar.gz: 5d84bbc68bcf6f3ad056f9c7bcd49421a63286a9eb3892eef4c4048d3817e398c31693d2eaf6a88c244e8168ec21dafd0b1d435be845e9b9f5df76eddff07521
6
+ metadata.gz: 97e715e3d66c49dd576177dedf97956bd3af48716b9446eae3b4bac4717a14d03cd6abd84405cd6ce8b9d6f8dedc2744c4a00674d1fd6df675034792afb36c68
7
+ data.tar.gz: 6e27282d9e0d27fd427644e9c67fb220ad3d33ef1aeb4177de5aececb047ce41c6bc00439841d73a803243fd3c148310d552cf02b8a590c681dea2c6330bfad0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.64.1'
5
+ VERSION = '1.68.0'
6
6
  end
7
7
  end
@@ -13,9 +13,11 @@ module SassC
13
13
  def render
14
14
  return @template.dup if @template.empty?
15
15
 
16
+ base_importer = import_handler.setup(nil)
17
+
16
18
  result = ::Sass.compile_string(
17
19
  @template,
18
- importer: import_handler.setup(nil),
20
+ importer: base_importer,
19
21
  load_paths: load_paths,
20
22
  syntax: syntax,
21
23
  url: file_url,
@@ -26,7 +28,7 @@ module SassC
26
28
  style: output_style,
27
29
 
28
30
  functions: functions_handler.setup(nil, functions: @functions),
29
- importers: @options.fetch(:importers, []),
31
+ importers: (base_importer.nil? ? [] : [base_importer]).concat(@options.fetch(:importers, [])),
30
32
 
31
33
  alert_ascii: @options.fetch(:alert_ascii, false),
32
34
  alert_color: @options.fetch(:alert_color, nil),
@@ -296,11 +298,11 @@ module SassC
296
298
  @parent_urls = [URL.path_to_file_url(File.absolute_path(@importer.options[:filename] || 'stdin'))]
297
299
  end
298
300
 
299
- def canonicalize(url, from_import:)
301
+ def canonicalize(url, context)
300
302
  if url.start_with?(Protocol::IMPORT)
301
303
  canonical_url = @canonical_urls.delete(url.delete_prefix(Protocol::IMPORT))
302
304
  unless @importer_results.key?(canonical_url)
303
- canonical_url = resolve_file_url(canonical_url, @parent_urls.last, from_import)
305
+ canonical_url = resolve_file_url(canonical_url, @parent_urls.last, context.from_import)
304
306
  end
305
307
  @parent_urls.push(canonical_url)
306
308
  canonical_url
@@ -316,7 +318,7 @@ module SassC
316
318
  end
317
319
 
318
320
  canonical_url = "#{Protocol::IMPORT}#{next_id}"
319
- @importer_results[canonical_url] = imports_to_native(imports, from_import)
321
+ @importer_results[canonical_url] = imports_to_native(imports, context.from_import)
320
322
  canonical_url
321
323
  elsif url.start_with?(Protocol::LOADED)
322
324
  canonical_url = Protocol::LOADED
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.64.1
4
+ version: 1.68.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-05 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sassc
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.64'
33
+ version: '1.68'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.64'
40
+ version: '1.68'
41
41
  description: An embedded sass shim for SassC.
42
42
  email:
43
43
  - i@ntk.me
@@ -54,8 +54,8 @@ homepage: https://github.com/ntkme/sassc-embedded-shim-ruby
54
54
  licenses:
55
55
  - MIT
56
56
  metadata:
57
- documentation_uri: https://rubydoc.info/gems/sassc-embedded/1.64.1
58
- source_code_uri: https://github.com/ntkme/sassc-embedded-shim-ruby/tree/v1.64.1
57
+ documentation_uri: https://rubydoc.info/gems/sassc-embedded/1.68.0
58
+ source_code_uri: https://github.com/ntkme/sassc-embedded-shim-ruby/tree/v1.68.0
59
59
  funding_uri: https://github.com/sponsors/ntkme
60
60
  post_install_message:
61
61
  rdoc_options: []