Skip to content

Commit

Permalink
Merge pull request #20 from sass/new_libsas_version
Browse files Browse the repository at this point in the history
update to libsass beta version
  • Loading branch information
bolandrm committed Oct 14, 2015
2 parents 9d11f33 + 5758be7 commit cb36fb5
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This gem combines the speed of `libsass`, the [Sass C implementation](https://gi

### libsass Version

[3.2.5](https://github.com/sass/libsass/releases/tag/3.2.5)
[3.3.0-beta3](https://github.com/sass/libsass/releases/tag/3.3.0-beta3)

## Usage

Expand All @@ -25,6 +25,8 @@ and [awesome contributors](https://github.com/bolandrm/sassc-ruby/graphs/contrib

## Changelog

- **1.8.0-beta1**
- [Update to Libsass 3.3.0-beta3](https://github.com/sass/sassc-ruby/pull/20)
- **1.7.1**
- Some updates to `Engine` API.
- **1.7.0**
Expand Down
2 changes: 1 addition & 1 deletion ext/libsass
Submodule libsass updated 155 files
2 changes: 1 addition & 1 deletion lib/sassc/import_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def setup(native_options)
def import_function
@import_function ||= FFI::Function.new(:pointer, [:string, :pointer, :pointer]) do |path, importer_entry, compiler|
last_import = Native::compiler_get_last_import(compiler)
parent_path = Native::import_get_path(last_import)
parent_path = Native::import_get_imp_path(last_import)

imports = [*@importer.imports(path, parent_path)]
imports_to_native(imports)
Expand Down
6 changes: 3 additions & 3 deletions lib/sassc/native/native_functions_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def self.string_get_type(native_value)
# ADDAPI struct Sass_Import* ADDCALL sass_import_get_list_entry (struct Sass_Import** list, size_t idx);

# Getters for import entry
# ADDAPI const char* ADDCALL sass_import_get_path (struct Sass_Import*);
attach_function :sass_import_get_path, [:sass_import_ptr], :string
# ADDAPI const char* ADDCALL sass_import_get_base (struct Sass_Import*);
# ADDAPI const char* ADDCALL sass_import_get_imp_path (struct Sass_Import*);
attach_function :sass_import_get_imp_path, [:sass_import_ptr], :string
# ADDAPI const char* ADDCALL sass_import_get_abs_path (struct Sass_Import*);
# ADDAPI const char* ADDCALL sass_import_get_source (struct Sass_Import*);
attach_function :sass_import_get_source, [:sass_import_ptr], :string
# ADDAPI const char* ADDCALL sass_import_get_srcmap (struct Sass_Import*);
Expand Down
5 changes: 1 addition & 4 deletions test/custom_importer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ def test_dependency_list

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

# TODO: this behavior is kind of weird (styles1.scss is not included)
# not sure why.

assert_equal [
"fonts/fonts.scss",
"fonts/sub/sub_fonts.scss",
"styles",
"styles1.scss",
"styles2.scss"
], dependencies
end
Expand Down
5 changes: 3 additions & 2 deletions test/functions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def sass_return_path(path)
Script::String.new("#{path.value}", :string)
end

def optional_arguments(path, optional = "bar")
Script::String.new("#{path.value}/#{optional}", :string)
def optional_arguments(path, optional = nil)
optional ||= Script::String.new("bar")
Script::String.new("#{path.value}/#{optional.value}", :string)
end

def function_that_raises_errors
Expand Down
7 changes: 4 additions & 3 deletions test/native_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ module NativeTest

class General < MiniTest::Test
def test_it_reports_the_libsass_version
assert_equal "3.2.5", Native.version
assert_equal "3.3.0-beta3", Native.version
end
end

class DataContext < MiniTest::Test
def teardown
Native.delete_data_context(@data_context)
Native.delete_data_context(@data_context) if @data_context
end

def test_compile_status_is_zero_when_successful
Expand Down Expand Up @@ -58,6 +58,7 @@ def test_multibyte_characters_work
end

def test_failed_compile_gives_error_message
skip
end

def test_custom_function
Expand Down Expand Up @@ -106,7 +107,7 @@ class FileContext < MiniTest::Test
include TempFileTest

def teardown
Native.delete_file_context(@file_context)
Native.delete_file_context(@file_context) if @file_context
end

def test_compile_status_is_zero_when_successful
Expand Down

0 comments on commit cb36fb5

Please sign in to comment.