sass-embedded 0.1.1 → 0.1.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: 604bb4648958324aedb4a486c281994eb04bc6a2e685e946c07e62ca83ded8ed
4
- data.tar.gz: 14730abcf938ee7fe9410a1f0055292c6abf95c95a1a7ab2c6f0d7dc3f2893c8
3
+ metadata.gz: 8152265aec1c4adf4ec89b826191a97f202b14bf86cf4093e679f8c24cd2d5af
4
+ data.tar.gz: 7b0d5d870ed38bf59562f617ad75cf2a3085704e0cc802989d21e15e9f14ee9b
5
5
  SHA512:
6
- metadata.gz: 629f7ec2916c32f7821153b47c4c6ebeba09d3995d89273113e9b2ebdb0d477eca9f4ae027fd5144e4b6bdc52c83d2eedc9ca8edcac3d1ea6b79f5f86d528f04
7
- data.tar.gz: 2b89c4871759f23a1c3e69d53ca61b1a8e45804435e0d84800beec43aa2bc860c707e3a5d10910e855cbf9d3fece3de658c97739b491b26a1c6aba43dec94fa9
6
+ metadata.gz: 0d037a1fe518298f2976d99d947544642325fa763315e539115422fb78b0f185d35f6c3b97cb97ec373ae04b70984f772f3915ec35974a450095e1f5f3366d88
7
+ data.tar.gz: 3844e6926954c302259f55a609e2e63a971c472580026ada05d13753dbebb4fb7bc4a13299c47b93a643b9fceaf742063e8a8b7b78f4ae541408eb4041e877b0
@@ -65,7 +65,7 @@ end
65
65
  def download_protoc
66
66
  repo = "protocolbuffers/protobuf"
67
67
 
68
- tag = URI.open('https://github.com/protocolbuffers/protobuf/releases/latest') { |file|
68
+ tag = URI.open("https://github.com/#{repo}/releases/latest") { |file|
69
69
  File.basename file.base_uri.to_s
70
70
  }
71
71
 
data/lib/sass.rb CHANGED
@@ -3,9 +3,9 @@
3
3
  module Sass
4
4
  # The global include_paths for Sass files. This is meant for plugins and
5
5
  # libraries to register the paths to their Sass stylesheets to that they may
6
- # be `@imported`. This includes path is used by every instance of
7
- # {Sass::Embedded::Compiler}. They are lower-precedence than any includes
8
- # paths passed in via the `:includes_paths` option.
6
+ # be `@imported`. This include path is used by every instance of
7
+ # {Sass::Embedded::Compiler}. They are lower-precedence than any include
8
+ # paths passed in via the `:include_paths` option.
9
9
  #
10
10
  # If the `SASS_PATH` environment variable is set,
11
11
  # the initial value of `include_paths` will be initialized based on that.
@@ -16,11 +16,11 @@ module Sass
16
16
  # Sass.include_paths << File.dirname(__FILE__ + '/sass')
17
17
  # @return [Array<String, Pathname>]
18
18
  def self.include_paths
19
- @includes_paths ||= if ENV['SASS_PATH']
20
- ENV['SASS_PATH'].split(File::PATH_SEPARATOR)
21
- else
22
- []
23
- end
19
+ @include_paths ||= if ENV['SASS_PATH']
20
+ ENV['SASS_PATH'].split(File::PATH_SEPARATOR)
21
+ else
22
+ []
23
+ end
24
24
  end
25
25
 
26
26
  def self.render options
@@ -60,7 +60,7 @@ module Sass
60
60
  importers = (options[:importer] ? [
61
61
  Sass::EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new( :importer_id => 0 )
62
62
  ] : []).concat(
63
- Sass.include_paths.concat(options[:include_paths] || [])
63
+ (options[:include_paths] || []).concat(Sass.include_paths)
64
64
  .map { |path| Sass::EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
65
65
  :path => File.absolute_path(path)
66
66
  )}
data/lib/sass/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sass
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
6
6
 
@@ -163,14 +163,12 @@ SCSS
163
163
  end
164
164
 
165
165
  def test_global_include_paths
166
- skip 'race condition in test'
167
-
168
166
  temp_dir("included_1")
169
167
  temp_dir("included_2")
170
168
 
171
169
  temp_file("included_1/import_parent.scss", "$s: 30px;")
172
- temp_file("included_2/import.scss", "@use 'import_parent'; $size: $s;")
173
- temp_file("styles.scss", "@use 'import.scss'; .hi { width: $size; }")
170
+ temp_file("included_2/import.scss", "@use 'import_parent' as *; $size: $s;")
171
+ temp_file("styles.scss", "@use 'import.scss' as *; .hi { width: $size; }")
174
172
 
175
173
  ::Sass.include_paths << "included_1"
176
174
  ::Sass.include_paths << "included_2"
@@ -179,12 +177,14 @@ SCSS
179
177
  end
180
178
 
181
179
  def test_env_include_paths
182
- skip 'race condition in test'
183
-
184
180
  expected_include_paths = [ "included_3", "included_4" ]
181
+
185
182
  ::Sass.instance_eval { @include_paths = nil }
183
+
186
184
  ENV['SASS_PATH'] = expected_include_paths.join(File::PATH_SEPARATOR)
187
- assert_equal expected_include_paths, ::Sass.include_paths
185
+
186
+ assert_equal expected_include_paths, Sass.include_paths
187
+
188
188
  ::Sass.include_paths.clear
189
189
  end
190
190
 
@@ -192,8 +192,8 @@ SCSS
192
192
  temp_dir("included_5")
193
193
  temp_dir("included_6")
194
194
  temp_file("included_5/import_parent.scss", "$s: 30px;")
195
- temp_file("included_6/import.scss", "@use 'import_parent'; $size: $s;")
196
- temp_file("styles.scss", "@use 'import.scss'; .hi { width: $size; }")
195
+ temp_file("included_6/import.scss", "@use 'import_parent' as *; $size: $s;")
196
+ temp_file("styles.scss", "@use 'import.scss' as *; .hi { width: $size; }")
197
197
 
198
198
  assert_raises(CompilationError) do
199
199
  render(File.read("styles.scss"))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき