File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,15 @@ 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'
@@ -18,11 +27,6 @@ Rake::ExtensionTask.new('libsass', gem_spec) do |ext|
18
27
19
28
ext . cross_compiling do |spec |
20
29
spec . files . reject! { |path | File . fnmatch? ( 'ext/*' , path ) }
21
-
22
-
23
- # Reset the required ruby version requirements.
24
- # This is set by rake-compiler, but the shared library here is Ruby-agnostic.
25
- spec . required_ruby_version = gem_spec . required_ruby_version
26
30
end
27
31
end
28
32
You can’t perform that action at this time.
0 commit comments