sass-embedded 1.77.0 → 1.77.1
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 +20 -33
- data/ext/sass/package.json +1 -1
- data/lib/sass/canonicalize_context.rb +5 -1
- data/lib/sass/compiler/host/importer_registry.rb +8 -4
- data/lib/sass/embedded/version.rb +1 -1
- 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: 0bfff52de55e49e0fca1fc3e31b5872242a1bb7029df3f2559d4573572cfc7ea
|
4
|
+
data.tar.gz: 234f54677a6e1081be4b7c89f5e96941df79dfb96cd2e22a1820f983f1399d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da2f6ff5eb532eb242490de2089775382901caa745c9115b66d53a326ebf58a03a53c24f9e67b16a2cf338a9671b318d12af29ecf72e84cf79032c04e710e70e
|
7
|
+
data.tar.gz: 91d0022d942e73e64436a34fab0f7cc14bdc02095937150d80559f18bb9a810e8a3ef9ee7e996be3086b6fbd9e104d2ddd76ab8ce30d6110c390ab60daf83451
|
data/ext/sass/Rakefile
CHANGED
@@ -50,29 +50,9 @@ file 'cli.rb' => %w[dart-sass] do |t|
|
|
50
50
|
"
|
51
51
|
end
|
52
52
|
|
53
|
-
validate_gemspec = <<~'VALIDATE_GEMSPEC'
|
54
|
-
|
55
|
-
spec = Gem.loaded_specs['sass-embedded']
|
56
|
-
platform = spec&.platform
|
57
|
-
if platform.is_a?(Gem::Platform) && platform.os == 'linux' && platform.version.nil?
|
58
|
-
update = if Gem.disable_system_update_message
|
59
|
-
'updating Ruby to version 3.2 or later'
|
60
|
-
else
|
61
|
-
"running 'gem update --system' to update RubyGems"
|
62
|
-
end
|
63
|
-
install = if defined?(Bundler)
|
64
|
-
"running 'rm -f Gemfile.lock && bundle install'"
|
65
|
-
else
|
66
|
-
"running 'gem install sass-embedded'"
|
67
|
-
end
|
68
|
-
raise LoadError, "The gemspec for #{spec.name} at #{spec.loaded_from} was broken. " \
|
69
|
-
"Try #{update}, and then try #{install} to reinstall."
|
70
|
-
end
|
71
|
-
VALIDATE_GEMSPEC
|
72
|
-
|
73
53
|
File.write(t.name, <<~CLI_RB)
|
74
54
|
# frozen_string_literal: true
|
75
|
-
|
55
|
+
|
76
56
|
module Sass
|
77
57
|
module CLI
|
78
58
|
COMMAND = [#{command}].freeze
|
@@ -194,6 +174,8 @@ module FileUtils
|
|
194
174
|
end
|
195
175
|
|
196
176
|
def gem_install(name, version, platform)
|
177
|
+
require 'rubygems/remote_fetcher'
|
178
|
+
|
197
179
|
install_dir = File.absolute_path('ruby')
|
198
180
|
|
199
181
|
if Rake::FileUtilsExt.verbose_flag
|
@@ -210,25 +192,26 @@ module FileUtils
|
|
210
192
|
|
211
193
|
dependency = Gem::Dependency.new(name, version)
|
212
194
|
|
213
|
-
|
195
|
+
dependency_request = Gem::Resolver::DependencyRequest.new(dependency, nil)
|
214
196
|
|
215
|
-
|
197
|
+
resolver_spec = Gem::Resolver::BestSet.new.find_all(dependency_request).find do |s|
|
216
198
|
s.platform == platform
|
217
199
|
end
|
218
200
|
|
219
|
-
raise if
|
201
|
+
raise if resolver_spec.nil?
|
220
202
|
|
203
|
+
options = { force: true, install_dir: }
|
221
204
|
if Rake::FileUtilsExt.nowrite_flag
|
222
|
-
installer = Gem::Installer.for_spec(spec,
|
205
|
+
installer = Gem::Installer.for_spec(resolver_spec.spec, options)
|
223
206
|
else
|
224
|
-
path =
|
225
|
-
installer = Gem::Installer.at(path,
|
207
|
+
path = resolver_spec.download(options)
|
208
|
+
installer = Gem::Installer.at(path, options)
|
226
209
|
installer.install
|
227
210
|
end
|
228
211
|
|
229
212
|
yield installer.dir
|
230
213
|
ensure
|
231
|
-
rm_rf install_dir
|
214
|
+
rm_rf install_dir unless Rake::FileUtilsExt.nowrite_flag
|
232
215
|
end
|
233
216
|
end
|
234
217
|
|
@@ -332,7 +315,9 @@ module SassConfig
|
|
332
315
|
|
333
316
|
repo = 'https://repo.maven.apache.org/maven2/com/google/protobuf/protoc'
|
334
317
|
|
335
|
-
|
318
|
+
dependency = Gem::Dependency.new('google-protobuf')
|
319
|
+
|
320
|
+
spec = dependency.to_spec
|
336
321
|
|
337
322
|
version = spec.version
|
338
323
|
|
@@ -370,12 +355,14 @@ module SassConfig
|
|
370
355
|
|
371
356
|
uri
|
372
357
|
rescue Gem::RemoteFetcher::FetchError
|
373
|
-
|
374
|
-
|
358
|
+
dependency_request = Gem::Resolver::DependencyRequest.new(dependency, nil)
|
359
|
+
|
360
|
+
versions = Gem::Resolver::BestSet.new.find_all(dependency_request).filter_map do |s|
|
361
|
+
s.version if s.platform == Gem::Platform::RUBY
|
375
362
|
end
|
376
363
|
|
377
|
-
|
378
|
-
uri = "#{repo}/#{
|
364
|
+
versions.sort.reverse_each do |v|
|
365
|
+
uri = "#{repo}/#{v}/protoc-#{v}-#{os}-#{cpu}.exe"
|
379
366
|
|
380
367
|
Gem::RemoteFetcher.fetcher.fetch_https(Gem::Uri.new("#{uri}.sha1"))
|
381
368
|
|
data/ext/sass/package.json
CHANGED
@@ -7,13 +7,17 @@ module Sass
|
|
7
7
|
# @see https://sass-lang.com/documentation/js-api/interfaces/canonicalizecontext/
|
8
8
|
class CanonicalizeContext
|
9
9
|
# @return [String, nil]
|
10
|
-
|
10
|
+
def containing_url
|
11
|
+
@containing_url_unused = false
|
12
|
+
@containing_url
|
13
|
+
end
|
11
14
|
|
12
15
|
# @return [Boolean]
|
13
16
|
attr_reader :from_import
|
14
17
|
|
15
18
|
# @!visibility private
|
16
19
|
def initialize(canonicalize_request)
|
20
|
+
@containing_url_unused = true
|
17
21
|
@containing_url = canonicalize_request.containing_url == '' ? nil : canonicalize_request.containing_url
|
18
22
|
@from_import = canonicalize_request.from_import
|
19
23
|
end
|
@@ -68,12 +68,14 @@ module Sass
|
|
68
68
|
|
69
69
|
def canonicalize(canonicalize_request)
|
70
70
|
importer = @importers_by_id[canonicalize_request.importer_id]
|
71
|
+
canonicalize_context = CanonicalizeContext.new(canonicalize_request)
|
71
72
|
url = importer.canonicalize(canonicalize_request.url,
|
72
|
-
|
73
|
+
canonicalize_context)&.to_s
|
73
74
|
|
74
75
|
EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
|
75
76
|
id: canonicalize_request.id,
|
76
|
-
url
|
77
|
+
url:,
|
78
|
+
containing_url_unused: canonicalize_context.instance_eval { @containing_url_unused }
|
77
79
|
)
|
78
80
|
rescue StandardError => e
|
79
81
|
EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
|
@@ -103,12 +105,14 @@ module Sass
|
|
103
105
|
|
104
106
|
def file_import(file_import_request)
|
105
107
|
importer = @importers_by_id[file_import_request.importer_id]
|
108
|
+
canonicalize_context = CanonicalizeContext.new(file_import_request)
|
106
109
|
file_url = importer.find_file_url(file_import_request.url,
|
107
|
-
|
110
|
+
canonicalize_context)&.to_s
|
108
111
|
|
109
112
|
EmbeddedProtocol::InboundMessage::FileImportResponse.new(
|
110
113
|
id: file_import_request.id,
|
111
|
-
file_url
|
114
|
+
file_url:,
|
115
|
+
containing_url_unused: canonicalize_context.instance_eval { @containing_url_unused }
|
112
116
|
)
|
113
117
|
rescue StandardError => e
|
114
118
|
EmbeddedProtocol::InboundMessage::FileImportResponse.new(
|
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.77.
|
4
|
+
version: 1.77.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -107,8 +107,8 @@ licenses:
|
|
107
107
|
- MIT
|
108
108
|
metadata:
|
109
109
|
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
110
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.77.
|
111
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.77.
|
110
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.77.1
|
111
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.77.1
|
112
112
|
funding_uri: https://github.com/sponsors/ntkme
|
113
113
|
rubygems_mfa_required: 'true'
|
114
114
|
post_install_message:
|