sassc-embedded 1.68.1 → 1.68.2
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/lib/sassc/embedded/version.rb +1 -1
 - data/lib/sassc/embedded.rb +14 -6
 - 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: e9bc5cac9cd760e5a3763752ed7972d9071daac5c73a4470ef51674222dea3d4
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5ee33293cc9ea0911f557812d5e6fd8d9f13c9da96427f0cb1e60f1ac806fe9b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 17245ae4b95349b96a89991ba2b9a6486a71e37dc146230f433416c224cd51f243983907415beb3464f5ef301c343406b197a3e85396dbc327e9de34d9d193fd
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b2d86f258395f846fe809da335efc70e3be4e9527dd4e85c9744da0f4dc858e0860e6020f4a0fd6f72ce04b391c84f7d524061a2aad362492530f6c12766105e
         
     | 
    
        data/lib/sassc/embedded.rb
    CHANGED
    
    | 
         @@ -49,7 +49,7 @@ module SassC 
     | 
|
| 
       49 
49 
     | 
    
         
             
                    source_mapping_url = if source_map_embed?
         
     | 
| 
       50 
50 
     | 
    
         
             
                                           "data:application/json;base64,#{[@source_map].pack('m0')}"
         
     | 
| 
       51 
51 
     | 
    
         
             
                                         else
         
     | 
| 
       52 
     | 
    
         
            -
                                           URL. 
     | 
| 
      
 52 
     | 
    
         
            +
                                           URL.file_urls_to_relative_url(source_map_file_url, url)
         
     | 
| 
       53 
53 
     | 
    
         
             
                                         end
         
     | 
| 
       54 
54 
     | 
    
         
             
                    css += "\n/*# sourceMappingURL=#{source_mapping_url} */"
         
     | 
| 
       55 
55 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -61,7 +61,7 @@ module SassC 
     | 
|
| 
       61 
61 
     | 
    
         
             
                  line += 1 unless line.nil?
         
     | 
| 
       62 
62 
     | 
    
         
             
                  url = e.span&.url
         
     | 
| 
       63 
63 
     | 
    
         
             
                  path = if url&.start_with?(Protocol::FILE)
         
     | 
| 
       64 
     | 
    
         
            -
                           URL. 
     | 
| 
      
 64 
     | 
    
         
            +
                           URL.file_urls_to_relative_path(url, URL.path_to_file_url("#{Dir.pwd}/"))
         
     | 
| 
       65 
65 
     | 
    
         
             
                         end
         
     | 
| 
       66 
66 
     | 
    
         
             
                  raise SyntaxError.new(e.full_message, filename: path, line: line)
         
     | 
| 
       67 
67 
     | 
    
         
             
                end
         
     | 
| 
         @@ -79,10 +79,10 @@ module SassC 
     | 
|
| 
       79 
79 
     | 
    
         | 
| 
       80 
80 
     | 
    
         
             
                  url = URL.parse(source_map_file_url || file_url)
         
     | 
| 
       81 
81 
     | 
    
         
             
                  data = JSON.parse(@source_map)
         
     | 
| 
       82 
     | 
    
         
            -
                  data['file'] = URL. 
     | 
| 
      
 82 
     | 
    
         
            +
                  data['file'] = URL.file_urls_to_relative_url(output_url, url) if output_url
         
     | 
| 
       83 
83 
     | 
    
         
             
                  data['sources'].map! do |source|
         
     | 
| 
       84 
84 
     | 
    
         
             
                    if source.start_with?(Protocol::FILE)
         
     | 
| 
       85 
     | 
    
         
            -
                      URL. 
     | 
| 
      
 85 
     | 
    
         
            +
                      URL.file_urls_to_relative_url(source, url)
         
     | 
| 
       86 
86 
     | 
    
         
             
                    else
         
     | 
| 
       87 
87 
     | 
    
         
             
                      source
         
     | 
| 
       88 
88 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -309,7 +309,7 @@ module SassC 
     | 
|
| 
       309 
309 
     | 
    
         
             
                      @parent_urls.push(canonical_url)
         
     | 
