sass-embedded 1.90.0 → 1.91.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: e00ec9ef4aaf921daad6c5c17469d6bc840fced53dd5aecdc100eb3ebf5fe6eb
4
- data.tar.gz: 804488b84ae0a8edfcda048aa8742e2fd27103e7cdbb24f7f0711e66dbccc454
3
+ metadata.gz: b86edb0f5fc64eaed25b369b4d4a2fa596255f8d41a21109f3a83fcfebd528a1
4
+ data.tar.gz: 3059faf9da290fe6a1ca108820190d378d4c9ef5973a8da53e9fe1e03a58c951
5
5
  SHA512:
6
- metadata.gz: 9bc263de73dccc9732a7d9bfbca69112e5a0aab716eda4a69ce845f1b7e6ab4aa5ff563cb7caa60141e5ee1df69dec9ea4800b4a2ca11ce6b3e74fa87b0ef5ec
7
- data.tar.gz: 7b7f06c15ebd95bc772f6ded3bf96f8b67d9e41af2d9830a11e143b5ba191f1e0f62ea7bb82621726c928768258becafb724496401731a3e46a497457d6937cf
6
+ metadata.gz: b04d824ffcd30038cf6409f3f235725ca3db972d9e1226cc4cc7fda17debc891ed5d3bdeb9bbe546cc080e758ec94a49b4fdb8c33fc5c7444178ce6241c6214a
7
+ data.tar.gz: e9a20af1c74c4595afebaa176dc4bae0a5dcfaed5ba77237af5f530ff3f53ac8a84913810ae15cc2d64d525b6c9d1a0eb4bd9c51b7eab4c22e630a0e5395e388
data/ext/sass/Rakefile CHANGED
@@ -209,17 +209,6 @@ file 'true' do |t|
209
209
  # 40007a: b8 3c 00 00 00 movl $0x3c, %eax
210
210
  # 40007f: 0f 05 syscall
211
211
  entry_point = %w[31ffb83c0000000f05].pack('H*')
212
- when 'i386'
213
- ei_class = ELF::ELFCLASS32
214
- ei_data = ELF::ELFDATA2LSB
215
- e_machine = 0x03
216
- e_flags = 0
217
-
218
- # 00400054 <PT_LOAD#0>:
219
- # 400054: 31 db xorl %ebx, %ebx
220
- # 400056: b8 01 00 00 00 movl $0x1, %eax
221
- # 40005b: cd 80 int $0x80
222
- entry_point = %w[31dbb801000000cd80].pack('H*')
223
212
  else
224
213
  raise NotImplementedError
225
214
  end
@@ -288,49 +277,23 @@ end
288
277
  # This is a FileUtils extension that defines several additional commands to be
289
278
  # added to the FileUtils utility functions.
290
279
  module FileUtils
291
- def unarchive(archive, dest = '.')
292
- mkdir_p dest
280
+ def unarchive(archive)
293
281
  if Gem.win_platform?
294
- sh File.absolute_path('tar.exe', SassConfig.windows_get_folder_path(:System)), '-vxC', dest, '-f', archive
282
+ sh File.absolute_path('tar.exe', Utils.windows_system_directory), '-vxf', archive
295
283
  elsif archive.downcase.end_with?('.zip')
296
- sh 'unzip', '-od', dest, archive
284
+ sh 'unzip', '-o', archive
297
285
  else
298
- sh 'tar', '-vxC', dest, '-f', archive, '--no-same-owner', '--no-same-permissions'
286
+ sh 'tar', '-vxf', archive, '--no-same-owner', '--no-same-permissions'
299
287
  end
300
288
  end
301
289
 
302
290
  def fetch(source_uri, dest_path = nil)
303
- require 'rubygems/remote_fetcher'
291
+ dest_path = File.basename(source_uri) if dest_path.nil?
304
292
 
