sass-embedded 1.2.9 → 1.3.2

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: 39ae4d4e2f181e2ffee380d6a5d9454d1ab06011eb2b65abffdb8ba05e0d830d
4
- data.tar.gz: 84fb54829f2bc4b63ea97929b819b13c5c8e198d9ef6a9267df1f8933cc62e04
3
+ metadata.gz: 3a0b331e415afbb531c878df4a9cc1581f5ba8fed834272d7ddf213909f7e96b
4
+ data.tar.gz: fca106d6f9f3168ad5bea90b39dcaa4905de8802c83155e968b399fc4af62ee5
5
5
  SHA512:
6
- metadata.gz: 3440adabbe0981502f1efc9c0166a044d5dca1193f0b0bca5aeeadf9e5083b310612db5111c381cd7d2d68980625449451baa287500211159d974f185f9cd9ce
7
- data.tar.gz: 2548fccf9710d2b80ac20d914bba01b251121b5a8f471b2a09a6dff2f05d89855def8beb69782e476cd236039ab4402da4d303279dc75eced333f49c3b8380f2
6
+ metadata.gz: 275d74fd71008ddce5fa2cefc492288cceb95d93c82a832794949aa20eae0a56ec107ffa32bbabee05dd8a5a1caf13acd41530d4cc6a40e378d9f9e56accb4bc
7
+ data.tar.gz: 9115bb30cf0511073695f7f94e54236ccc817a158574b337c9f40e80088d885566f17a9b3382504d5a320a75477e16b342c1b863655aa6bb1cfc76ea2ff05a47
@@ -9,7 +9,7 @@ module Sass
9
9
  # It runs the `dart-sass-embedded` process.
10
10
  class Compiler
11
11
  def initialize
12
- @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(PATH)
12
+ @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(PATH, chdir: __dir__)
13
13
  @stdin.binmode
14
14
  @stdout.binmode
15
15
  @stdin_mutex = Mutex.new
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ class Embedded
5
+ class Host
6
+ # An importer that never imports any stylesheets.
7
+ module NoOpImporter
8
+ module_function
9
+
10
+ def canonicalize(*); end
11
+ def load(*); end
12
+ end
13
+
14
+ private_constant :NoOpImporter
15
+ end
16
+ end
17
+ end
@@ -3,6 +3,7 @@
3
3
  require_relative 'host/function_registry'
4
4
  require_relative 'host/importer_registry'
5
5
  require_relative 'host/logger_registry'
6
+ require_relative 'host/no_op_importer'
6
7
  require_relative 'host/value_protofier'
7
8
 
8
9
  module Sass
@@ -54,7 +55,15 @@ module Sass
54
55
  source: source,
55
56
  url: url&.to_s,
56
57
  syntax: Protofier.to_proto_syntax(syntax),
57
- importer: importer.nil? ? nil : @importer_registry.register(importer)
58
+ importer: if importer
59
+ @importer_registry.register(importer)
60
+ elsif url
61
+ EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
62
+ path: File.absolute_path('.')
63
+ )
64
+ else
65
+ @importer_registry.register(NoOpImporter)
66
+ end
58
67
  )
59
68
  end,
60
69
  path: path.nil? ? nil : File.absolute_path(path),
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.2.9'
5
+ VERSION = '1.3.2'
6
6
  end
7
7
  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.2.9
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-02 00:00:00.000000000 Z
11
+ date: 2022-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -134,6 +134,7 @@ files:
134
134
  - lib/sass/embedded/host/function_registry.rb
135
135
  - lib/sass/embedded/host/importer_registry.rb
136
136
  - lib/sass/embedded/host/logger_registry.rb
137
+ - lib/sass/embedded/host/no_op_importer.rb
137
138
  - lib/sass/embedded/host/value_protofier.rb
138
139
  - lib/sass/embedded/logger.rb
139
140
  - lib/sass/embedded/logger/source_location.rb
@@ -159,8 +160,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
159
160
  licenses:
160
161
  - MIT
161
162
  metadata:
162
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.2.9
163
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.2.9
163
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.3.2
164
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.3.2
164
165
  funding_uri: https://github.com/sponsors/ntkme
165
166
  post_install_message:
166
167
  rdoc_options: []