| 
       310 
310 
     | 
    
         
             
                      canonical_url
         
     | 
| 
       311 
311 
     | 
    
         
             
                    elsif url.start_with?(Protocol::FILE)
         
     | 
| 
       312 
     | 
    
         
            -
                      path = URL. 
     | 
| 
      
 312 
     | 
    
         
            +
                      path = URL.file_urls_to_relative_path(url, @parent_urls.last)
         
     | 
| 
       313 
313 
     | 
    
         
             
                      parent_path = URL.file_url_to_path(@parent_urls.last)
         
     | 
| 
       314 
314 
     | 
    
         | 
| 
       315 
315 
     | 
    
         
             
                      imports = @importer.imports(path, parent_path)
         
     | 
| 
         @@ -354,7 +354,7 @@ module SassC 
     | 
|
| 
       354 
354 
     | 
    
         
             
                  end
         
     | 
| 
       355 
355 
     | 
    
         | 
| 
       356 
356 
     | 
    
         
             
                  def resolve_file_url(url, parent_url, from_import)
         
     | 
| 
       357 
     | 
    
         
            -
                    path = URL. 
     | 
| 
      
 357 
     | 
    
         
            +
                    path = URL.file_urls_to_relative_path(url, parent_url)
         
     | 
| 
       358 
358 
     | 
    
         
             
                    parent_path = URL.file_url_to_path(parent_url)
         
     | 
| 
       359 
359 
     | 
    
         
             
                    [File.dirname(parent_path)].concat(load_paths).each do |load_path|
         
     | 
| 
       360 
360 
     | 
    
         
             
                      resolved = FileImporter.resolve_path(File.absolute_path(path, load_path), from_import)
         
     | 
| 
         @@ -568,6 +568,14 @@ module SassC 
     | 
|
| 
       568 
568 
     | 
    
         
             
                  PARSER.unescape(str)
         
     | 
| 
       569 
569 
     | 
    
         
             
                end
         
     | 
| 
       570 
570 
     | 
    
         | 
| 
      
 571 
     | 
    
         
            +
                def file_urls_to_relative_url(url, from_url)
         
     | 
| 
      
 572 
     | 
    
         
            +
                  URL.parse(url).route_from(from_url).to_s
         
     | 
| 
      
 573 
     | 
    
         
            +
                end
         
     | 
| 
      
 574 
     | 
    
         
            +
             
     | 
| 
      
 575 
     | 
    
         
            +
                def file_urls_to_relative_path(url, from_url)
         
     | 
| 
      
 576 
     | 
    
         
            +
                  URL.unescape(file_urls_to_relative_url(url, from_url))
         
     | 
| 
      
 577 
     | 
    
         
            +
                end
         
     | 
| 
      
 578 
     | 
    
         
            +
             
     | 
| 
       571 
579 
     | 
    
         
             
                def file_url_to_path(url)
         
     | 
| 
       572 
580 
     | 
    
         
             
                  return if url.nil?
         
     | 
| 
       573 
581 
     | 
    
         | 
    
        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.68. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.68.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - なつき
         
     | 
| 
         @@ -78,7 +78,7 @@ licenses: 
     | 
|
| 
       78 
78 
     | 
    
         
             
            - MIT
         
     | 
| 
       79 
79 
     | 
    
         
             
            metadata:
         
     | 
| 
       80 
80 
     | 
    
         
             
              documentation_uri: https://rubydoc.info/gems/sassc
         
     | 
| 
       81 
     | 
    
         
            -
              source_code_uri: https://github.com/ntkme/sassc-embedded-shim-ruby/tree/v1.68. 
     | 
| 
      
 81 
     | 
    
         
            +
              source_code_uri: https://github.com/ntkme/sassc-embedded-shim-ruby/tree/v1.68.2
         
     | 
| 
       82 
82 
     | 
    
         
             
              funding_uri: https://github.com/sponsors/ntkme
         
     | 
| 
       83 
83 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       84 
84 
     | 
    
         
             
            rdoc_options: []
         
     |