305
- source_uri = "/#{source_uri}" if !source_uri.start_with?('/') && File.absolute_path?(source_uri)
306
-
307
- source_uri = begin
308
- Gem::Uri.parse!(source_uri)
309
- rescue NoMethodError
310
- begin
311
- URI.parse(source_uri)
312
- rescue StandardError
313
- URI.parse(URI::DEFAULT_PARSER.escape(source_uri.to_s))
314
- end
315
- end
316
-
317
- scheme = source_uri.scheme
318
- source_path = begin
319
- Gem::URI::DEFAULT_PARSER
320
- rescue NameError
321
- URI::DEFAULT_PARSER
322
- end.unescape(source_uri.path)
323
-
324
- dest_path = File.basename(source_path) if dest_path.nil?
325
-
326
- fetcher = Gem::RemoteFetcher.fetcher
327
- symbol = :"fetch_#{scheme.nil? ? 'file' : scheme}"
328
- raise ArgumentError, "Unsupported URI scheme #{scheme}" unless fetcher.respond_to?(symbol)
329
-
330
- Rake.rake_output_message "fetch #{Gem::Uri.new(source_uri).redacted}" if Rake::FileUtilsExt.verbose_flag
293
+ Rake.rake_output_message "fetch #{source_uri}" if Rake::FileUtilsExt.verbose_flag
331
294
 
332
295
  unless Rake::FileUtilsExt.nowrite_flag
333
- data = fetcher.public_send(symbol, source_uri)
296
+ data = Utils.fetch_https(source_uri)
334
297
  Gem.write_binary(dest_path, data)
335
298
  end
336
299
 
@@ -414,9 +377,7 @@ module Platform
414
377
  (Platform::CPU == 'riscv64' &&
415
378
  File.exist?(File.absolute_path('lib/ld-linux-riscv64-lp64d.so.1', root))) ||
416
379
  (Platform::CPU == 'x86_64' &&
417
- File.exist?(File.absolute_path('lib64/ld-linux-x86-64.so.2', root))) ||
418
- (Platform::CPU == 'i386' &&
419
- File.exist?(File.absolute_path('lib/ld-linux.so.2', root)))
380
+ File.exist?(File.absolute_path('lib64/ld-linux-x86-64.so.2', root)))
420
381
  return 'linux-gnu'
421
382
  end
422
383
 
@@ -425,7 +386,7 @@ module Platform
425
386
  return 'linux-gnueabihf'
426
387
  end
427
388
 
428
- if %w[aarch64 riscv64 x86_64 i386].include?(Platform::CPU) &&
389
+ if %w[aarch64 riscv64 x86_64].include?(Platform::CPU) &&
429
390
  File.exist?(File.absolute_path("lib/ld-musl-#{Platform::CPU}.so.1", root))
430
391
  return 'linux-musl'
431
392
  end
@@ -435,10 +396,8 @@ module Platform
435
396
  return 'linux-musleabihf'
436
397
  end
437
398
 
438
- if (%w[aarch64 riscv64 x86_64].include?(Platform::CPU) &&
439
- File.exist?(File.absolute_path('system/bin/linker64', root))) ||
440
- (Platform::CPU == 'i386' &&
441
- File.exist?(File.absolute_path('system/bin/linker', root)))
399
+ if %w[aarch64 riscv64 x86_64].include?(Platform::CPU) &&
400
+ File.exist?(File.absolute_path('system/bin/linker64', root))
442
401
  return 'linux-android'
443
402
  end
444
403
 
@@ -575,8 +534,6 @@ module SassConfig
575
534
  end
576
535
 
577
536
  def protoc
578
- require 'rubygems/remote_fetcher'
579
-
580
537
  repo = 'https://repo.maven.apache.org/maven2/com/google/protobuf/protoc'
581
538
 
582
539
  dependency = Gem::Dependency.new('google-protobuf')
@@ -615,7 +572,7 @@ module SassConfig
615
572
 
616
573
  uri = "#{repo}/#{version}/protoc-#{version}-#{os}-#{cpu}.exe"
617
574
 
