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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b701a29895bdd5f8ff05a4a23d972b1db3a64c20e29a75e02f6e3d52e7db762a
4
- data.tar.gz: 900620c0e33b9ae961f231cb249b00a74d0306e74dfa06f35996571319e47328
3
+ metadata.gz: abdeb3585b53d503b0eeb292dcc7fa3f4354458e210804b0022975abf398dfa1
4
+ data.tar.gz: cd186b55f440381874f838a293b819dd24d3841859537c5734972175922ff052
5
5
  SHA512:
6
- metadata.gz: 8a5984ffbe81012da00d2b25101d4b8a850057684f880fb25a4c76041a2d93a79b8888919d61487fb74b4b4480e6be9b39f7ee2554408e62ad3fa6adb27a3341
7
- data.tar.gz: 6450eafe143ecb655308d8c3c859c2a90c013bd753495fd6b12db87bea4ccb9bd89c616957ed08e47ef3a04daf90437a41b1836cef01f609750b9663044a96a1
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
- ARCH = case RbConfig::CONFIG['host_cpu'].downcase
123
- when /amd64|x86_64|x64/
124
- 'x86_64'
125
- when /i\d86|x86|i86pc/
126
- 'i386'
127
- when /arm64|aarch64/
128
- 'aarch64'
129
- when /arm/
130
- # Ruby before 3.0 reports "arm" instead of "arm64" as host_cpu on darwin
131
- OS == 'darwin' ? 'aarch64' : 'arm'
132
- when /ppc64le|powerpc64le/
133
- 'powerpc64le'
134
- when /s390x/
135
- 's390x'
136
- else
137
- RbConfig::CONFIG['host_cpu']
138
- end
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::OS}/#{Platform::ARCH} not available at #{repo}/releases/tag/#{tag_name}"
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
- arch = case Platform::ARCH
168
- when 'i386'
169
- 'ia32'
170
- when 'x86_64'
171
- 'x64'
172
- when 'aarch64'
173
- Platform::OS == 'darwin' ? 'x64' : 'arm64'
174
- else
175
- raise NotImplementedError, message
176
- end
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}-#{arch}.#{ext}"
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::OS}/#{Platform::ARCH} not available at #{repo}/#{version}"
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
- arch = case Platform::ARCH
202
- when 'i386'
203
- 'x86_32'
204
- when 'x86_64'
205
- 'x86_64'
206
- when 'aarch64'
207
- 'aarch_64'
208
- when 'powerpc64le'
209
- 'ppcle_64'
210
- when 's390x'
211
- 's390_64'
212
- else
213
- raise NotImplementedError, message
214
- end
215
-
216
- "#{repo}/#{version}/protoc-#{version}-#{os}-#{arch}.exe"
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
- message = outbound_message.send(outbound_message.message)
73
-
74
- case outbound_message.message
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]&.send(outbound_message.message, message)
77
+ @observers[message.id]&.public_send(oneof, message)
78
78
  when :compile_response, :version_response
79
- @observers[message.id].send(outbound_message.message, message)
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.send(outbound_message.message, message)
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
- raise "file_url must be a file: URL, was \"#{file_url}\"" if !file_url.nil? && !file_url.start_with?('file:')
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,
@@ -114,8 +114,9 @@ module Sass
114
114
  end
115
115
 
116
116
  def from_proto(proto)
117
- obj = proto.send(proto.value)
118
- case proto.value
117
+ oneof = proto.value
118
+ obj = proto.public_send(oneof)
119
+ case oneof
119
120
  when :string
120
121
  Sass::Value::String.new(
121
122
  obj.text,
@@ -9,8 +9,9 @@ module Sass
9
9
  module_function
10
10
 
11
11
  def from_proto_compile_response(compile_response)
12
- result = compile_response.send(compile_response.result)
13
- case compile_response.result
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,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.0.18'
5
+ VERSION = '1.0.21'
6
6
  end
7
7
  end
@@ -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 no unit \"#{unit}\"", name unless unit?(unit)
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.18
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 00:00:00.000000000 Z
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.18
164
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.18
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: []