sass-embedded 1.77.4 → 1.77.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b678aeab3d406b469bb33ecc231500cd4d3b4eafab5bfe9f24f00c9412cd9aa8
4
- data.tar.gz: 471e5888f914555a28fe03c0c53ab997f004112ecfa7d0fb11cceb227378098f
3
+ metadata.gz: a4867f6d4f0c72a82099760e3e30f978a3d8a3f7481e6b278de15932ba78abe9
4
+ data.tar.gz: 3a8715387e91dc208b7252dedc3d695f1b9042d473aefe1ff9e9a7c86adce923
5
5
  SHA512:
6
- metadata.gz: f6d1066c1d79804a0c9dc1b857e718140bd6f9082d6d76eb70a33c593788950a4260fbb2a7578b45aa98baf8d16e0b6f98fbe59863749c04380c0ea90b6e1af4
7
- data.tar.gz: b70719cf808db2f2b777e7b3d04025372f00d6a027c74ab60635a6cbcb9d3b5977547012062b479b3ce42399510c5e9fe19f5fcb36ecefc029cfa7373f5d77fc
6
+ metadata.gz: 6122e3ca0bcdd1f6c0a020b17579f8762726ea7eb6b4d2ca80db93bff490820d37960d162d229ec612e39199e1de5353d46ad2d0dbd4f0552249f6c09a75ec78
7
+ data.tar.gz: e5f4c8007b71629eeb55292ff384c3e86003a5b214381ce361286ce83d379388b4c800a9c9452f503bac0a2c78d0e9c183591da65cec52bced86b60843657cf3
data/ext/sass/Rakefile CHANGED
@@ -138,7 +138,7 @@ module FileUtils
138
138
  def fetch(source_uri, dest_path = nil)
139
139
  require 'rubygems/remote_fetcher'
140
140
 
141
- source_uri = "/#{source_uri}" if File.absolute_path?(source_uri) && !source_uri.start_with?('/')
141
+ source_uri = "/#{source_uri}" if !source_uri.start_with?('/') && File.absolute_path?(source_uri)
142
142
 
143
143
  source_uri = begin
144
144
  Gem::Uri.parse!(source_uri)
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "sass": "1.77.4"
3
+ "sass": "1.77.8"
4
4
  }
5
5
  }
@@ -24,21 +24,24 @@ module Sass
24
24
 
25
25
  @stdin.binmode
26
26
 
27
- @wait_thread.name = "sass-embedded-process-waiter-#{@wait_thread.pid}"
28
- end
27
+ # # https://dart.dev/tools/dart-devtools
28
+ # if 'dart' == File.basename(CLI::COMMAND.first, '.exe') && CLI::COMMAND.include?('--observe')
29
+ # Kernel.warn(@stdout.readline, uplevel: 0)
30
+ # Kernel.warn(@stdout.readline, uplevel: 0)
31
+ # end
29
32
 
30
- def listen(dispatcher)
31
- Thread.new do
32
- Thread.current.name = "sass-embedded-process-stdout-poller-#{@wait_thread.pid}"
33
+ @stdout.binmode
33
34
 
34
- # # https://dart.dev/tools/dart-devtools
35
- # if 'dart' == File.basename(CLI::COMMAND.first, '.exe') && CLI::COMMAND.include?('--observe')
36
- # Kernel.warn(@stdout.readline, uplevel: 0)
37
- # Kernel.warn(@stdout.readline, uplevel: 0)
38
- # end
35
+ @wait_thread.name = "sass-embedded-process-waiter-#{id}"
36
+ end
39
37
 
40
- @stdout.binmode
38
+ def id
39
+ @wait_thread.pid
40
+ end
41
41
 
42
+ def listen(dispatcher)
43
+ Thread.new do
44
+ Thread.current.name = "sass-embedded-process-stdout-poller-#{id}"
42
45
  loop do
43
46
  length = Varint.read(@stdout)
44
47
  id = Varint.read(@stdout)
@@ -53,7 +56,7 @@ module Sass
53
56
  end
54
57
 
55
58
  Thread.new do
56
- Thread.current.name = "sass-embedded-process-stderr-poller-#{@wait_thread.pid}"
59
+ Thread.current.name = "sass-embedded-process-stderr-poller-#{id}"
57
60
  loop do
58
61
  Kernel.warn(@stderr.readline, uplevel: 0)
59
62
  end
@@ -10,21 +10,11 @@ module Sass
10
10
  def initialize(logger)
11
11
  logger = Structifier.to_struct(logger, :debug, :warn)
12
12
 
