Hello community,
here is the log from the commit of package rubygem-rake-compiler for
openSUSE:Factory checked in at 2017-06-02 10:33:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rake-compiler (Old)
and /work/SRC/openSUSE:Factory/.rubygem-rake-compiler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rake-compiler"
Fri Jun 2 10:33:07 2017 rev:19 rq:499913 version:1.0.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-rake-compiler/rubygem-rake-compiler.changes
2016-12-29 22:44:42.125401551 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-rake-compiler.new/rubygem-rake-compiler.changes
2017-06-02 10:33:47.771972486 +0200
@@ -1,0 +2,17 @@
+Tue May 30 05:18:58 UTC 2017 - [email protected]
+
+- updated to version 1.0.4
+ see installed History.txt
+
+ === 1.0.4 / 2017-05-27
+
+ * Enhancements:
+ * Migrate to RSpec 3 from RSpec 2.
+ * Add more tests.
+ #140 [Patch by Lars Kanis]
+ * Support C++ source files by default.
+ #141 [Patch by Takashi Kokubun]
+ * Suppress warnings.
+ #142 [Patch by Akira Matsuda]
+
+-------------------------------------------------------------------
Old:
----
rake-compiler-1.0.3.gem
New:
----
rake-compiler-1.0.4.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-rake-compiler.spec ++++++
--- /var/tmp/diff_new_pack.0AaG6O/_old 2017-06-02 10:33:48.227908065 +0200
+++ /var/tmp/diff_new_pack.0AaG6O/_new 2017-06-02 10:33:48.227908065 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-rake-compiler
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-rake-compiler
-Version: 1.0.3
+Version: 1.0.4
Release: 0
%define mod_name rake-compiler
%define mod_full_name %{mod_name}-%{version}
++++++ rake-compiler-1.0.3.gem -> rake-compiler-1.0.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2016-12-02 15:36:49.000000000 +0100
+++ new/Gemfile 2017-05-26 17:33:44.000000000 +0200
@@ -3,6 +3,6 @@
gem "rake"
group :development do
- gem "rspec", "~> 2.8.0"
- gem "cucumber", "~> 1.1.4"
+ gem "rspec", "~> 3.0"
+ gem "cucumber", "~> 2.0"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/History.txt new/History.txt
--- old/History.txt 2016-12-02 15:36:49.000000000 +0100
+++ new/History.txt 2017-05-26 17:33:44.000000000 +0200
@@ -1,3 +1,14 @@
+=== 1.0.4 / 2017-05-27
+
+* Enhancements:
+ * Migrate to RSpec 3 from RSpec 2.
+ * Add more tests.
+ #140 [Patch by Lars Kanis]
+ * Support C++ source files by default.
+ #141 [Patch by Takashi Kokubun]
+ * Suppress warnings.
+ #142 [Patch by Akira Matsuda]
+
=== 1.0.3 / 2016-12-02
* Enhancements:
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rake/baseextensiontask.rb
new/lib/rake/baseextensiontask.rb
--- old/lib/rake/baseextensiontask.rb 2016-12-02 15:36:49.000000000 +0100
+++ new/lib/rake/baseextensiontask.rb 2017-05-26 17:33:44.000000000 +0200
@@ -19,10 +19,10 @@
attr_accessor :tmp_dir
attr_accessor :ext_dir
attr_accessor :lib_dir
- attr_accessor :platform
attr_accessor :config_options
attr_accessor :source_pattern
attr_accessor :extra_options
+ attr_writer :platform
def platform
@platform ||= RUBY_PLATFORM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/rake/extensiontask.rb
new/lib/rake/extensiontask.rb
--- old/lib/rake/extensiontask.rb 2016-12-02 15:36:49.000000000 +0100
+++ new/lib/rake/extensiontask.rb 2017-05-26 17:33:44.000000000 +0200
@@ -10,7 +10,7 @@
class ExtensionTask < BaseExtensionTask
attr_accessor :config_script
attr_accessor :cross_compile
- attr_accessor :cross_platform
+ attr_writer :cross_platform
attr_writer :cross_config_options
attr_accessor :no_native
attr_accessor :config_includes
@@ -18,14 +18,14 @@
def init(name = nil, gem_spec = nil)
super
@config_script = 'extconf.rb'
- @source_pattern = "*.c"
+ @source_pattern = "*.{c,cc,cpp}"
@compiled_pattern = "*.{o,obj,so,bundle,dSYM}"
@cross_compile = false
@cross_config_options = []
@cross_compiling = nil
@no_native = false
@config_includes = []
- @ruby_versions_per_platform = Hash.new([])
+ @ruby_versions_per_platform = {}
end
def cross_platform
@@ -237,7 +237,6 @@
platf = for_platform || platform
# tmp_path
- tmp_path = "#{@tmp_dir}/#{platf}/#{@name}/#{ruby_ver}"
stage_path = "#{@tmp_dir}/#{platf}/stage"
# lib_path
@@ -255,10 +254,13 @@
spec.platform = Gem::Platform.new(platf)
# set ruby version constraints
- cross_rubies = @ruby_versions_per_platform[platf]
+ ruby_versions = @ruby_versions_per_platform[platf] || []
+ sorted_ruby_versions = ruby_versions.sort_by do |ruby_version|
+ ruby_version.split(".").collect(&:to_i)
+ end
spec.required_ruby_version = [
- ">= #{version_ary2str( cross_rubies.min[0,2] )}",
- "< #{version_ary2str( cross_rubies.max[0,2].succ )}"
+ ">= #{ruby_api_version(sorted_ruby_versions.first)}",
+ "< #{ruby_api_version(sorted_ruby_versions.last).succ}"
]
# clear the extensions defined in the specs
@@ -280,12 +282,12 @@
callback.call(spec) if callback
# Generate a package for this gem
- pkg = Gem::PackageTask.new(spec) do |pkg|
- pkg.need_zip = false
- pkg.need_tar = false
+ pkg = Gem::PackageTask.new(spec) do |p|
+ p.need_zip = false
+ p.need_tar = false
# Do not copy any files per PackageTask, because
# we need the files from the staging directory
- pkg.package_files.clear
+ p.package_files.clear
end
# copy other gem files to staging directory if added by the callback
@@ -355,7 +357,8 @@
end
# Update cross compiled platform/version combinations
- @ruby_versions_per_platform[for_platform] << version_str2ary(version)
+ ruby_versions = (@ruby_versions_per_platform[for_platform] ||= [])
+ ruby_versions << version
define_cross_platform_tasks_with_version(for_platform, version)
@@ -508,12 +511,8 @@
[*@cross_platform].map { |p| "native:#{p}" }
end
- def version_str2ary(version_string)
- version_string[/\A[^-]+/].split(".").map(&:to_i).pack("C*")
- end
-
- def version_ary2str(version_ary)
- version_ary.unpack("C*").join(".")
+ def ruby_api_version(ruby_version)
+ ruby_version.split(".")[0, 2].join(".")
end
def fake_rb(platform, version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2016-12-02 15:36:49.000000000 +0100
+++ new/metadata 2017-05-26 17:33:44.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: rake-compiler
version: !ruby/object:Gem::Version
- version: 1.0.3
+ version: 1.0.4
platform: ruby
authors:
- Kouhei Sutou
@@ -9,7 +9,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2016-12-02 00:00:00.000000000 Z
+date: 2017-05-26 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/lib/rake/extensiontask_spec.rb
new/spec/lib/rake/extensiontask_spec.rb
--- old/spec/lib/rake/extensiontask_spec.rb 2016-12-02 15:36:49.000000000
+0100
+++ new/spec/lib/rake/extensiontask_spec.rb 2017-05-26 17:33:44.000000000
+0200
@@ -77,8 +77,8 @@
@ext.lib_dir.should == 'lib'
end
- it 'should look for C files pattern (.c)' do
- @ext.source_pattern.should == "*.c"
+ it 'should look for C/C++ files pattern (.c,.cc,.cpp)' do
+ @ext.source_pattern.should == "*.{c,cc,cpp}"
end
it 'should have no configuration options preset to delegate' do
@@ -94,7 +94,7 @@
end
it 'should default to no cross compilation' do
- @ext.cross_compile.should be_false
+ @ext.cross_compile.should == false
end
it 'should have no configuration options for cross compilation' do
@@ -115,7 +115,7 @@
context '(one extension)' do
before :each do
- Rake::FileList.stub!(:[]).and_return(["ext/extension_one/source.c"],
[])
+ allow(Rake::FileList).to
receive(:[]).and_return(["ext/extension_one/source.c"], [])
@ext = Rake::ExtensionTask.new('extension_one')
@ext_bin = ext_bin('extension_one')
@platform = RUBY_PLATFORM
@@ -124,7 +124,7 @@
context 'compile' do
it 'should define as task' do
- Rake::Task.task_defined?('compile').should be_true
+ Rake::Task.task_defined?('compile').should == true
end
it "should depend on 'compile:{platform}'" do
@@ -134,7 +134,7 @@
context 'compile:extension_one' do
it 'should define as task' do
- Rake::Task.task_defined?('compile:extension_one').should be_true
+ Rake::Task.task_defined?('compile:extension_one').should == true
end
it "should depend on 'compile:extension_one:{platform}'" do
@@ -144,7 +144,7 @@
context 'lib/extension_one.{so,bundle}' do
it 'should define as task' do
- Rake::Task.task_defined?("lib/#{@ext_bin}").should be_true
+ Rake::Task.task_defined?("lib/#{@ext_bin}").should == true
end
it "should depend on 'copy:extension_one:{platform}:{ruby_ver}'" do
@@ -154,7 +154,7 @@
context
'tmp/{platform}/extension_one/{ruby_ver}/extension_one.{so,bundle}' do
it 'should define as task' do
-
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/#{@ruby_ver}/#{@ext_bin}").should
be_true
+
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/#{@ruby_ver}/#{@ext_bin}").should
== true
end
it "should depend on
'tmp/{platform}/extension_one/{ruby_ver}/Makefile'" do
@@ -172,7 +172,7 @@
context 'tmp/{platform}/extension_one/{ruby_ver}/Makefile' do
it 'should define as task' do
-
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/#{@ruby_ver}/Makefile").should
be_true
+
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/#{@ruby_ver}/Makefile").should
== true
end
it "should depend on 'tmp/{platform}/extension_one/{ruby_ver}'" do
@@ -201,7 +201,7 @@
end
it "should warn when pre-compiled files exist in extension directory" do
- Rake::FileList.stub!(:[]).
+ allow(Rake::FileList).to receive(:[]).
and_return(["ext/extension_one/source.c"],
["ext/extension_one/source.o"])
@@ -214,7 +214,7 @@
context '(extension in custom location)' do
before :each do
- Rake::FileList.stub!(:[]).and_return(["ext/extension_one/source.c"],
[])
+ allow(Rake::FileList).to
receive(:[]).and_return(["ext/extension_one/source.c"], [])
@ext = Rake::ExtensionTask.new('extension_one') do |ext|
ext.ext_dir = 'custom/ext/foo'
end
@@ -232,7 +232,7 @@
context '(native tasks)' do
before :each do
- Rake::FileList.stub!(:[]).and_return(["ext/extension_one/source.c"],
[])
+ allow(Rake::FileList).to
receive(:[]).and_return(["ext/extension_one/source.c"], [])
@spec = mock_gem_spec
@ext_bin = ext_bin('extension_one')
@platform = RUBY_PLATFORM
@@ -241,24 +241,24 @@
context 'native' do
before :each do
- @spec.stub!(:platform=).and_return('ruby')
+ allow(@spec).to receive(:platform=).and_return('ruby')
end
it 'should define a task for building the supplied gem' do
Rake::ExtensionTask.new('extension_one', @spec)
- Rake::Task.task_defined?('native:my_gem').should be_true
+ Rake::Task.task_defined?('native:my_gem').should == true
end
it 'should define as task for pure ruby gems' do
- Rake::Task.task_defined?('native').should be_false
+ Rake::Task.task_defined?('native').should == false
Rake::ExtensionTask.new('extension_one', @spec)
- Rake::Task.task_defined?('native').should be_true
+ Rake::Task.task_defined?('native').should == true
end
it 'should not define a task for already native gems' do
- @spec.stub!(:platform).and_return('current')
+ allow(@spec).to receive(:platform).and_return('current')
Rake::ExtensionTask.new('extension_one', @spec)
- Rake::Task.task_defined?('native').should be_false
+ Rake::Task.task_defined?('native').should == false
end
it 'should depend on platform specific native tasks' do
@@ -277,7 +277,7 @@
context '(one extension whose name with directory prefixes)' do
before :each do
-
Rake::FileList.stub!(:[]).and_return(["ext/prefix1/prefix2/extension_one/source.c"],
[])
+ allow(Rake::FileList).to
receive(:[]).and_return(["ext/prefix1/prefix2/extension_one/source.c"], [])
@ext = Rake::ExtensionTask.new('prefix1/prefix2/extension_one')
@ext_bin = ext_bin('extension_one')
@platform = RUBY_PLATFORM
@@ -286,7 +286,7 @@
context 'compile' do
it 'should define as task' do
- Rake::Task.task_defined?('compile').should be_true
+ Rake::Task.task_defined?('compile').should == true
end
it "should depend on 'compile:{platform}'" do
@@ -296,7 +296,7 @@
context 'compile:prefix1/prefix2/extension_one' do
it 'should define as task' do
-
Rake::Task.task_defined?('compile:prefix1/prefix2/extension_one').should be_true
+
Rake::Task.task_defined?('compile:prefix1/prefix2/extension_one').should == true
end
it "should depend on
'compile:prefix1/prefix2/extension_one:{platform}'" do
@@ -306,7 +306,7 @@
context 'lib/prefix1/prefix2/extension_one.{so,bundle}' do
it 'should define as task' do
- Rake::Task.task_defined?("lib/prefix1/prefix2/#{@ext_bin}").should
be_true
+ Rake::Task.task_defined?("lib/prefix1/prefix2/#{@ext_bin}").should
== true
end
it "should depend on
'copy:prefix1/prefix2/extension_one:{platform}:{ruby_ver}'" do
@@ -316,7 +316,7 @@
context
'tmp/{platform}/prefix1/prefix2/extension_one/{ruby_ver}/prefix1/prefix2/extension_one.{so,bundle}'
do
it 'should define as task' do
-
Rake::Task.task_defined?("tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/prefix1/prefix2/#{@ext_bin}").should
be_true
+
Rake::Task.task_defined?("tmp/#{@platform}/prefix1/prefix2/extension_one/#{@ruby_ver}/prefix1/prefix2/#{@ext_bin}").should
== true
end
it "should depend on
'tmp/{platform}/prefix1/prefix2/extension_one/{ruby_ver}/Makefile'" do
@@ -335,21 +335,21 @@
context '(cross platform tasks)' do
before :each do
- File.stub!(:exist?).and_return(true)
- YAML.stub!(:load_file).and_return(mock_config_yml)
- Rake::FileList.stub!(:[]).and_return(["ext/extension_one/source.c"],
[])
+ allow(File).to receive(:exist?).and_return(true)
+ allow(YAML).to receive(:load_file).and_return(mock_config_yml)
+ allow(Rake::FileList).to
receive(:[]).and_return(["ext/extension_one/source.c"], [])
@spec = mock_gem_spec
@config_file = File.expand_path("~/.rake-compiler/config.yml")
@ruby_ver = RUBY_VERSION
@platform = 'i386-mingw32'
@config_path = mock_config_yml["rbconfig-#{@platform}-#{@ruby_ver}"]
- File.stub!(:open).and_yield(mock_fake_rb)
+ allow(File).to receive(:open).and_yield(mock_fake_rb)
end
context 'if no rake-compiler configuration exists' do
before :each do
- File.should_receive(:exist?).with(@config_file).and_return(false)
+ expect(File).to receive(:exist?).with(@config_file).and_return(false)
_, @err = capture_output do
Rake::ExtensionTask.new('extension_one') do |ext|
@@ -373,16 +373,16 @@
end
it 'should parse the config file using YAML' do
-
YAML.should_receive(:load_file).with(@config_file).and_return(mock_config_yml)
+ expect(YAML).to
receive(:load_file).with(@config_file).and_return(mock_config_yml)
Rake::ExtensionTask.new('extension_one') do |ext|
ext.cross_compile = true
end
end
it 'should warn if no section of config file defines running version of
ruby' do
- config = mock(Hash)
-
config.should_receive(:[]).with("rbconfig-#{@platform}-#{@ruby_ver}").and_return(nil)
- YAML.stub!(:load_file).and_return(config)
+ config = Hash.new
+ expect(config).to
receive(:[]).with("rbconfig-#{@platform}-#{@ruby_ver}").and_return(nil)
+ allow(YAML).to receive(:load_file).and_return(config)
out, err = capture_output do
Rake::ExtensionTask.new('extension_one') do |ext|
ext.cross_compile = true
@@ -402,9 +402,9 @@
end
it 'should generate additional rake tasks if files are added when cross
compiling' do
- config = mock(Hash)
- config.stub!(:[]).and_return('/rubies/1.9.1/rbconfig.rb')
- YAML.stub!(:load_file).and_return(config)
+ config = Hash.new
+ allow(config).to receive(:[]).and_return('/rubies/1.9.1/rbconfig.rb')
+ allow(YAML).to receive(:load_file).and_return(config)
# Use a real spec instead of a mock because define_native_tasks dups
and
# calls methods on Gem::Specification, which is more than mock can do.
@@ -416,7 +416,7 @@
# Gem::PackageTask calls Rake::PackageTask which sets
Gem.configuration.verbose,
# which initializes Gem::ConfigFile,
# which gets mad if it cannot find `sysconfdir`/gemrc
- Gem.stub_chain(:configuration, :verbose=).and_return(true)
+ allow(Gem).to receive_message_chain(:configuration,
:verbose=).and_return(true)
ENV['RUBY_CC_VERSION'] = '1.9.1'
Rake::ExtensionTask.new('extension_one', spec) do |ext|
@@ -432,9 +432,9 @@
end
it 'should allow usage of RUBY_CC_VERSION to indicate a different
version of ruby' do
- config = mock(Hash)
-
config.should_receive(:[]).with("rbconfig-i386-mingw32-1.9.1").and_return('/rubies/1.9.1/rbconfig.rb')
- YAML.stub!(:load_file).and_return(config)
+ config = Hash.new
+ expect(config).to
receive(:[]).with("rbconfig-i386-mingw32-1.9.1").and_return('/rubies/1.9.1/rbconfig.rb')
+ allow(YAML).to receive(:load_file).and_return(config)
ENV['RUBY_CC_VERSION'] = '1.9.1'
Rake::ExtensionTask.new('extension_one') do |ext|
@@ -443,10 +443,10 @@
end
it 'should allow multiple versions be supplied to RUBY_CC_VERSION' do
- config = mock(Hash)
-
config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.8.6").and_return('/rubies/1.8.6/rbconfig.rb')
-
config.should_receive(:[]).once.with("rbconfig-i386-mingw32-1.9.1").and_return('/rubies/1.9.1/rbconfig.rb')
- YAML.stub!(:load_file).and_return(config)
+ config = Hash.new
+ expect(config).to
receive(:[]).once.with("rbconfig-i386-mingw32-1.8.6").and_return('/rubies/1.8.6/rbconfig.rb')
+ expect(config).to
receive(:[]).once.with("rbconfig-i386-mingw32-1.9.1").and_return('/rubies/1.9.1/rbconfig.rb')
+ allow(YAML).to receive(:load_file).and_return(config)
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
Rake::ExtensionTask.new('extension_one') do |ext|
@@ -454,25 +454,27 @@
end
end
- it "should set required_ruby_version from RUBY_CC_VERSION" do
+ it "should set required_ruby_version from RUBY_CC_VERSION, set platform,
clear extensions but keep metadata" do
platforms = ["x86-mingw32", "x64-mingw32"]
- ruby_cc_versions = ["2.1.10", "2.2.6", "2.3.3"]
+ ruby_cc_versions = ["1.8.6", "2.1.10", "2.2.6", "2.3.3", "2.10.1"]
ENV["RUBY_CC_VERSION"] = ruby_cc_versions.join(":")
- config = mock(Hash)
+ config = Hash.new
ruby_cc_versions.each do |ruby_cc_version|
platforms.each do |platform|
- config.stub!(:[]).
+ allow(config).to receive(:[]).
with("rbconfig-#{platform}-#{ruby_cc_version}").
and_return("/rubies/#{ruby_cc_version}/rbconfig.rb")
end
end
- YAML.stub!(:load_file).and_return(config)
+ allow(YAML).to receive(:load_file).and_return(config)
- Gem.stub_chain(:configuration, :verbose=).and_return(true)
+ allow(Gem).to receive_message_chain(:configuration,
:verbose=).and_return(true)
spec = Gem::Specification.new do |s|
s.name = 'my_gem'
s.platform = Gem::Platform::RUBY
+ s.extensions = ['ext/somegem/extconf.rb']
+ s.metadata['allowed_push_host'] = 'http://test'
end
cross_specs = []
@@ -488,10 +490,19 @@
end
expected_required_ruby_versions = [
- Gem::Requirement.new([">= 2.1", "< 2.4"]),
- Gem::Requirement.new([">= 2.1", "< 2.4"]),
+ Gem::Requirement.new([">= 1.8", "< 2.11"]),
+ Gem::Requirement.new([">= 1.8", "< 2.11"]),
]
cross_specs.collect(&:required_ruby_version).should ==
expected_required_ruby_versions
+ cross_specs.collect(&:extensions).should == [[], []]
+ cross_specs.collect(&:platform).collect(&:to_s).should == platforms
+ cross_specs.collect{|s| s.metadata['allowed_push_host']}.should ==
['http://test', 'http://test']
+
+ # original gemspec should keep unchanged
+ spec.required_ruby_version.should == Gem::Requirement.new([">= 0"])
+ spec.platform.should == Gem::Platform::RUBY
+ spec.extensions.should == ['ext/somegem/extconf.rb']
+ spec.metadata['allowed_push_host'].should == 'http://test'
end
after :each do
@@ -500,9 +511,9 @@
context "(cross compile for multiple versions)" do
before :each do
- config = mock(Hash)
- config.stub!(:[]).and_return('/rubies/1.8.6/rbconfig.rb',
'/rubies/1.9.1/rbconfig.rb')
- YAML.stub!(:load_file).and_return(config)
+ config = Hash.new
+ allow(config).to
receive(:[]).and_return('/rubies/1.8.6/rbconfig.rb',
'/rubies/1.9.1/rbconfig.rb')
+ allow(YAML).to receive(:load_file).and_return(config)
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
@ext = Rake::ExtensionTask.new('extension_one') do |ext|
@@ -548,7 +559,7 @@
context 'compile:universal-unknown' do
it "should be defined" do
- Rake::Task.task_defined?('compile:universal-unknown').should
be_true
+ Rake::Task.task_defined?('compile:universal-unknown').should ==
true
end
it "should depend on 'compile:extension_one:universal-unknown'" do
@@ -558,7 +569,7 @@
context 'native:universal-unknown' do
it "should be defined" do
- Rake::Task.task_defined?('native:universal-unknown').should be_true
+ Rake::Task.task_defined?('native:universal-unknown').should == true
end
it "should depend on 'native:my_gem:universal-unknown'" do
@@ -596,7 +607,7 @@
end
def mock_gem_spec(stubs = {})
- mock(Gem::Specification,
+ double(Gem::Specification,
{ :name => 'my_gem', :platform => 'ruby', :files => [] }.merge(stubs)
)
end
@@ -633,6 +644,6 @@
end
def mock_fake_rb
- mock(File, :write => 45)
+ double(File, :write => 45)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/spec/lib/rake/javaextensiontask_spec.rb
new/spec/lib/rake/javaextensiontask_spec.rb
--- old/spec/lib/rake/javaextensiontask_spec.rb 2016-12-02 15:36:49.000000000
+0100
+++ new/spec/lib/rake/javaextensiontask_spec.rb 2017-05-26 17:33:44.000000000
+0200
@@ -89,7 +89,7 @@
context '(one extension)' do
before :each do
- Rake::FileList.stub!(:[]).and_return(["ext/extension_one/source.java"])
+ allow(Rake::FileList).to
receive(:[]).and_return(["ext/extension_one/source.java"])
@ext = Rake::JavaExtensionTask.new('extension_one')
@ext_bin = ext_bin('extension_one')
@platform = 'java'
@@ -97,7 +97,7 @@
context 'compile' do
it 'should define as task' do
- Rake::Task.task_defined?('compile').should be_true
+ Rake::Task.task_defined?('compile').should == true
end
it "should depend on 'compile:{platform}'" do
@@ -108,7 +108,7 @@
context 'compile:extension_one' do
it 'should define as task' do
- Rake::Task.task_defined?('compile:extension_one').should be_true
+ Rake::Task.task_defined?('compile:extension_one').should == true
end
it "should depend on 'compile:extension_one:{platform}'" do
@@ -131,7 +131,7 @@
context 'tmp/{platform}/extension_one/extension_one.jar' do
it 'should define as task' do
-
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/#{@ext_bin}").should
be_true
+
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/#{@ext_bin}").should
== true
end
it "should depend on checkpoint file" do
@@ -141,7 +141,7 @@
context 'tmp/{platform}/extension_one/.build' do
it 'should define as task' do
-
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/.build").should be_true
+
Rake::Task.task_defined?("tmp/#{@platform}/extension_one/.build").should == true
end
it 'should depend on source files' do
@@ -174,7 +174,7 @@
end
def mock_gem_spec(stubs = {})
- mock(Gem::Specification,
+ double(Gem::Specification,
{ :name => 'my_gem', :platform => 'ruby' }.merge(stubs)
)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/tasks/gem.rake new/tasks/gem.rake
--- old/tasks/gem.rake 2016-12-02 15:36:49.000000000 +0100
+++ new/tasks/gem.rake 2017-05-26 17:33:44.000000000 +0200
@@ -3,7 +3,7 @@
GEM_SPEC = Gem::Specification.new do |s|
# basic information
s.name = "rake-compiler"
- s.version = "1.0.3"
+ s.version = "1.0.4"
s.platform = Gem::Platform::RUBY
# description and details