rake-compiler 0.9.2 → 0.9.3
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.
- data/History.txt +6 -0
- data/README.rdoc +2 -1
- data/spec/lib/rake/extensiontask_spec.rb +31 -21
- data/tasks/bin/cross-ruby.rake +2 -2
- data/tasks/gem.rake +1 -1
- metadata +4 -4
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -340,7 +340,7 @@ describe Rake::ExtensionTask do
|
|
340
340
|
|
341
341
|
it 'should allow usage of RUBY_CC_VERSION to indicate a different version of ruby' do
|
342
342
|
config = mock(Hash)
|
343
|
-
config.should_receive(:[]).with("rbconfig-i386-mingw32-1.9.1").and_return('/
|
343
|
+
config.should_receive(:[]).with("rbconfig-i386-mingw32-1.9.1").and_return('/rubies/1.9.1/rbconfig.rb')
|
344
344
|
YAML.stub!(:load_file).and_return(config)
|
345
345
|
|
346
346
|
ENV['RUBY_CC_VERSION'] = '1.9.1'
|
@@ -351,8 +351,8 @@ describe Rake::ExtensionTask do
|
|
351
351
|
|
352
352
|
it 'should allow multiple versions be supplied to RUBY_CC_VERSION' do
|
353
353
|
config = mock(Hash)
|
354
|
-
config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.8.6").and_return('/
|
355
|
-
config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.9.1").and_return('/
|
354
|
+
config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.8.6").and_return('/rubies/1.8.6/rbconfig.rb')
|
355
|
+
config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.9.1").and_return('/rubies/1.9.1/rbconfig.rb')
|
356
356
|
YAML.stub!(:load_file).and_return(config)
|
357
357
|
|
358
358
|
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
|
@@ -368,7 +368,7 @@ describe Rake::ExtensionTask do
|
|
368
368
|
context "(cross compile for multiple versions)" do
|
369
369
|
before :each do
|
370
370
|
config = mock(Hash)
|
371
|
-
config.stub!(:[]).and_return('/
|
371
|
+
config.stub!(:[]).and_return('/rubies/1.8.6/rbconfig.rb', '/rubies/1.9.1/rbconfig.rb')
|
372
372
|
YAML.stub!(:load_file).and_return(config)
|
373
373
|
|
374
374
|
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
|
@@ -475,24 +475,34 @@ describe Rake::ExtensionTask do
|
|
475
475
|
end
|
476
476
|
|
477
477
|
def mock_config_yml
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
'rbconfig-i386-mingw32-1.9.3' => '/some/path/version/1.9.1/to/rbconfig.rb',
|
488
|
-
'rbconfig-universal-known-1.9.3' => '/some/path/version/1.9.1/to/rbconfig.rb',
|
489
|
-
'rbconfig-universal-known-2.0.0' => '/some/path/version/2.0.0/to/rbconfig.rb',
|
490
|
-
'rbconfig-universal-unknown-1.9.3' => '/some/path/version/1.9.1/to/rbconfig.rb',
|
491
|
-
'rbconfig-universal-unknown-2.0.0' => '/some/path/version/2.0.0/to/rbconfig.rb',
|
492
|
-
'rbconfig-i386-mingw32-2.0.0' => '/some/path/version/2.0.0/to/rbconfig.rb',
|
493
|
-
'rbconfig-x64-mingw32-2.0.0' => '/some/path/version/2.0.0/to/rbconfig.rb',
|
494
|
-
'rbconfig-x64-mingw32-3.0.0' => '/some/fake/version/3.0.0/to/rbconfig.rb'
|
478
|
+
return @mock_config_yml if @mock_config_yml
|
479
|
+
|
480
|
+
versions = {
|
481
|
+
"1.8.6" => "1.8",
|
482
|
+
"1.8.7" => "1.8",
|
483
|
+
"1.9.3" => "1.9.1",
|
484
|
+
"2.0.0" => "2.0.0",
|
485
|
+
"2.1.2" => "2.1.0",
|
486
|
+
RUBY_VERSION => RbConfig::CONFIG["ruby_version"]
|
495
487
|
}
|
488
|
+
|
489
|
+
platforms = [
|
490
|
+
"i386-mingw32",
|
491
|
+
"universal-known",
|
492
|
+
"universal-unknown",
|
493
|
+
"x64-mingw32",
|
494
|
+
RUBY_PLATFORM
|
495
|
+
]
|
496
|
+
|
497
|
+
@mock_config_yml = {}
|
498
|
+
|
499
|
+
platforms.collect do |platform|
|
500
|
+
versions.each do |version, api_version|
|
501
|
+
@mock_config_yml["rbconfig-#{platform}-#{version}"] = "/rubies/#{api_version}/rbconfig.rb"
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
@mock_config_yml
|
496
506
|
end
|
497
507
|
|
498
508
|
def mock_fake_rb
|
data/tasks/bin/cross-ruby.rake
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
# http://eigenclass.org/hiki/cross+compiling+rcovrt
|
14
14
|
#
|
15
15
|
# This recipe only cleanup the dependency chain and automate it.
|
16
|
-
# Also opens the door to usage different ruby versions
|
16
|
+
# Also opens the door to usage different ruby versions
|
17
17
|
# for cross-compilation.
|
18
18
|
#
|
19
19
|
|
@@ -79,7 +79,7 @@ file "#{USER_HOME}/sources/#{RUBY_CC_VERSION}.tar.bz2" => ["#{USER_HOME}/sources
|
|
79
79
|
if RUBY_SOURCE
|
80
80
|
url = RUBY_SOURCE
|
81
81
|
else
|
82
|
-
url = "http://
|
82
|
+
url = "http://cache.ruby-lang.org/pub/ruby/#{MAJOR}/#{File.basename(t.name)}"
|
83
83
|
end
|
84
84
|
sh "wget #{url} || curl -O #{url}"
|
85
85
|
end
|
data/tasks/gem.rake
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-compiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 3
|
10
|
+
version: 0.9.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luis Lavena
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2014-08-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|