sass-embedded 0.7.13 → 0.7.17
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/README.md +1 -0
- data/ext/dependencies.rb +1 -1
- data/lib/sass/compile.rb +5 -1
- data/lib/sass/transport.rb +14 -8
- data/lib/sass/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab9e58a331ab32c7ac7842a49200124f034125b8c53ec98abf6f28c8d90950bf
|
4
|
+
data.tar.gz: c29daf3c44f78f0426785d32d23088ba18363f4c8298f1cfef5bd434ec509285
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35373b7a328421190d33408781b4cbb46eb9552b44b4f9c6fe7f198e70b4d9308988e234b08412e2d3e4d63adf4cef610fec6746f03a9cded99a7066dca474d1
|
7
|
+
data.tar.gz: 50dea130d22068359ec76c874318059508f91a01f11d78050a00d4c36fe0d5e406a03b6c0952239edd76d2638a5f177e89830682b32fda7ea15104bfee089b01
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Embedded Sass Host for Ruby
|
2
2
|
|
3
3
|
[](https://github.com/ntkme/embedded-host-ruby/actions/workflows/build.yml)
|
4
|
+
[](https://rubygems.org/gems/sass-embedded)
|
4
5
|
|
5
6
|
This is a Ruby library that implements the host side of the [Embedded Sass protocol](https://github.com/sass/sass-embedded-protocol).
|
6
7
|
|
data/ext/dependencies.rb
CHANGED
data/lib/sass/compile.rb
CHANGED
@@ -161,9 +161,13 @@ module Sass
|
|
161
161
|
end
|
162
162
|
|
163
163
|
def function_call_response(function_call_request)
|
164
|
+
# TODO: convert argument_list to **kwargs
|
164
165
|
EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
|
165
166
|
id: function_call_request.id,
|
166
|
-
success: @functions[function_call_request.name].call(*function_call_request.arguments)
|
167
|
+
success: @functions[function_call_request.name].call(*function_call_request.arguments),
|
168
|
+
accessed_argument_lists: function_call_request.arguments
|
169
|
+
.filter { |argument| argument.value == :argument_list }
|
170
|
+
.map { |argument| argument.argument_list.id }
|
167
171
|
)
|
168
172
|
rescue StandardError => e
|
169
173
|
EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
|
data/lib/sass/transport.rb
CHANGED
@@ -30,6 +30,9 @@ module Sass
|
|
30
30
|
@observerable_mutex = Mutex.new
|
31
31
|
@stdin_mutex = Mutex.new
|
32
32
|
@stdin, @stdout, @stderr, @wait_thread = Open3.popen3(DART_SASS_EMBEDDED)
|
33
|
+
|
34
|
+
[@stdin, @stdout].each(&:binmode)
|
35
|
+
|
33
36
|
poll do
|
34
37
|
warn(@stderr.readline, uplevel: 1)
|
35
38
|
end
|
@@ -107,21 +110,24 @@ module Sass
|
|
107
110
|
end
|
108
111
|
|
109
112
|
def read_varint(readable)
|
110
|
-
|
113
|
+
value = bits = 0
|
111
114
|
loop do
|
112
115
|
byte = readable.readbyte
|
113
|
-
|
116
|
+
value |= (byte & 0x7f) << bits
|
114
117
|
bits += 7
|
115
|
-
break if byte
|
118
|
+
break if byte < 0x80
|
116
119
|
end
|
117
|
-
|
120
|
+
value
|
118
121
|
end
|
119
122
|
|
120
|
-
def write_varint(writeable,
|
121
|
-
|
122
|
-
|
123
|
-
|
123
|
+
def write_varint(writeable, value)
|
124
|
+
bytes = []
|
125
|
+
until value < 0x80
|
126
|
+
bytes << (0x80 | (value & 0x7f))
|
127
|
+
value >>= 7
|
124
128
|
end
|
129
|
+
bytes << value
|
130
|
+
writeable.write bytes.pack('C*')
|
125
131
|
end
|
126
132
|
end
|
127
133
|
end
|
data/lib/sass/version.rb
CHANGED
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: 0.7.
|
4
|
+
version: 0.7.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -166,7 +166,7 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
166
166
|
licenses:
|
167
167
|
- MIT
|
168
168
|
metadata:
|
169
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.7.
|
169
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v0.7.17
|
170
170
|
post_install_message:
|
171
171
|
rdoc_options: []
|
172
172
|
require_paths:
|