sassc-embedded 1.77.4 → 1.77.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +39 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f893a88e7993e70cec58055829a076f43869ac843f4b30741ac0377b7a358ab
|
4
|
+
data.tar.gz: 5a431b6429c3d6e0d1f2d010efc517d926bfebfb2d9ed454087c312b661f028d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e49489a1079584157456035a5c1bcf932c53a320e371fdb78c3b2cfc3eb74f7369330df925504943237ccf734cd5e4d8801b1ad37179a1a414595e3b32e5565
|
7
|
+
data.tar.gz: 1107e84ae76c86f032feb15d9162aef04423daef1726e381e6e515e982e02b69178900fd6e07ce1e82efc95d7fa5859caa07bb60d754e15f6cd335ba69a85647
|
data/lib/sassc/embedded.rb
CHANGED
@@ -10,6 +10,8 @@ require_relative 'embedded/version'
|
|
10
10
|
|
11
11
|
module SassC
|
12
12
|
class Engine
|
13
|
+
remove_method(:render) if public_method_defined?(:render, false)
|
14
|
+
|
13
15
|
def render
|
14
16
|
return @template.dup if @template.empty?
|
15
17
|
|
@@ -64,6 +66,8 @@ module SassC
|
|
64
66
|
raise SyntaxError.new(e.full_message, filename: path, line:)
|
65
67
|
end
|
66
68
|
|
69
|
+
remove_method(:dependencies) if public_method_defined?(:dependencies, false)
|
70
|
+
|
67
71
|
def dependencies
|
68
72
|
raise NotRenderedError unless @loaded_urls
|
69
73
|
|
@@ -72,6 +76,8 @@ module SassC
|
|
72
76
|
end)
|
73
77
|
end
|
74
78
|
|
79
|
+
remove_method(:source_map) if public_method_defined?(:source_map, false)
|
80
|
+
|
75
81
|
def source_map
|
76
82
|
raise NotRenderedError unless @source_map
|
77
83
|
|
@@ -101,18 +107,19 @@ module SassC
|
|
101
107
|
end
|
102
108
|
end
|
103
109
|
|
110
|
+
remove_method(:output_style) if private_method_defined?(:output_style, false)
|
111
|
+
|
104
112
|
def output_style
|
105
113
|
@output_style ||= begin
|
106
|
-
style = @options.fetch(:style, :sass_style_nested).to_s
|
107
|
-
style = "sass_style_#{style}" unless style.start_with?('sass_style_')
|
108
|
-
raise InvalidStyleError unless OUTPUT_STYLES.include?(style.to_sym)
|
114
|
+
style = @options.fetch(:style, :sass_style_nested).to_s.delete_prefix('sass_style_').to_sym
|
109
115
|
|
110
|
-
style = style.delete_prefix('sass_style_').to_sym
|
111
116
|
case style
|
112
|
-
when :nested, :compact
|
117
|
+
when :nested, :compact, :expanded
|
113
118
|
:expanded
|
119
|
+
when :compressed
|
120
|
+
:compressed
|
114
121
|
else
|
115
|
-
|
122
|
+
raise InvalidStyleError
|
116
123
|
end
|
117
124
|
end
|
118
125
|
end
|
@@ -123,12 +130,16 @@ module SassC
|
|
123
130
|
syntax
|
124
131
|
end
|
125
132
|
|
133
|
+
remove_method(:load_paths) if private_method_defined?(:load_paths, false)
|
134
|
+
|
126
135
|
def load_paths
|
127
136
|
@load_paths ||= (@options[:load_paths] || []) + SassC.load_paths
|
128
137
|
end
|
129
138
|
end
|
130
139
|
|
131
140
|
class FunctionsHandler
|
141
|
+
remove_method(:setup) if public_method_defined?(:setup, false)
|
142
|
+
|
132
143
|
def setup(_native_options, functions: Script::Functions)
|
133
144
|
@callbacks = {}
|
134
145
|
|
@@ -161,6 +172,8 @@ module SassC
|
|
161
172
|
|
162
173
|
private
|
163
174
|
|
175
|
+
remove_method(:arguments_from_native_list) if private_method_defined?(:arguments_from_native_list, false)
|
176
|
+
|
164
177
|
def arguments_from_native_list(native_argument_list)
|
165
178
|
native_argument_list.filter_map do |native_value|
|
166
179
|
Script::ValueConversion.from_native(native_value, @options)
|
@@ -179,6 +192,8 @@ module SassC
|
|
179
192
|
private_constant :NoopImporter
|
180
193
|
|
181
194
|
class ImportHandler
|
195
|
+
remove_method(:setup) if public_method_defined?(:setup, false)
|
196
|
+
|
182
197
|
def setup(_native_options)
|
183
198
|
if @importer
|
184
199
|
import_cache = ImportCache.new(@importer)
|
@@ -402,6 +417,10 @@ module SassC
|
|
402
417
|
end
|
403
418
|
|
404
419
|
class Sass2Scss
|
420
|
+
class << self
|
421
|
+
remove_method(:convert) if public_method_defined?(:convert, false)
|
422
|
+
end
|
423
|
+
|
405
424
|
def self.convert(sass)
|
406
425
|
{
|
407
426
|
contents: sass,
|
@@ -413,6 +432,10 @@ module SassC
|
|
413
432
|
module Script
|
414
433
|
class Value
|
415
434
|
class String
|
435
|
+
class << self
|
436
|
+
remove_method(:quote) if public_method_defined?(:quote, false)
|
437
|
+
end
|
438
|
+
|
416
439
|
# Returns the quoted string representation of `contents`.
|
417
440
|
#
|
418
441
|
# @options opts :quote [String]
|
@@ -425,6 +448,8 @@ module SassC
|
|
425
448
|
opts[:sass] ? contents.gsub('#', '\#') : contents
|
426
449
|
end
|
427
450
|
|
451
|
+
remove_method(:to_s) if public_method_defined?(:to_s, false)
|
452
|
+
|
428
453
|
def to_s(opts = {})
|
429
454
|
opts = { quote: :none }.merge!(opts) if @type == :identifier
|
430
455
|
self.class.quote(@value, opts)
|
@@ -433,6 +458,10 @@ module SassC
|
|
433
458
|
end
|
434
459
|
|
435
460
|
module ValueConversion
|
461
|
+
class << self
|
462
|
+
remove_method(:from_native) if public_method_defined?(:from_native, false)
|
463
|
+
end
|
464
|
+
|
436
465
|
def self.from_native(value, options)
|
437
466
|
case value
|
438
467
|
when ::Sass::Value::Null::NULL
|
@@ -488,6 +517,10 @@ module SassC
|
|
488
517
|
end
|
489
518
|
end
|
490
519
|
|
520
|
+
class << self
|
521
|
+
remove_method(:to_native) if public_method_defined?(:to_native, false)
|
522
|
+
end
|
523
|
+
|
491
524
|
def self.to_native(value)
|
492
525
|
case value
|
493
526
|
when nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.77.
|
4
|
+
version: 1.77.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
@@ -79,7 +79,7 @@ licenses:
|
|
79
79
|
metadata:
|
80
80
|
bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
|
81
81
|
documentation_uri: https://rubydoc.info/gems/sassc
|
82
|
-
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.
|
82
|
+
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.77.5
|
83
83
|
funding_uri: https://github.com/sponsors/ntkme
|
84
84
|
rubygems_mfa_required: 'true'
|
85
85
|
post_install_message:
|