sass-embedded 1.0.3 → 1.0.6
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/Makefile +5 -5
- data/ext/sass/extconf.rb +32 -19
- data/lib/sass/embedded/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb22fd222502bd171a92c0f112b0644dda7b3c6badf12c9f9aa9b079c0856681
|
4
|
+
data.tar.gz: fd6f3666396b577de10d2c8403dd3bbdcf382b9d7e6a656d2da7ca6750ff0e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e75993c794dfde2f004cff309537562914b6cf5efcc9898f5b5b5b2e92c8cf5f616397ba363477768c36c2e42a1548c3f6897d2d28cdd4c4010489b744ff0626
|
7
|
+
data.tar.gz: 1116525243f799d4fa7ac0fb52fe3f59f5a5d2c08256d347c88ff19a48eef714ce3e2ccc58e8b71b61ebb055b80322b84017df207b5b047a802b8dea585fd73c
|
data/ext/sass/Makefile
CHANGED
@@ -9,14 +9,14 @@ EXTCONF = ruby -- extconf.rb
|
|
9
9
|
all: embedded_sass_pb.rb sass_embedded
|
10
10
|
|
11
11
|
.PHONY: install
|
12
|
-
install:
|
13
|
-
|
14
|
-
.PHONY: uninstall
|
15
|
-
uninstall:
|
16
|
-
$(RM) embedded_sass_pb.rb sass_embedded
|
12
|
+
install: distclean
|
17
13
|
|
18
14
|
.PHONY: clean
|
19
15
|
clean:
|
16
|
+
$(RM) embedded_sass_pb.rb sass_embedded
|
17
|
+
|
18
|
+
.PHONY: distclean
|
19
|
+
distclean:
|
20
20
|
$(RM) embedded_sass.proto protoc protoc-* sass_embedded-*
|
21
21
|
|
22
22
|
ifeq ($(OS),Windows_NT)
|
data/ext/sass/extconf.rb
CHANGED
@@ -104,14 +104,27 @@ module Sass
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
-
def fetch(
|
108
|
-
|
109
|
-
|
107
|
+
def fetch(uri_or_path)
|
108
|
+
begin
|
109
|
+
uri = URI.parse(uri_or_path)
|
110
|
+
path = URI::DEFAULT_PARSER.unescape(uri.path)
|
111
|
+
if uri.instance_of?(URI::File) || uri.instance_of?(URI::Generic)
|
112
|
+
path = path.delete_prefix('/') if Platform::OS == 'windows' && !File.file?(path)
|
113
|
+
raise unless File.file?(path)
|
114
|
+
end
|
115
|
+
rescue StandardError
|
116
|
+
raise unless File.file?(uri_or_path)
|
117
|
+
|
118
|
+
uri = nil
|
119
|
+
path = uri_or_path
|
120
|
+
end
|
121
|
+
|
110
122
|
dest = File.absolute_path(File.basename(path), __dir__)
|
111
|
-
|
123
|
+
|
124
|
+
if uri.nil? || uri.instance_of?(URI::File) || uri.instance_of?(URI::Generic)
|
112
125
|
puts "cp -- #{path} #{dest}"
|
113
126
|
FileUtils.copy_file(path, dest)
|
114
|
-
elsif uri.respond_to?
|
127
|
+
elsif uri.respond_to?(:open)
|
115
128
|
puts "curl -fsSLo #{dest} -- #{uri}"
|
116
129
|
uri.open do |stream|
|
117
130
|
File.binwrite(dest, stream.read)
|
@@ -120,7 +133,7 @@ module Sass
|
|
120
133
|
raise
|
121
134
|
end
|
122
135
|
rescue StandardError
|
123
|
-
raise "Failed to fetch #{
|
136
|
+
raise "Failed to fetch #{uri_or_path}"
|
124
137
|
end
|
125
138
|
|
126
139
|
def default_sass_embedded
|
@@ -138,7 +151,7 @@ module Sass
|
|
138
151
|
when 'windows'
|
139
152
|
'windows'
|
140
153
|
else
|
141
|
-
raise
|
154
|
+
raise release_asset_not_available_error(repo, tag_name)
|
142
155
|
end
|
143
156
|
|
144
157
|
arch = case Platform::ARCH
|
@@ -147,11 +160,9 @@ module Sass
|
|
147
160
|
when 'i386'
|
148
161
|
'ia32'
|
149
162
|
when 'aarch64'
|
150
|
-
|
151
|
-
|
152
|
-
'x64'
|
163
|
+
Platform::OS == 'darwin' ? 'x64' : 'arm64'
|
153
164
|
else
|
154
|
-
raise
|
165
|
+
raise release_asset_not_available_error(repo, tag_name)
|
155
166
|
end
|
156
167
|
|
157
168
|
ext = case os
|
@@ -179,16 +190,12 @@ module Sass
|
|
179
190
|
when 'windows'
|
180
191
|
'win'
|
181
192
|
else
|
182
|
-
raise
|
193
|
+
raise release_asset_not_available_error(repo, tag_name)
|
183
194
|
end
|
184
195
|
|
185
196
|
arch = case Platform::ARCH
|
186
197
|
when 'aarch64'
|
187
|
-
|
188
|
-
'x86_64'
|
189
|
-
else
|
190
|
-
'aarch_64'
|
191
|
-
end
|
198
|
+
Platform::OS == 'darwin' ? 'x86_64' : 'aarch_64'
|
192
199
|
when 'sparcv9'
|
193
200
|
's390'
|
194
201
|
when 'i386'
|
@@ -198,7 +205,7 @@ module Sass
|
|
198
205
|
when 'powerpc64'
|
199
206
|
'ppcle_64'
|
200
207
|
else
|
201
|
-
raise
|
208
|
+
raise release_asset_not_available_error(repo, tag_name)
|
202
209
|
end
|
203
210
|
|
204
211
|
os_arch = case os
|
@@ -222,7 +229,13 @@ module Sass
|
|
222
229
|
|
223
230
|
tag_name = JSON.parse(stdout)['protocolVersion']
|
224
231
|
|
225
|
-
"https://
|
232
|
+
"https://github.com/#{repo}/raw/#{tag_name}/embedded_sass.proto"
|
233
|
+
end
|
234
|
+
|
235
|
+
def release_asset_not_available_error(repo, tag_name)
|
236
|
+
platform = "#{Platform::OS} #{Platform::ARCH}"
|
237
|
+
url = "https://github.com/#{repo}/releases/tag/#{tag_name}"
|
238
|
+
NotImplementedError.new("Release asset for #{platform} not available at #{url}")
|
226
239
|
end
|
227
240
|
end
|
228
241
|
end
|
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.6
|
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-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.
|
103
|
+
version: 2.9.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2.
|
110
|
+
version: 2.9.0
|
111
111
|
description: A Ruby library that will communicate with Embedded Dart Sass using the
|
112
112
|
Embedded Sass protocol.
|
113
113
|
email:
|
@@ -162,8 +162,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
|
|
162
162
|
licenses:
|
163
163
|
- MIT
|
164
164
|
metadata:
|
165
|
-
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.
|
166
|
-
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.
|
165
|
+
documentation_uri: https://www.rubydoc.info/gems/sass-embedded/1.0.6
|
166
|
+
source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.0.6
|
167
167
|
funding_uri: https://github.com/sponsors/ntkme
|
168
168
|
post_install_message:
|
169
169
|
rdoc_options: []
|