618
- Gem::RemoteFetcher.fetcher.fetch_https(Gem::Uri.new("#{uri}.sha1"))
575
+ Utils.fetch_https("#{uri}.sha1")
619
576
 
620
577
  uri
621
578
  rescue Gem::RemoteFetcher::FetchError
@@ -628,7 +585,7 @@ module SassConfig
628
585
  versions.sort.reverse_each do |v|
629
586
  uri = "#{repo}/#{v}/protoc-#{v}-#{os}-#{cpu}.exe"
630
587
 
631
- Gem::RemoteFetcher.fetcher.fetch_https(Gem::Uri.new("#{uri}.sha1"))
588
+ Utils.fetch_https("#{uri}.sha1")
632
589
 
633
590
  return uri
634
591
  rescue Gem::RemoteFetcher::FetchError
@@ -640,16 +597,13 @@ module SassConfig
640
597
 
641
598
  def embedded_sass_protocol
642
599
  require 'json'
643
- require 'open3'
644
-
645
- stdout, stderr, status = Open3.capture3(RbConfig.ruby,
646
- File.absolute_path('../../exe/sass', __dir__),
647
- '--embedded',
648
- '--version')
649
600
 
650
- raise stderr unless status.success?
601
+ version = Utils.capture(RbConfig.ruby,
602
+ File.absolute_path('../../exe/sass', __dir__),
603
+ '--embedded',
604
+ '--version')
651
605
 
652
- tag_name = JSON.parse(stdout)['protocolVersion']
606
+ tag_name = JSON.parse(version)['protocolVersion']
653
607
 
654
608
  "https://github.com/sass/sass/raw/embedded-protocol-#{tag_name}/spec/embedded_sass.proto"
655
609
  rescue StandardError # TODO: remove after https://github.com/sass/dart-sass/pull/2413
@@ -693,19 +647,42 @@ module SassConfig
693
647
  platform
694
648
  end
695
649
  end
650
+ end
696
651
 
697
- def windows_get_folder_path(folder)
652
+ # The {Utils} module.
653
+ module Utils
654
+ module_function
655
+
656
+ def capture(...)
698
657
  require 'open3'
699
658
 
700
- stdout, stderr, status = Open3.capture3('powershell.exe',
701
- '-NoLogo',
702
- '-NoProfile',
703
- '-NonInteractive',
704
- '-Command',
705
- "[Environment]::GetFolderPath('#{folder}') | Write-Host -NoNewline")
659
+ stdout, stderr, status = Open3.capture3(...)
706
660
 
707
661
  raise stderr unless status.success?
708
662
 
709
- File.absolute_path(stdout)
663
+ stdout
664
+ end
665
+
666
+ def fetch_https(source_uri)
667
+ require 'rubygems/remote_fetcher'
668
+
669
+ source_uri = begin
670
+ Gem::Uri.parse!(source_uri)
671
+ rescue NoMethodError
672
+ URI.parse(source_uri)
673
+ end
674
+
675
+ Gem::RemoteFetcher.fetcher.fetch_https(source_uri)
676
+ end
677
+
678
+ def windows_system_directory
679
+ path = capture('powershell.exe',
680
+ '-NoLogo',
681
+ '-NoProfile',
682
+ '-NonInteractive',
683
+ '-Command',
684
+ '[Environment]::GetFolderPath([Environment+SpecialFolder]::System) | Write-Host -NoNewline')
685
+
686
+ File.absolute_path(path)
710
687
  end
711
688
  end
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "sass": "1.90.0"
3
+ "sass": "1.91.0"
4
4
  }
5
5
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  module Embedded
5
- VERSION = '1.90.0'
5
+ VERSION = '1.91.0'
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: 1.90.0
4
+ version: 1.91.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
@@ -123,8 +123,8 @@ licenses:
123
123
  - MIT
124
124
  metadata:
125
125
  bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
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
126
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.91.0
127
+ source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.91.0
128
128
  funding_uri: https://github.com/sponsors/ntkme
129
129
  rubygems_mfa_required: 'true'
130
130
  rdoc_options: []