sassc-embedded 1.80.0 → 1.80.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b23e9f3b452e97580cf174f9df81d0e60ce035c876d467182bda080154f72c04
4
- data.tar.gz: ae8aa0e7e2e165bb83eae26547e0f20a22b1728524fe50c2ef1ecf24700357d8
3
+ metadata.gz: a0e7b2482c18b9bbea2af1e42f87862cff2e9cc0d9e4a61f99c65f8458b797f8
4
+ data.tar.gz: 8cfde4eb9be815f5bfbc10f355161e27715ae7984a72e17dfc9273473a8f7aa9
5
5
  SHA512:
6
- metadata.gz: 282ab574b7175f1e97dc8984157b97290c55dd70b948c5d482b808d3167ef8ae6fc553a7c674bccb1806dd4c6c65798149c1084e66f8eebb0fe01f688cbef6cb
7
- data.tar.gz: a51a55be548e4de909e9efc245a8bd11b4477d6fd0b4a31f753d571402b00a2af2a647e3a0e63e0ce7a56addc45100aaa396ef08bbe4300f9381cb51c83713b8
6
+ metadata.gz: 2e6cfb2011d7f364f560aaa2642b5bf841a8bfe75d492c9a84f949e0777a75636111605992f85b1740449b090af6e2c5fbdcf86660c9a542d2e249be0f7c3c47
7
+ data.tar.gz: 4eaca6abeff9935ae2f0ccd1d82761bc9ebafcbd8849c8963c8e5c3c367c72085caa758f356fd3071ce50c460805f113fda886dd95ac953a00e12166ef9c9854
data/README.md CHANGED
@@ -21,7 +21,7 @@ This library shims [`sassc`](https://github.com/sass/sassc-ruby) with the [`sass
21
21
  - [`sassc-rails`](https://github.com/sass/sassc-rails)
22
22
  - [`sprockets`](https://github.com/rails/sprockets)
23
23
  - [`sprockets-rails`](https://github.com/rails/sprockets-rails)
24
- - [`sassc`](https://github.com/sass/sassc-ruby) [is deprecated](https://sass-lang.com/blog/libsass-is-deprecated/).
24
+ - [`sassc`](https://github.com/sass/sassc-ruby) [has reached end-of-life](https://github.com/sass/sassc-ruby/blob/HEAD/README.md#sassc-has-reached-end-of-life).
25
25
  - [`sass`](https://github.com/sass/ruby-sass) [has reached end-of-life](https://sass-lang.com/blog/ruby-sass-is-unsupported/).
26
26
 
27
27
  ## Install
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.80.0'
5
+ VERSION = '1.80.2'
6
6
  end
7
7
  end
@@ -13,8 +13,6 @@ module SassC
13
13
  remove_method(:render) if public_method_defined?(:render, false)
14
14
 
15
15
  def render
16
- return @template.dup if @template.empty?
17
-
18
16
  result = ::Sass.compile_string(
19
17
  @template,
20
18
  importer: (NoopImporter unless @options[:importer].nil?),
@@ -53,7 +51,7 @@ module SassC
53
51
  end
54
52
  css += "\n/*# sourceMappingURL=#{source_mapping_url} */"
55
53
  end
56
- css
54
+ css.encode(@template.encoding)
57
55
  rescue ::Sass::CompileError => e
58
56
  @loaded_urls = e.loaded_urls
59
57
 
@@ -139,8 +137,6 @@ module SassC
139
137
  remove_method(:setup) if public_method_defined?(:setup, false)
140
138
 
141
139
  def setup(_native_options, functions: Script::Functions)
142
- @callbacks = {}
143
-
144
140
  functions_wrapper = Class.new do
145
141
  attr_accessor :options
146
142
 
@@ -148,7 +144,7 @@ module SassC
148
144
  end.new
149
145
  functions_wrapper.options = @options
150
146
 
151
- Script.custom_functions(functions:).each do |custom_function|
147
+ Script.custom_functions(functions:).each_with_object({}) do |custom_function, callbacks|
152
148
  callback = lambda do |native_argument_list|
153
149
  function_arguments = arguments_from_native_list(native_argument_list)
154
150
  begin
@@ -162,10 +158,8 @@ module SassC
162
158
  raise e
163
159
  end
164
160
 
165
- @callbacks[Script.formatted_function_name(custom_function, functions:)] = callback
161
+ callbacks[Script.formatted_function_name(custom_function, functions:)] = callback
166
162
  end
167
-
168
- @callbacks
169
163
  end
170
164
 
171
165
  private
@@ -500,7 +494,7 @@ module SassC
500
494
  )
501
495
  when ::Sass::Value::Map
502
496
  ::SassC::Script::Value::Map.new(
503
- value.contents.to_a.to_h { |k, v| [from_native(k, options), from_native(v, options)] }
497
+ value.contents.each_with_object({}) { |(k, v), h| h[from_native(k, options)] = from_native(v, options) }
504
498
  )
505
499
  when ::Sass::Value::Number
506
500
  ::SassC::Script::Value::Number.new(
@@ -563,7 +557,7 @@ module SassC
563
557
  )
564
558
  when ::SassC::Script::Value::Map
565
559
  ::Sass::Value::Map.new(
566
- value.value.to_a.to_h { |k, v| [to_native(k), to_native(v)] }
560
+ value.value.each_with_object({}) { |(k, v), h| h[to_native(k)] = to_native(v) }
567
561
  )
568
562
  when ::SassC::Script::Value::Number
569
563
  ::Sass::Value::Number.new(
@@ -629,8 +623,8 @@ module SassC
629
623
  decode_uri_hash_with_preserve_escaped = if unescaped.nil? || unescaped.empty?
630
624
  decode_uri_hash
631
625
  else
632
- decode_uri_hash.to_h do |key, value|
633
- [key, unescaped.include?(value) ? key : value]
626
+ decode_uri_hash.each_with_object({}) do |(key, value), hash|
627
+ hash[key] = unescaped.include?(value) ? key : value
634
628
  end.freeze
635
629
  end
636
630
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.80.0
4
+ version: 1.80.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-17 00:00:00.000000000 Z
10
+ date: 2025-01-20 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: sass-embedded
@@ -79,10 +78,9 @@ licenses:
79
78
  metadata:
80
79
  bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
81
80
  documentation_uri: https://rubydoc.info/gems/sassc
82
- source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.80.0
81
+ source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.80.2
83
82
  funding_uri: https://github.com/sponsors/ntkme
84
83
  rubygems_mfa_required: 'true'
85
- post_install_message:
86
84
  rdoc_options: []
87
85
  require_paths:
88
86
  - lib
@@ -98,8 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
100
98
  requirements: []
101
- rubygems_version: 3.5.16
102
- signing_key:
99
+ rubygems_version: 3.6.2
103
100
  specification_version: 4
104
101
  summary: Use dart-sass with SassC!
105
102
  test_files: []