sass-embedded 0.19.3 → 0.19.4

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: 5bd880f5e8c75f6b6a49d2359b96df7f11b49cad5273f81d08a46eeac5c105f1
4
- data.tar.gz: ac523992c522ae01aac03727690d35c67f00d1d24d3d73d36400917b29968616
3
+ metadata.gz: 12ce63a7fedb676fb7898007947caf7cf9c0b3f9cbf9ace7650a96ea975c759e
4
+ data.tar.gz: ae244e0545f7de1c2c96adc9aff32839d3d9a91e4622b595240bc6788acd7279
5
5
  SHA512:
6
- metadata.gz: 586635d023e843dbcc27e48669b5421f9e1488d90770f062a55e02328cec114753c5e8c94ba8b2afcb1d8ddace38eff746ffb3357bfdf27efd999d9c33edc388
7
- data.tar.gz: 3aca765800907870df8a5fe377ab7211be5293f244c7b140ed6ca6de7f0588589b4f76e8e8258fc1da8b8e8d136126de6f873579ae91136c5c60178d2951e416
6
+ metadata.gz: d3fee2d250ed1b1f0a4aa4dd5bf3ea86435b1113ca9776094121f6509f3da2b7f10f0bbdb75b312b7a1a71be71f57f03fcb6c3e9614f62cda4d50df8315a2cc5
7
+ data.tar.gz: 67cf5ff660de4c7bac4a9787dd0c896d491eae3bceed1ab93023dead14a3489b19827e5270d453c950d09c990216c42cb645c4ca59ffb5a0f66679357acc609d
@@ -84,9 +84,6 @@ module Sass
84
84
  importer: [])
85
85
  raise ArgumentError, 'either data or file must be set' if file.nil? && data.nil?
86
86
 
87
- require 'pathname'
88
- require 'uri'
89
-
90
87
  start = now
91
88
 
92
89
  indent_type = parse_indent_type(indent_type)
@@ -215,7 +212,6 @@ module Sass
215
212
  source_map_root:)
216
213
  return if map.nil? || map.empty?
217
214
 
218
- require 'base64'
219
215
  require 'json'
220
216
 
221
217
  map_data = JSON.parse(map)
@@ -272,6 +268,8 @@ module Sass
272
268
 
273
269
  unless map.nil? || omit_source_map_url == true
274
270
  url = if source_map_embed
271
+ require 'base64'
272
+
275
273
  "data:application/json;base64,#{Base64.strict_encode64(map)}"
276
274
  elsif out_file
277
275
  relative_path(File.dirname(out_file), source_map)
@@ -327,6 +325,8 @@ module Sass
327
325
 
328
326
  # @deprecated
329
327
  def relative_path(from, to)
328
+ require 'pathname'
329
+
330
330
  Pathname.new(File.absolute_path(to)).relative_path_from(Pathname.new(File.absolute_path(from))).to_s
331
331
  end
332
332
 
@@ -380,23 +380,23 @@ module Sass
380
380
 
381
381
  def path_to_file_url(path)
382
382
  if File.absolute_path? path
383
- uri_parser.escape "#{FILE_SCHEME}#{Gem.win_platform? ? '/' : ''}#{path}"
383
+ Url.uri_parser.escape "#{FILE_SCHEME}#{Gem.win_platform? ? '/' : ''}#{path}"
384
384
  else
385
- uri_parser.escape path
385
+ Url.uri_parser.escape path
386
386
  end
387
387
  end
388
388
 
389
389
  def file_url_to_path(url)
390
390
  if url.start_with? FILE_SCHEME
391
- uri_parser.unescape url[(FILE_SCHEME.length + (Gem.win_platform? ? 1 : 0))..]
391
+ Url.uri_parser.unescape url[(FILE_SCHEME.length + (Gem.win_platform? ? 1 : 0))..]
392
392
  else
393
- uri_parser.unescape url
393
+ Url.uri_parser.unescape url
394
394
  end
395
395
  end
396
396
 
397
- private
398
-
399
397
  def uri_parser
398
+ require 'uri'
399
+
400
400
  @uri_parser ||= URI::Parser.new({ RESERVED: ';/?:@&=+$,' })
401
401
  end
402
402
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '0.19.3'
5
+ VERSION = '0.19.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.3
4
+ version: 0.19.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -163,8 +163,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
163
163
  licenses:
164
164
  - MIT
165
165
  metadata:
166
- documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.19.3
167
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.19.3
166
+ documentation_uri: https://www.rubydoc.info/gems/sass-embedded/0.19.4
167
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.19.4
168
168
  funding_uri: https://github.com/sponsors/ntkme
169
169
  post_install_message:
170
170
  rdoc_options: []