rake-compiler 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ === 0.9.3 / 2014-08-03
2
+
3
+ * Bugfixes:
4
+ * Fix specs to run (and pass) on Ruby 2.1 and beyond.
5
+ Pull #94 [hggh]
6
+
1
7
  === 0.9.2 / 2013-11-14
2
8
 
3
9
  * Bugfixes:
@@ -71,7 +71,8 @@ to tell it to use rake-compiler to build your extension:
71
71
 
72
72
  # File: extconf.rb
73
73
 
74
- # this line should already exist
74
+ # these lines must exist already
75
+ require 'mkmf'
75
76
  create_makefile('hello_world')
76
77
 
77
78
 
@@ -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('/path/to/ruby/1.9.1/rbconfig.rb')
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('/path/to/ruby/1.8.6/rbconfig.rb')
355
- config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.9.1").and_return('/path/to/ruby/1.9.1/rbconfig.rb')
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('/path/to/ruby/1.8.6/rbconfig.rb', '/path/to/ruby/1.9.1/rbconfig.rb')
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
- 'rbconfig-i386-mingw32-1.8.6' => '/some/path/version/1.8/to/rbconfig.rb',
480
- 'rbconfig-universal-unknown-1.8.6' => '/some/path/version/1.8/to/rbconfig.rb',
481
- 'rbconfig-i386-mingw32-1.8.7' => '/some/path/version/1.8/to/rbconfig.rb',
482
- 'rbconfig-universal-known-1.8.7' => '/some/path/version/1.8/to/rbconfig.rb',
483
- 'rbconfig-universal-unknown-1.8.7' => '/some/path/version/1.8/to/rbconfig.rb',
484
- 'rbconfig-universal-unknown-1.9.1' => '/some/path/version/1.9.1/to/rbconfig.rb',
485
- 'rbconfig-universal-unknown-1.9.2' => '/some/path/version/1.9.1/to/rbconfig.rb',
486
- 'rbconfig-universal-unknown-1.9.3' => '/some/path/version/1.9.1/to/rbconfig.rb',
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
@@ -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://ftp.ruby-lang.org/pub/ruby/#{MAJOR}/#{File.basename(t.name)}"
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
@@ -3,7 +3,7 @@ require 'rubygems/package_task'
3
3
  GEM_SPEC = Gem::Specification.new do |s|
4
4
  # basic information
5
5
  s.name = "rake-compiler"
6
- s.version = "0.9.2"
6
+ s.version = "0.9.3"
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
9
9
  # description and details
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: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 2
10
- version: 0.9.2
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: 2013-11-14 00:00:00 Z
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