sass-embedded 1.4.3 → 1.6.0

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: 8c0bcb73033fa95a4349fa6efe2f423bbb2366eec37c423c6c67160a46e1ca8e
4
- data.tar.gz: 36cc13d91dae55ce8ce3db09f0ba1f3e819f9a5dce1ec6cf68e87ec8c170703e
3
+ metadata.gz: 9bd73c4d8e78a1f61959c1b5e99d2e98351eb91abfa046a6e9f883c718ded0a1
4
+ data.tar.gz: ffadad6b9cf7526afbf1bb7cada36236aecf4bcbdc54a40c3f352cbb686aba56
5
5
  SHA512:
6
- metadata.gz: 83c8102f9ad3c652da04e27d3f0c0ac7cba63f3e655fa0f243324793fc8c7b124e32ed6d6552a195f2df5be1093d33b79e1f30c46b153efda193a3d41c359cd4
7
- data.tar.gz: 62040258ecb98e6d0c70ac8fbc90aaa1cbd5b88601992ec9261ee25cc7bab6bd9d4b1fd0947ab993bdfdfe407ae81172d764a62226863ee2a19ccb9c2a40575f
6
+ metadata.gz: da24dd7f371d4d5104e5910468d34160cf5c87d8ad542e9faeae815fe8dd1ed04c0c1ddaa7a55e960e185bb9fd3de1707d727d540e06d338f73a12f5f3af90ca
7
+ data.tar.gz: f6456696e8d3b0ca3d9161233341f257023fdd3250d15a70a699a6025461a48965f7ae431e70cd789285dea03ad0e5f6e555c23a1e8c16cb33f3f6d2a2cb46fc
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "sass-embedded": "1.50.1"
3
+ "sass-embedded": "1.52.1"
4
4
  }
5
5
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.4.3'
5
+ VERSION = '1.6.0'
6
6
  end
7
7
  end
@@ -156,7 +156,7 @@ module Sass
156
156
 
157
157
  # @return [Integer]
158
158
  def hash
159
- @hash ||= red.hash ^ green.hash ^ blue.hash ^ alpha.hash
159
+ @hash ||= [red, green, blue, alpha].hash
160
160
  end
161
161
 
162
162
  # @return [Color]
@@ -94,17 +94,7 @@ module Sass
94
94
 
95
95
  # @return [Integer]
96
96
  def hash
97
- @hash ||= if unitless?
98
- FuzzyMath.hash(value)
99
- elsif single_unit?
100
- FuzzyMath.hash(
101
- value * Unit.canonical_multiplier_for_unit(numerator_units.first)
102
- )
103
- else
104
- FuzzyMath.hash(
105
- value * Unit.canonical_multiplier(numerator_units) / Unit.canonical_multiplier(denominator_units)
106
- )
107
- end
97
+ @hash ||= FuzzyMath.hash(canonical_units_value)
108
98
  end
109
99
 
110
100
  # @return [::Boolean]
@@ -265,6 +255,16 @@ module Sass
265
255
  numerator_units.length == 1 && denominator_units.empty?
266
256
  end
267
257
 
258
+ def canonical_units_value
259
+ if unitless?
260
+ value
261
+ elsif single_unit?
262
+ value * Unit.canonical_multiplier_for_unit(numerator_units.first)
263
+ else
264
+ value * Unit.canonical_multiplier(numerator_units) / Unit.canonical_multiplier(denominator_units)
265
+ end
266
+ end
267
+
268
268
  def coerce_or_convert_value(new_numerator_units, new_denominator_units,
269
269
  coerce_unitless:,
270
270
  name: nil,
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.4.3
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-19 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.27.0
61
+ version: 1.29.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.27.0
68
+ version: 1.29.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-performance
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.9.0
103
+ version: 2.11.1
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.9.0
110
+ version: 2.11.1
111
111
  description: A Ruby library that will communicate with Embedded Dart Sass using the
112
112
  Embedded Sass protocol.
113
113
  email:
@@ -159,8 +159,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
159
159
  licenses:
160
160
  - MIT
161
161
  metadata:
162
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.4.3
163
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.4.3
162
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.6.0
163
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.6.0
164
164
  funding_uri: https://github.com/sponsors/ntkme
165
165
  post_install_message:
166
166
  rdoc_options: []