sass-embedded 1.56.1 → 1.56.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/ext/sass/Rakefile +1 -1
- data/ext/sass/package.json +1 -1
- data/lib/sass/embedded/async.rb +3 -10
- data/lib/sass/embedded/dispatcher.rb +1 -7
- data/lib/sass/embedded/host/function_registry.rb +2 -3
- data/lib/sass/embedded/host/importer_registry.rb +0 -4
- data/lib/sass/embedded/host/value_protofier.rb +1 -1
- data/lib/sass/embedded/host.rb +19 -11
- data/lib/sass/embedded/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5155d78cb3b9e12472d7ed30ef80b64ba5c1c6a79dfc2a598bc541b016ebe21
|
4
|
+
data.tar.gz: 1b32917d9dfc5cd04e4ef01f2e42d2bcf9a5e00a6f7b4901da7212d0185d3cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6bd3d16145e3b04b111277b05f3305a7f8f073f387a35289fb1294fb1b8af79ee57bc3db2def6303a781e6838922891ac5876ea71d1eff3724b4e18fc5502a1
|
7
|
+
data.tar.gz: 40a189c8bce5aa1c9c981c002fc567923b1eb521e84e8622a589ae1a526b3a522afc81d4cc321c372b366497f7529e36887956a9ed9b392bfd5ab05f241a3196
|
data/ext/sass/Rakefile
CHANGED
@@ -105,7 +105,7 @@ module FileUtils
|
|
105
105
|
if RUBY_PLATFORM == 'java'
|
106
106
|
junzip archive, dest
|
107
107
|
elsif Gem.win_platform?
|
108
|
-
powershell 'expand-archive.ps1', '-Force', '-LiteralPath', archive, '-DestinationPath', dest
|
108
|
+
powershell 'expand-archive.ps1', '-Force', '-LiteralPath', archive, '-DestinationPath', dest
|
109
109
|
else
|
110
110
|
sh 'unzip', '-od', dest, archive
|
111
111
|
end
|
data/ext/sass/package.json
CHANGED
data/lib/sass/embedded/async.rb
CHANGED
@@ -15,26 +15,19 @@ module Sass
|
|
15
15
|
private_constant :State
|
16
16
|
|
17
17
|
def initialize
|
18
|
-
@error = nil
|
19
18
|
@result = nil
|
20
19
|
@state = State::PENDING
|
21
20
|
|
22
21
|
@condition_variable = ConditionVariable.new
|
23
22
|
@mutex = Mutex.new
|
24
|
-
|
25
|
-
begin
|
26
|
-
yield if block_given?
|
27
|
-
rescue StandardError => e
|
28
|
-
reject e
|
29
|
-
end
|
30
23
|
end
|
31
24
|
|
32
25
|
def resolve(value)
|
33
26
|
@mutex.synchronize do
|
34
27
|
return unless @state == State::PENDING
|
35
28
|
|
36
|
-
@state = State::FULFILLED
|
37
29
|
@result = value
|
30
|
+
@state = State::FULFILLED
|
38
31
|
@condition_variable.broadcast
|
39
32
|
end
|
40
33
|
end
|
@@ -43,8 +36,8 @@ module Sass
|
|
43
36
|
@mutex.synchronize do
|
44
37
|
return unless @state == State::PENDING
|
45
38
|
|
39
|
+
@result = reason
|
46
40
|
@state = State::REJECTED
|
47
|
-
@error = reason
|
48
41
|
@condition_variable.broadcast
|
49
42
|
end
|
50
43
|
end
|
@@ -53,7 +46,7 @@ module Sass
|
|
53
46
|
@mutex.synchronize do
|
54
47
|
@condition_variable.wait(@mutex) if @state == State::PENDING
|
55
48
|
|
56
|
-
raise @
|
49
|
+
raise @result if @state == State::REJECTED
|
57
50
|
|
58
51
|
@result
|
59
52
|
end
|
@@ -70,13 +70,7 @@ module Sass
|
|
70
70
|
when :error
|
71
71
|
@mutex.synchronize do
|
72
72
|
@id = PROTOCOL_ERROR_ID
|
73
|
-
|
74
|
-
[]
|
75
|
-
elsif message.id == PROTOCOL_ERROR_ID
|
76
|
-
@observers.values
|
77
|
-
else
|
78
|
-
[@observers[message.id]]
|
79
|
-
end
|
73
|
+
message.id == PROTOCOL_ERROR_ID ? @observers.values : [@observers[message.id]]
|
80
74
|
end.each do |observer|
|
81
75
|
observer.public_send(oneof, message)
|
82
76
|
end
|
@@ -14,12 +14,11 @@ module Sass
|
|
14
14
|
|
15
15
|
@global_functions = functions.keys
|
16
16
|
@functions_by_name = functions.transform_keys do |signature|
|
17
|
-
signature = signature.chomp
|
18
17
|
index = signature.index('(')
|
19
18
|
if index
|
20
|
-
signature.slice(0, index)
|
19
|
+
signature.slice(0, index).chomp
|
21
20
|
else
|
22
|
-
signature
|
21
|
+
signature.chomp
|
23
22
|
end
|
24
23
|
end
|
25
24
|
|
@@ -86,10 +86,6 @@ module Sass
|
|
86
86
|
importer = @importers_by_id[file_import_request.importer_id]
|
87
87
|
file_url = importer.find_file_url(file_import_request.url, from_import: file_import_request.from_import)&.to_s
|
88
88
|
|
89
|
-
if !file_url.nil? && !file_url.start_with?('file:')
|
90
|
-
raise "file_url must be a file: URL, was #{file_url.inspect}"
|
91
|
-
end
|
92
|
-
|
93
89
|
EmbeddedProtocol::InboundMessage::FileImportResponse.new(
|
94
90
|
id: file_import_request.id,
|
95
91
|
file_url: file_url
|
@@ -180,7 +180,7 @@ module Sass
|
|
180
180
|
when :compiler_function
|
181
181
|
Sass::Value::Function.new(obj.id)
|
182
182
|
when :host_function
|
183
|
-
raise
|
183
|
+
raise Sass::ScriptError, 'The compiler may not send Value.host_function to host'
|
184
184
|
when :singleton
|
185
185
|
case obj
|
186
186
|
when :TRUE
|
data/lib/sass/embedded/host.rb
CHANGED
@@ -15,14 +15,6 @@ module Sass
|
|
15
15
|
@channel = channel
|
16
16
|
end
|
17
17
|
|
18
|
-
def id
|
19
|
-
@connection.id
|
20
|
-
end
|
21
|
-
|
22
|
-
def send_message(**kwargs)
|
23
|
-
@connection.send_message(**kwargs)
|
24
|
-
end
|
25
|
-
|
26
18
|
def compile_request(path:,
|
27
19
|
source:,
|
28
20
|
importer:,
|
@@ -85,11 +77,11 @@ module Sass
|
|
85
77
|
end
|
86
78
|
|
87
79
|
def compile_response(message)
|
88
|
-
|
80
|
+
resolve(message)
|
89
81
|
end
|
90
82
|
|
91
83
|
def version_response(message)
|
92
|
-
|
84
|
+
resolve(message)
|
93
85
|
end
|
94
86
|
|
95
87
|
def canonicalize_request(message)
|
@@ -109,7 +101,7 @@ module Sass
|
|
109
101
|
end
|
110
102
|
|
111
103
|
def error(message)
|
112
|
-
|
104
|
+
reject(CompileError.new(message.message, nil, nil, nil))
|
113
105
|
end
|
114
106
|
|
115
107
|
private
|
@@ -122,6 +114,22 @@ module Sass
|
|
122
114
|
ensure
|
123
115
|
@connection&.disconnect
|
124
116
|
end
|
117
|
+
|
118
|
+
def resolve(value)
|
119
|
+
@async.resolve(value)
|
120
|
+
end
|
121
|
+
|
122
|
+
def reject(reason)
|
123
|
+
@async.reject(reason)
|
124
|
+
end
|
125
|
+
|
126
|
+
def id
|
127
|
+
@connection.id
|
128
|
+
end
|
129
|
+
|
130
|
+
def send_message(**kwargs)
|
131
|
+
@connection.send_message(**kwargs)
|
132
|
+
end
|
125
133
|
end
|
126
134
|
|
127
135
|
private_constant :Host
|
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.56.
|
4
|
+
version: 1.56.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.40.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.40.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop-performance
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,8 +160,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
160
160
|
licenses:
|
161
161
|
- MIT
|
162
162
|
metadata:
|
163
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.56.
|
164
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.56.
|
163
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.56.2
|
164
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.56.2
|
165
165
|
funding_uri: https://github.com/sponsors/ntkme
|
166
166
|
post_install_message:
|
167
167
|
rdoc_options: []
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
|
-
rubygems_version: 3.3.
|
181
|
+
rubygems_version: 3.3.26
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Use dart-sass with Ruby!
|