13
- if logger.respond_to?(:debug)
14
- define_singleton_method(:debug) do |event|
15
- logger.debug(event.message,
16
- span: event.span.nil? ? nil : Logger::SourceSpan.new(event.span))
17
- end
18
- end
13
+ { debug: DebugContext, warn: WarnContext }.each do |symbol, context_class|
14
+ next unless logger.respond_to?(symbol)
19
15
 
20
- if logger.respond_to?(:warn) # rubocop:disable Style/GuardClause
21
- define_singleton_method(:warn) do |event|
22
- deprecation = event.type == :DEPRECATION_WARNING
23
- logger.warn(event.message,
24
- deprecation:,
25
- deprecation_type: (event.deprecation_type if deprecation),
26
- span: event.span.nil? ? nil : Logger::SourceSpan.new(event.span),
27
- stack: event.stack_trace)
16
+ define_singleton_method(symbol) do |event|
17
+ logger.public_send(symbol, event.message, context_class.new(event))
28
18
  end
29
19
  end
30
20
  end
@@ -49,6 +39,39 @@ module Sass
49
39
  def warn(event)
50
40
  Kernel.warn(event.formatted)
51
41
  end
42
+
43
+ # Contextual information passed to `debug`.
44
+ class DebugContext
45
+ # @return [Logger::SourceSpan, nil]
46
+ attr_reader :span
47
+
48
+ def initialize(event)
49
+ @span = event.span.nil? ? nil : Logger::SourceSpan.new(event.span)
50
+ end
51
+ end
52
+
53
+ private_constant :DebugContext
54
+
55
+ # Contextual information passed to `warn`.
56
+ class WarnContext < DebugContext
57
+ # @return [Boolean]
58
+ attr_reader :deprecation
59
+
60
+ # @return [String, nil]
61
+ attr_reader :deprecation_type
62
+
63
+ # @return [String]
64
+ attr_reader :stack
65
+
66
+ def initialize(event)
67
+ super
68
+ @deprecation = event.type == :DEPRECATION_WARNING
69
+ @deprecation_type = (event.deprecation_type if @deprecation)
70
+ @stack = event.stack_trace
71
+ end
72
+ end
73
+
74
+ private_constant :WarnContext
52
75
  end
53
76
 
54
77
  private_constant :LoggerRegistry
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  module Embedded
5
- VERSION = '1.77.4'
5
+ VERSION = '1.77.8'
6
6
  end
7
7
  end
data/lib/sass/embedded.rb CHANGED
@@ -63,7 +63,7 @@ module Sass
63
63
  @last_accessed_time = current_time
64
64
 
65
65
  Thread.new do
66
- Thread.current.name = 'sass-embedded-process-reaper'
66
+ Thread.current.name = "sass-embedded-connection-reaper-#{@connection.id}"
67
67
  duration = idle_timeout
68
68
  loop do
69
69
  sleep(duration.negative? ? idle_timeout : duration)
@@ -61,6 +61,7 @@ module Sass
61
61
  end
62
62
 
63
63
  # An exception thrown by Sass Script.
64
+ # @!visibility private
64
65
  class ScriptError < StandardError
65
66
  def initialize(message, name = nil)
66
67
  super(name.nil? ? message : "$#{name}: #{message}")
@@ -18,9 +18,9 @@ module Sass
18
18
  module Silent
19
19
  module_function
20
20
 
21
- def warn(message, deprecation: false, deprecation_type: nil, span: nil, stack: nil); end
21
+ def warn(message, options); end
22
22
 
23
- def debug(message, span: nil); end
23
+ def debug(message, options); end
24
24
  end
25
25
 
26
26
  private_constant :Silent
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.77.4
4
+ version: 1.77.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-31 00:00:00.000000000 Z
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -28,22 +28,16 @@ dependencies:
28
28
  name: google-protobuf
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '3.25'
34
- - - "<"
31
+ - - "~>"
35
32
  - !ruby/object:Gem::Version
36
- version: '5.0'
33
+ version: '4.26'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '3.25'
44
- - - "<"
38
+ - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '5.0'
40
+ version: '4.26'
47
41
  description: A Ruby library that will communicate with Embedded Dart Sass using the
48
42
  Embedded Sass protocol.
49
43
  email:
@@ -107,8 +101,8 @@ licenses:
107
101
  - MIT
108
102
  metadata:
109
103
  bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
110
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.77.4
111
- source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.77.4
104
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.77.8
105
+ source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.77.8
112
106
  funding_uri: https://github.com/sponsors/ntkme
113
107
  rubygems_mfa_required: 'true'
114
108
  post_install_message:
@@ -126,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
120
  - !ruby/object:Gem::Version
127
121
  version: '0'
128
122
  requirements: []
129
- rubygems_version: 3.5.11
123
+ rubygems_version: 3.5.15
130
124
  signing_key:
131
125
  specification_version: 4
132
126
  summary: Use dart-sass with Ruby!