Skip to content

Commit a64eb70

Browse files
committed
update to libsass beta version
1 parent 9d11f33 commit a64eb70

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

ext/libsass

Submodule libsass updated 155 files

lib/sassc/import_handler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def setup(native_options)
2424
def import_function
2525
@import_function ||= FFI::Function.new(:pointer, [:string, :pointer, :pointer]) do |path, importer_entry, compiler|
2626
last_import = Native::compiler_get_last_import(compiler)
27-
parent_path = Native::import_get_path(last_import)
27+
parent_path = Native::import_get_imp_path(last_import)
2828

2929
imports = [*@importer.imports(path, parent_path)]
3030
imports_to_native(imports)

lib/sassc/native/native_functions_api.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def self.string_get_type(native_value)
100100
# ADDAPI struct Sass_Import* ADDCALL sass_import_get_list_entry (struct Sass_Import** list, size_t idx);
101101

102102
# Getters for import entry
103-
# ADDAPI const char* ADDCALL sass_import_get_path (struct Sass_Import*);
104-
attach_function :sass_import_get_path, [:sass_import_ptr], :string
105-
# ADDAPI const char* ADDCALL sass_import_get_base (struct Sass_Import*);
103+
# ADDAPI const char* ADDCALL sass_import_get_imp_path (struct Sass_Import*);
104+
attach_function :sass_import_get_imp_path, [:sass_import_ptr], :string
105+
# ADDAPI const char* ADDCALL sass_import_get_abs_path (struct Sass_Import*);
106106
# ADDAPI const char* ADDCALL sass_import_get_source (struct Sass_Import*);
107107
attach_function :sass_import_get_source, [:sass_import_ptr], :string
108108
# ADDAPI const char* ADDCALL sass_import_get_srcmap (struct Sass_Import*);

test/custom_importer_test.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,10 @@ def test_dependency_list
8080

8181
dependencies = engine.dependencies.map(&:filename)
8282

83-
# TODO: this behavior is kind of weird (styles1.scss is not included)
84-
# not sure why.
85-
8683
assert_equal [
8784
"fonts/fonts.scss",
8885
"fonts/sub/sub_fonts.scss",
89-
"styles",
86+
"styles1.scss",
9087
"styles2.scss"
9188
], dependencies
9289
end

test/functions_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ def sass_return_path(path)
141141
Script::String.new("#{path.value}", :string)
142142
end
143143

144-
def optional_arguments(path, optional = "bar")
145-
Script::String.new("#{path.value}/#{optional}", :string)
144+
def optional_arguments(path, optional = nil)
145+
optional ||= Script::String.new("bar")
146+
Script::String.new("#{path.value}/#{optional.value}", :string)
146147
end
147148

148149
def function_that_raises_errors

test/native_test.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ module NativeTest
99

1010
class General < MiniTest::Test
1111
def test_it_reports_the_libsass_version
12-
assert_equal "3.2.5", Native.version
12+
assert_equal "3.3.0-beta2", Native.version
1313
end
1414
end
1515

1616
class DataContext < MiniTest::Test
1717
def teardown
18-
Native.delete_data_context(@data_context)
18+
Native.delete_data_context(@data_context) if @data_context
1919
end
2020

2121
def test_compile_status_is_zero_when_successful
@@ -58,6 +58,7 @@ def test_multibyte_characters_work
5858
end
5959

6060
def test_failed_compile_gives_error_message
61+
skip
6162
end
6263

6364
def test_custom_function
@@ -106,7 +107,7 @@ class FileContext < MiniTest::Test
106107
include TempFileTest
107108

108109
def teardown
109-
Native.delete_file_context(@file_context)
110+
Native.delete_file_context(@file_context) if @file_context
110111
end
111112

112113
def test_compile_status_is_zero_when_successful

0 commit comments

Comments
 (0)