sassc 2.1.0.pre1-x86-linux → 2.1.0.pre2-x86-linux
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 +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +6 -3
- data/CHANGELOG.md +4 -0
- data/Rakefile +26 -3
- data/lib/sassc/native.rb +3 -11
- data/lib/sassc/native/native_functions_api.rb +0 -5
- data/lib/sassc/version.rb +1 -1
- data/sassc.gemspec +18 -6
- data/test/engine_test.rb +1 -1
- metadata +4 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad04ef35e4718a6b9fe624367b48b31346ac3277dcff7f1f1ff097afeb65b2d5
|
4
|
+
data.tar.gz: 37d763e20efded0e5277e529eed455e1ff5c6ded96ff340e260d2d831f9a7dbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d45a58b52184f18979904eec2e550dec094bf8d90c46238708f6bc19594812c5ba895dffdf6b32502e68a82a44896415ebd89c3fc4962f05c0a9cfc7f0478dc7
|
7
|
+
data.tar.gz: 165a788a95eb33feecdab2d8fbf66f21e3f61980afef461f29760dddeebfb7487ff41fc51fc97079d737331713e3f71621788cf814dd5ad5402dfba2c3d32be4
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -3,9 +3,12 @@ language: ruby
|
|
3
3
|
bundler_args: "--binstubs --standalone --without documentation --path ../bundle"
|
4
4
|
script: "bundle exec rake test"
|
5
5
|
rvm:
|
6
|
+
- 2.0.0
|
7
|
+
- 2.1.10
|
8
|
+
- 2.2.10
|
6
9
|
- 2.3.8
|
7
|
-
- 2.4.
|
8
|
-
- 2.5.
|
9
|
-
- 2.6.
|
10
|
+
- 2.4.6
|
11
|
+
- 2.5.5
|
12
|
+
- 2.6.3
|
10
13
|
notifications:
|
11
14
|
email: false
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
- **2.1.0.pre2**
|
2
|
+
- [Reduce Ruby warnings](https://github.com/sass/sassc-ruby/pull/124)
|
3
|
+
- [prefer equal? to determine object identity](https://github.com/sass/sassc-ruby/pull/122)
|
4
|
+
- [Link C/C++ stdlib statically for binary gems](https://github.com/sass/sassc-ruby/pull/127)
|
1
5
|
- **2.1.0.pre1**
|
2
6
|
- [Update Libsass to 3.6.0](https://github.com/sass/sassc-ruby/pull/96/files)
|
3
7
|
- [Support old Ruby versions](https://github.com/sass/sassc-ruby/pull/117/files)
|
data/Rakefile
CHANGED
@@ -4,12 +4,27 @@ task default: :test
|
|
4
4
|
|
5
5
|
require 'rake/extensiontask'
|
6
6
|
gem_spec = Gem::Specification.load("sassc.gemspec")
|
7
|
+
|
8
|
+
# HACK: Prevent rake-compiler from overriding required_ruby_version,
|
9
|
+
# because the shared library here is Ruby-agnostic.
|
10
|
+
# See https://github.com/rake-compiler/rake-compiler/issues/153
|
11
|
+
module FixRequiredRubyVersion
|
12
|
+
def required_ruby_version=(*); end
|
13
|
+
end
|
14
|
+
Gem::Specification.send(:prepend, FixRequiredRubyVersion)
|
15
|
+
|
7
16
|
Rake::ExtensionTask.new('libsass', gem_spec) do |ext|
|
8
17
|
ext.name = 'libsass'
|
9
18
|
ext.ext_dir = 'ext'
|
10
19
|
ext.lib_dir = 'lib/sassc'
|
11
20
|
ext.cross_compile = true
|
12
21
|
ext.cross_platform = %w[x86-mingw32 x64-mingw32 x86-linux x86_64-linux]
|
22
|
+
|
23
|
+
# Link C++ stdlib statically when building binary gems.
|
24
|
+
ext.cross_config_options << '--enable-static-stdlib'
|
25
|
+
|
26
|
+
ext.cross_config_options << '--disable-march-tune-native'
|
27
|
+
|
13
28
|
ext.cross_compiling do |spec|
|
14
29
|
spec.files.reject! { |path| File.fnmatch?('ext/*', path) }
|
15
30
|
end
|
@@ -18,11 +33,19 @@ end
|
|
18
33
|
desc 'Compile all native gems via rake-compiler-dock (Docker)'
|
19
34
|
task 'gem:native' do
|
20
35
|
require 'rake_compiler_dock'
|
21
|
-
|
22
|
-
|
23
|
-
|
36
|
+
|
37
|
+
# The RUBY_CC_VERSION here doesn't matter for the final package.
|
38
|
+
# Only one version should be specified, as the shared library is Ruby-agnostic.
|
39
|
+
#
|
40
|
+
# g++-multilib is installed for 64->32-bit cross-compilation.
|
41
|
+
RakeCompilerDock.sh "sudo apt-get install -y g++-multilib && bundle && gem i rake --no-document && "\
|
42
|
+
"rake clean && rake cross native gem MAKE='nice make -j`nproc`' "\
|
43
|
+
"RUBY_CC_VERSION=2.6.0 CLEAN=1"
|
24
44
|
end
|
25
45
|
|
46
|
+
CLEAN.include 'tmp', 'pkg', 'lib/sassc/libsass.so', 'ext/libsass/VERSION',
|
47
|
+
'ext/*.{o,so,bundle}', 'ext/Makefile'
|
48
|
+
|
26
49
|
desc "Run all tests"
|
27
50
|
task test: 'compile:libsass' do
|
28
51
|
$LOAD_PATH.unshift('lib', 'test')
|
data/lib/sassc/native.rb
CHANGED
@@ -6,16 +6,8 @@ module SassC
|
|
6
6
|
module Native
|
7
7
|
extend FFI::Library
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
dl_ext = (RUBY_PLATFORM =~ /darwin/ ? 'bundle' : 'so')
|
13
|
-
ruby_version_so_path = "#{gem_root}/lib/sassc/#{RUBY_VERSION[/\d+.\d+/]}/libsass.#{dl_ext}"
|
14
|
-
if File.exist?(ruby_version_so_path)
|
15
|
-
ffi_lib ruby_version_so_path
|
16
|
-
else
|
17
|
-
ffi_lib "#{gem_root}/lib/sassc/libsass.#{dl_ext}"
|
18
|
-
end
|
9
|
+
dl_ext = (RbConfig::CONFIG['host_os'] =~ /darwin/ ? 'bundle' : 'so')
|
10
|
+
ffi_lib File.expand_path("libsass.#{dl_ext}", __dir__)
|
19
11
|
|
20
12
|
require_relative "native/sass_value"
|
21
13
|
|
@@ -42,7 +34,7 @@ module SassC
|
|
42
34
|
|
43
35
|
# Remove the redundant "sass_" from the beginning of every method name
|
44
36
|
def self.attach_function(*args)
|
45
|
-
super if args.size != 3
|
37
|
+
return super if args.size != 3
|
46
38
|
|
47
39
|
if args[0] =~ /^sass_/
|
48
40
|
args.unshift args[0].to_s.sub(/^sass_/, "")
|
@@ -98,11 +98,6 @@ module SassC
|
|
98
98
|
attach_function "sass_color_set_#{color_channel}".to_sym, [:sass_value_ptr, :double], :void
|
99
99
|
end
|
100
100
|
|
101
|
-
# ADDAPI size_t ADDCALL sass_list_get_length(const union Sass_Value* v)
|
102
|
-
# ADDAPI union Sass_Value* ADDCALL sass_list_get_value (const union Sass_Value* v, size_t i);
|
103
|
-
attach_function :sass_list_get_length, [:sass_value_ptr], :size_t
|
104
|
-
attach_function :sass_list_get_value, [:sass_value_ptr, :size_t], :sass_value_ptr
|
105
|
-
|
106
101
|
# ADDAPI char* ADDCALL sass_error_get_message (const union Sass_Value* v);
|
107
102
|
# ADDAPI void ADDCALL sass_error_set_message (union Sass_Value* v, char* msg);
|
108
103
|
attach_function :sass_error_get_message, [:sass_value_ptr], :string
|
data/lib/sassc/version.rb
CHANGED
data/sassc.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
21
|
|
22
|
-
spec.required_ruby_version = ">= 2.
|
22
|
+
spec.required_ruby_version = ">= 2.0.0"
|
23
23
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
@@ -40,18 +40,30 @@ Gem::Specification.new do |spec|
|
|
40
40
|
gem_dir = File.expand_path(File.dirname(__FILE__)) + "/"
|
41
41
|
|
42
42
|
libsass_dir = File.join(gem_dir, 'ext', 'libsass')
|
43
|
-
if !File.directory?(libsass_dir)
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
if !File.directory?(libsass_dir) ||
|
44
|
+
# '.', '..', and possibly '.git' from a failed checkout:
|
45
|
+
Dir.entries(libsass_dir).size <= 3
|
46
|
+
Dir.chdir(__dir__) { system('git submodule update --init') } or
|
47
|
+
fail 'Could not fetch libsass'
|
48
|
+
end
|
49
|
+
|
50
|
+
# Write a VERSION file for non-binary gems (for `SassC::Native.version`).
|
51
|
+
if !File.exist?(File.join(libsass_dir, 'VERSION'))
|
52
|
+
libsass_version = Dir.chdir(libsass_dir) do
|
53
|
+
%x[git describe --abbrev=4 --dirty --always --tags].chomp
|
54
|
+
end
|
55
|
+
File.write(File.join(libsass_dir, 'VERSION'), libsass_version)
|
47
56
|
end
|
48
57
|
|
49
58
|
Dir.chdir(libsass_dir) do
|
50
59
|
submodule_relative_path = File.join('ext', 'libsass')
|
60
|
+
skip_re = %r{(^("?test|docs|script)/)|\.md$|\.yml$}
|
61
|
+
only_re = %r{\.[ch](pp)?$}
|
51
62
|
`git ls-files`.split($\).each do |filename|
|
52
|
-
next if filename =~
|
63
|
+
next if filename =~ skip_re || filename !~ only_re
|
53
64
|
spec.files << File.join(submodule_relative_path, filename)
|
54
65
|
end
|
66
|
+
spec.files << File.join(submodule_relative_path, 'VERSION')
|
55
67
|
end
|
56
68
|
|
57
69
|
end
|
data/test/engine_test.rb
CHANGED
@@ -286,7 +286,7 @@ CSS
|
|
286
286
|
def test_empty_template_returns_a_new_object
|
287
287
|
input = String.new
|
288
288
|
output = Engine.new(input).render
|
289
|
-
assert input.
|
289
|
+
assert !input.equal?(output), 'empty template must return a new object'
|
290
290
|
end
|
291
291
|
|
292
292
|
def test_empty_template_encoding_matches_input
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.
|
4
|
+
version: 2.1.0.pre2
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Ryan Boland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -153,16 +153,13 @@ files:
|
|
153
153
|
- README.md
|
154
154
|
- Rakefile
|
155
155
|
- lib/sassc.rb
|
156
|
-
- lib/sassc/2.3/libsass.so
|
157
|
-
- lib/sassc/2.4/libsass.so
|
158
|
-
- lib/sassc/2.5/libsass.so
|
159
|
-
- lib/sassc/2.6/libsass.so
|
160
156
|
- lib/sassc/dependency.rb
|
161
157
|
- lib/sassc/engine.rb
|
162
158
|
- lib/sassc/error.rb
|
163
159
|
- lib/sassc/functions_handler.rb
|
164
160
|
- lib/sassc/import_handler.rb
|
165
161
|
- lib/sassc/importer.rb
|
162
|
+
- lib/sassc/libsass.so
|
166
163
|
- lib/sassc/native.rb
|
167
164
|
- lib/sassc/native/lib_c.rb
|
168
165
|
- lib/sassc/native/native_context_api.rb
|
@@ -215,10 +212,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
212
|
requirements:
|
216
213
|
- - ">="
|
217
214
|
- !ruby/object:Gem::Version
|
218
|
-
version:
|
219
|
-
- - "<"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: 2.7.dev
|
215
|
+
version: 2.0.0
|
222
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
217
|
requirements:
|
224
218
|
- - ">"
|