sass-embedded 1.89.2 → 1.90.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 +4 -4
- data/ext/sass/Rakefile +21 -56
- data/ext/sass/package.json +1 -1
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/value/color.rb +4 -4
- metadata +4 -5
- data/ext/sass/expand-archive.ps1 +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e00ec9ef4aaf921daad6c5c17469d6bc840fced53dd5aecdc100eb3ebf5fe6eb
|
4
|
+
data.tar.gz: 804488b84ae0a8edfcda048aa8742e2fd27103e7cdbb24f7f0711e66dbccc454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bc263de73dccc9732a7d9bfbca69112e5a0aab716eda4a69ce845f1b7e6ab4aa5ff563cb7caa60141e5ee1df69dec9ea4800b4a2ca11ce6b3e74fa87b0ef5ec
|
7
|
+
data.tar.gz: 7b7f06c15ebd95bc772f6ded3bf96f8b67d9e41af2d9830a11e143b5ba191f1e0f62ea7bb82621726c928768258becafb724496401731a3e46a497457d6937cf
|
data/ext/sass/Rakefile
CHANGED
@@ -288,64 +288,14 @@ end
|
|
288
288
|
# This is a FileUtils extension that defines several additional commands to be
|
289
289
|
# added to the FileUtils utility functions.
|
290
290
|
module FileUtils
|
291
|
-
# PowerShell quirks:
|
292
|
-
# - `powershell -Command -`:
|
293
|
-
# Arguments must be part of command, thus cannot pass arguments safely without escaping.
|
294
|
-
# - `powershell -Command <script-block> [-args <arg-array>]`:
|
295
|
-
# This only works when invoking powershell subshell in powershell.
|
296
|
-
# - `powershell -Command <string> [<CommandParameters>]`:
|
297
|
-
# CommandParameters are joined with command and then parsed, thus cannot pass arguments safely without escaping.
|
298
|
-
# - `powershell -File -`:
|
299
|
-
# Arguments must be part of file, thus cannot pass arguments safely without escaping.
|
300
|
-
# - `powershell -File <filePath> <args>`:
|
301
|
-
# This is the only way to pass arguments safely without escaping.
|
302
|
-
def powershell(file, *args)
|
303
|
-
sh 'powershell', '-NoLogo', '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', file, *args
|
304
|
-
end
|
305
|
-
|
306
|
-
def junzip(archive, dest = '.')
|
307
|
-
require 'java'
|
308
|
-
|
309
|
-
Rake.rake_output_message "Archive: #{archive}" if Rake::FileUtilsExt.verbose_flag
|
310
|
-
|
311
|
-
current_directory = java.nio.file.Paths.get(org.jruby.Ruby.getGlobalRuntime.getCurrentDirectory)
|
312
|
-
zip_file = java.util.zip.ZipFile.new(current_directory.resolve(archive).toFile)
|
313
|
-
dest_path = current_directory.resolve(dest).normalize
|
314
|
-
entries = zip_file.entries
|
315
|
-
while entries.hasMoreElements
|
316
|
-
entry = entries.nextElement
|
317
|
-
name = entry.getName
|
318
|
-
path = dest_path.resolve(name).normalize
|
319
|
-
raise SecurityError unless path.startsWith(dest_path)
|
320
|
-
|
321
|
-
Rake.rake_output_message " inflating: #{name}" if Rake::FileUtilsExt.verbose_flag
|
322
|
-
|
323
|
-
if entry.isDirectory
|
324
|
-
java.nio.file.Files.createDirectories(path)
|
325
|
-
else
|
326
|
-
java.nio.file.Files.createDirectories(path.getParent)
|
327
|
-
java.nio.file.Files.copy(zip_file.getInputStream(entry), path)
|
328
|
-
end
|
329
|
-
end
|
330
|
-
ensure
|
331
|
-
zip_file&.close
|
332
|
-
end
|
333
|
-
|
334
291
|
def unarchive(archive, dest = '.')
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
if RUBY_PLATFORM == 'java'
|
341
|
-
junzip archive, dest
|
342
|
-
elsif Gem.win_platform?
|
343
|
-
powershell 'expand-archive.ps1', '-Force', '-LiteralPath', archive, '-DestinationPath', dest
|
344
|
-
else
|
345
|
-
sh 'unzip', '-od', dest, archive
|
346
|
-
end
|
292
|
+
mkdir_p dest
|
293
|
+
if Gem.win_platform?
|
294
|
+
sh File.absolute_path('tar.exe', SassConfig.windows_get_folder_path(:System)), '-vxC', dest, '-f', archive
|
295
|
+
elsif archive.downcase.end_with?('.zip')
|
296
|
+
sh 'unzip', '-od', dest, archive
|
347
297
|
else
|
348
|
-
|
298
|
+
sh 'tar', '-vxC', dest, '-f', archive, '--no-same-owner', '--no-same-permissions'
|
349
299
|
end
|
350
300
|
end
|
351
301
|
|
@@ -743,4 +693,19 @@ module SassConfig
|
|
743
693
|
platform
|
744
694
|
end
|
745
695
|
end
|
696
|
+
|
697
|
+
def windows_get_folder_path(folder)
|
698
|
+
require 'open3'
|
699
|
+
|
700
|
+
stdout, stderr, status = Open3.capture3('powershell.exe',
|
701
|
+
'-NoLogo',
|
702
|
+
'-NoProfile',
|
703
|
+
'-NonInteractive',
|
704
|
+
'-Command',
|
705
|
+
"[Environment]::GetFolderPath('#{folder}') | Write-Host -NoNewline")
|
706
|
+
|
707
|
+
raise stderr unless status.success?
|
708
|
+
|
709
|
+
File.absolute_path(stdout)
|
710
|
+
end
|
746
711
|
end
|
data/ext/sass/package.json
CHANGED
data/lib/sass/value/color.rb
CHANGED
@@ -421,9 +421,9 @@ module Sass
|
|
421
421
|
def _in_gamut?
|
422
422
|
return true unless _space.bounded?
|
423
423
|
|
424
|
-
_is_channel_in_gamut(channel0, _space.channels[0]) &&
|
425
|
-
_is_channel_in_gamut(channel1, _space.channels[1]) &&
|
426
|
-
_is_channel_in_gamut(channel2, _space.channels[2])
|
424
|
+
_is_channel_in_gamut?(channel0, _space.channels[0]) &&
|
425
|
+
_is_channel_in_gamut?(channel1, _space.channels[1]) &&
|
426
|
+
_is_channel_in_gamut?(channel2, _space.channels[2])
|
427
427
|
end
|
428
428
|
|
429
429
|
def _to_gamut(method)
|
@@ -485,7 +485,7 @@ module Sass
|
|
485
485
|
((hue % 360) + 360 + (invert ? 180 : 0)) % 360
|
486
486
|
end
|
487
487
|
|
488
|
-
def _is_channel_in_gamut(value, channel)
|
488
|
+
def _is_channel_in_gamut?(value, channel)
|
489
489
|
case channel
|
490
490
|
when LinearChannel
|
491
491
|
FuzzyMath.less_than_or_equals?(value, channel.max) && FuzzyMath.greater_than_or_equals?(value, channel.min)
|
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: 1.
|
4
|
+
version: 1.90.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
@@ -52,7 +52,6 @@ files:
|
|
52
52
|
- exe/sass
|
53
53
|
- ext/sass/Rakefile
|
54
54
|
- ext/sass/embedded_sass_pb.rb
|
55
|
-
- ext/sass/expand-archive.ps1
|
56
55
|
- ext/sass/package.json
|
57
56
|
- lib/sass-embedded.rb
|
58
57
|
- lib/sass/calculation_value.rb
|
@@ -124,8 +123,8 @@ licenses:
|
|
124
123
|
- MIT
|
125
124
|
metadata:
|
126
125
|
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
127
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.
|
128
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.
|
126
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.90.0
|
127
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.90.0
|
129
128
|
funding_uri: https://github.com/sponsors/ntkme
|
130
129
|
rubygems_mfa_required: 'true'
|
131
130
|
rdoc_options: []
|
@@ -142,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
141
|
- !ruby/object:Gem::Version
|
143
142
|
version: '0'
|
144
143
|
requirements: []
|
145
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.7.1
|
146
145
|
specification_version: 4
|
147
146
|
summary: Use dart-sass with Ruby!
|
148
147
|
test_files: []
|
data/ext/sass/expand-archive.ps1
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Expand-Archive @args
|