sass-embedded 1.0.18 → 1.0.21
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 +50 -46
- data/lib/sass/embedded/dispatcher.rb +6 -6
- data/lib/sass/embedded/host/importer_registry.rb +3 -1
- data/lib/sass/embedded/host/value_protofier.rb +3 -2
- data/lib/sass/embedded/protofier.rb +3 -2
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/value/number.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abdeb3585b53d503b0eeb292dcc7fa3f4354458e210804b0022975abf398dfa1
|
4
|
+
data.tar.gz: cd186b55f440381874f838a293b819dd24d3841859537c5734972175922ff052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba6c8a98aed591bfa886c31f3eaf212f71c6907c97188e5a0edc67fd300142b504360e01d347221953889c204306917b5a88b1af89b23139dc5b86221291bdda
|
7
|
+
data.tar.gz: a5e8011368137a29c1f590825b1dd549c2b934f45591f646732b40d39c393bc89b06998eab8cfa0f34b4cad16f6da9e6afc04dc1e230a43ae5e66bc77094d6f2
|
data/ext/sass/Rakefile
CHANGED
@@ -111,6 +111,8 @@ module Configuration
|
|
111
111
|
OS = case RbConfig::CONFIG['host_os'].downcase
|
112
112
|
when /darwin/
|
113
113
|
'darwin'
|
114
|
+
when /linux-musl/
|
115
|
+
'linux-musl'
|
114
116
|
when /linux/
|
115
117
|
'linux'
|
116
118
|
when *Gem::WIN_PATTERNS
|
@@ -119,23 +121,25 @@ module Configuration
|
|
119
121
|
RbConfig::CONFIG['host_os'].downcase
|
120
122
|
end
|
121
123
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
124
|
+
CPU = case RbConfig::CONFIG['host_cpu'].downcase
|
125
|
+
when /amd64|x86_64|x64/
|
126
|
+
'x86_64'
|
127
|
+
when /i\d86|x86|i86pc/
|
128
|
+
'i386'
|
129
|
+
when /arm64|aarch64/
|
130
|
+
'aarch64'
|
131
|
+
when /arm/
|
132
|
+
# Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin
|
133
|
+
OS == 'darwin' ? 'aarch64' : 'arm'
|
134
|
+
when /ppc64le|powerpc64le/
|
135
|
+
'powerpc64le'
|
136
|
+
when /s390x/
|
137
|
+
's390x'
|
138
|
+
else
|
139
|
+
RbConfig::CONFIG['host_cpu']
|
140
|
+
end
|
141
|
+
|
142
|
+
ARCH = "#{CPU}-#{OS}"
|
139
143
|
end
|
140
144
|
|
141
145
|
private_constant :Platform
|
@@ -151,7 +155,7 @@ module Configuration
|
|
151
155
|
|
152
156
|
tag_name = spec['dependencies']['sass-embedded']
|
153
157
|
|
154
|
-
message = "sass_embedded for #{Platform::
|
158
|
+
message = "sass_embedded for #{Platform::ARCH} not available at #{repo}/releases/tag/#{tag_name}"
|
155
159
|
|
156
160
|
os = case Platform::OS
|
157
161
|
when 'darwin'
|
@@ -164,20 +168,20 @@ module Configuration
|
|
164
168
|
raise NotImplementedError, message
|
165
169
|
end
|
166
170
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
171
|
+
cpu = case Platform::CPU
|
172
|
+
when 'i386'
|
173
|
+
'ia32'
|
174
|
+
when 'x86_64'
|
175
|
+
'x64'
|
176
|
+
when 'aarch64'
|
177
|
+
Platform::OS == 'darwin' ? 'x64' : 'arm64'
|
178
|
+
else
|
179
|
+
raise NotImplementedError, message
|
180
|
+
end
|
177
181
|
|
178
182
|
ext = Gem.win_platform? ? 'zip' : 'tar.gz'
|
179
183
|
|
180
|
-
"#{repo}/releases/download/#{tag_name}/sass_embedded-#{tag_name}-#{os}-#{
|
184
|
+
"#{repo}/releases/download/#{tag_name}/sass_embedded-#{tag_name}-#{os}-#{cpu}.#{ext}"
|
181
185
|
end
|
182
186
|
|
183
187
|
def default_protoc
|
@@ -185,7 +189,7 @@ module Configuration
|
|
185
189
|
|
186
190
|
version = Gem::Dependency.new('google-protobuf').to_spec.version
|
187
191
|
|
188
|
-
message = "protoc for #{Platform::
|
192
|
+
message = "protoc for #{Platform::ARCH} not available at #{repo}/#{version}"
|
189
193
|
|
190
194
|
os = case Platform::OS
|
191
195
|
when 'darwin'
|
@@ -198,22 +202,22 @@ module Configuration
|
|
198
202
|
raise NotImplementedError, message
|
199
203
|
end
|
200
204
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
"#{repo}/#{version}/protoc-#{version}-#{os}-#{
|
205
|
+
cpu = case Platform::CPU
|
206
|
+
when 'i386'
|
207
|
+
'x86_32'
|
208
|
+
when 'x86_64'
|
209
|
+
'x86_64'
|
210
|
+
when 'aarch64'
|
211
|
+
'aarch_64'
|
212
|
+
when 'powerpc64le'
|
213
|
+
'ppcle_64'
|
214
|
+
when 's390x'
|
215
|
+
's390_64'
|
216
|
+
else
|
217
|
+
raise NotImplementedError, message
|
218
|
+
end
|
219
|
+
|
220
|
+
"#{repo}/#{version}/protoc-#{version}-#{os}-#{cpu}.exe"
|
217
221
|
end
|
218
222
|
|
219
223
|
def default_sass_embedded_protocol
|
@@ -69,17 +69,17 @@ module Sass
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def receive_message(outbound_message)
|
72
|
-
|
73
|
-
|
74
|
-
case
|
72
|
+
oneof = outbound_message.message
|
73
|
+
message = outbound_message.public_send(oneof)
|
74
|
+
case oneof
|
75
75
|
when :error
|
76
76
|
half_close
|
77
|
-
@observers[message.id]&.
|
77
|
+
@observers[message.id]&.public_send(oneof, message)
|
78
78
|
when :compile_response, :version_response
|
79
|
-
@observers[message.id].
|
79
|
+
@observers[message.id].public_send(oneof, message)
|
80
80
|
when :log_event, :canonicalize_request, :import_request, :file_import_request, :function_call_request
|
81
81
|
Thread.new(@observers[message.compilation_id]) do |observer|
|
82
|
-
observer.
|
82
|
+
observer.public_send(oneof, message)
|
83
83
|
end
|
84
84
|
else
|
85
85
|
raise ArgumentError, "Unknown OutboundMessage.message #{message}"
|
@@ -85,7 +85,9 @@ module Sass
|
|
85
85
|
importer = @importers_by_id[file_import_request.importer_id]
|
86
86
|
file_url = importer.find_file_url(file_import_request.url, from_import: file_import_request.from_import)&.to_s
|
87
87
|
|
88
|
-
|
88
|
+
if !file_url.nil? && !file_url.start_with?('file:')
|
89
|
+
raise "file_url must be a file: URL, was #{file_url.inspect}"
|
90
|
+
end
|
89
91
|
|
90
92
|
EmbeddedProtocol::InboundMessage::FileImportResponse.new(
|
91
93
|
id: file_import_request.id,
|
@@ -9,8 +9,9 @@ module Sass
|
|
9
9
|
module_function
|
10
10
|
|
11
11
|
def from_proto_compile_response(compile_response)
|
12
|
-
|
13
|
-
|
12
|
+
oneof = compile_response.result
|
13
|
+
result = compile_response.public_send(oneof)
|
14
|
+
case oneof
|
14
15
|
when :failure
|
15
16
|
raise CompileError.new(
|
16
17
|
result.message,
|
data/lib/sass/value/number.rb
CHANGED
@@ -118,7 +118,7 @@ module Sass
|
|
118
118
|
# @return [Number]
|
119
119
|
# @raise [ScriptError]
|
120
120
|
def assert_unit(unit, name = nil)
|
121
|
-
raise error "Expected #{self} to have
|
121
|
+
raise error "Expected #{self} to have unit #{unit.inspect}", name unless unit?(unit)
|
122
122
|
|
123
123
|
self
|
124
124
|
end
|
@@ -244,7 +244,7 @@ module Sass
|
|
244
244
|
other: nil,
|
245
245
|
other_name: nil)
|
246
246
|
if other && (other.numerator_units != new_denominator_units && other.denominator_units != new_denominator_units)
|
247
|
-
raise error "Expect #{other} to have units #{unit_string(new_numerator_units, new_denominator_units)}"
|
247
|
+
raise error "Expect #{other} to have units #{unit_string(new_numerator_units, new_denominator_units).inspect}"
|
248
248
|
end
|
249
249
|
|
250
250
|
return value if numerator_units == new_numerator_units && denominator_units == new_denominator_units
|
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.0.
|
4
|
+
version: 1.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -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://www.rubydoc.info/gems/sass-embedded/1.0.
|
164
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.
|
163
|
+
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.21
|
164
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.21
|
165
165
|
funding_uri: https://github.com/sponsors/ntkme
|
166
166
|
post_install_message:
|
167
167
|
rdoc_options: []
|