From 280e2d79f5f01431b421518fe606cf542b34bf81 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 30 Mar 2014 10:39:11 +0530 Subject: Remove deprecation warning caused by use of failure_message_for_should - RSpec has replaced failure_message_for_should with failure_message in https://github.com/rspec/rspec-expectations/commit/bfe92020d5569350c1382235feb9b113907fa2db - This change removes deprecation warning caused by https://github.com/rspec/rspec-expectations/commit/cd0d347d3115f8aad801e6dc8fe2a311d75626bd#diff-a51020971ade2c87f1d5b93f20d711c7R207 --- spec/quality_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb index ca3dfc18a5..345fe467ec 100644 --- a/spec/quality_spec.rb +++ b/spec/quality_spec.rb @@ -42,7 +42,7 @@ describe "The library itself" do end RSpec::Matchers.define :be_well_formed do - failure_message_for_should do |actual| + failure_message do |actual| actual.join("\n") end -- cgit v1.2.1 From 8d814c522fb88bdb90f2d0bbc34859125f41675a Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 29 Mar 2014 15:31:05 +0800 Subject: use the newest ruby 2.1 to test with --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cfb3679f98..0755f3aab6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ notifications: # Bundler Ops secure: MNTSGIySYwHia5gIgRiZxXtPMPDIP9KmzQk7Kq2ZoVvP3mIk8W1TMkvcyFkEf6uCasyVZZixzUBfY+E0BlHAz1ycQpTh1jvSpuIpEVYW48ShJldJ+8W8xfzafyOHii3z7VrDaomEffmMDdmHRsbQAfekMjdR4bTpXtT9V+wOXlg= rvm: - - 2.1.0 + - 2.1 - 2.0.0 - 1.9.3 - 1.8.7 -- cgit v1.2.1 From cfac40df71ede29d70dc92c9c13827b85f9e3721 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 29 Mar 2014 15:31:29 +0800 Subject: rubygems 2.2.2 is out now --- .travis.yml | 6 +++--- Rakefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0755f3aab6..f80faeb588 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ env: # We need to know if changes to rubygems will break bundler on release - RGV=master # Test the latest rubygems release with all of our supported rubies - - RGV=v2.2.1 + - RGV=v2.2.2 # Test the latest stable branch so we know the next minor will work - RGV=2.2 matrix: @@ -51,9 +51,9 @@ matrix: env: RGV=master # Alternate implementations - rvm: jruby - env: RGV=v2.2.1 + env: RGV=v2.2.2 - rvm: rbx - env: RGV=v2.2.1 + env: RGV=v2.2.2 # Rubygems goes down to 2.0 on Ruby 2.0.0 - rvm: 2.0.0 env: RGV=v2.1.11 diff --git a/Rakefile b/Rakefile index b79d0b4639..8aee228e0b 100644 --- a/Rakefile +++ b/Rakefile @@ -111,7 +111,7 @@ begin rubyopt = ENV["RUBYOPT"] # When editing this list, also edit .travis.yml! branches = %w(master 2.2) - releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.1) + releases = %w(v1.3.6 v1.3.7 v1.4.2 v1.5.3 v1.6.2 v1.7.2 v1.8.29 v2.0.14 v2.1.11 v2.2.2) (branches + releases).each do |rg| desc "Run specs with Rubygems #{rg}" RSpec::Core::RakeTask.new(rg) do |t| -- cgit v1.2.1 From 029dc28e3f1148c872c049eedd0e47196e7187a6 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 29 Mar 2014 15:51:06 +0800 Subject: clone rubygems via https --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 8aee228e0b..95f3469081 100644 --- a/Rakefile +++ b/Rakefile @@ -127,7 +127,7 @@ begin task "clone_rubygems_#{rg}" do unless File.directory?("tmp/rubygems") - system("git clone git://github.com/rubygems/rubygems.git tmp/rubygems") + system("git clone https://github.com/rubygems/rubygems.git tmp/rubygems") end hash = nil -- cgit v1.2.1 From d98f3f9ba83bc67c6f566a928b78ff0a7ba06420 Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Fri, 28 Mar 2014 14:00:29 -0400 Subject: Use git sha as part of extension directory for git referenced gems. Fixes #2947 --- lib/bundler/rubygems_ext.rb | 9 +++++++++ lib/bundler/source/git.rb | 4 ++++ spec/install/gemfile/git_spec.rb | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index ea018ac972..dccb6fb281 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -45,6 +45,15 @@ module Gem end end + if method_defined?(:extension_dir) + alias_method :rg_extension_dir, :extension_dir + def extension_dir + @extension_dir ||= source.respond_to?(:extension_dir_name) ? + File.expand_path(File.join(extensions_dir, source.extension_dir_name)) : + rg_extension_dir + end + end + # RubyGems 1.8+ used only. remove_method :gem_dir if instance_methods(false).include?(:gem_dir) def gem_dir diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 5919328137..3a42202302 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -90,6 +90,10 @@ module Bundler alias :path :install_path + def extension_dir_name + "#{base_name}-#{shortref_for_path(revision)}" + end + def unlock! git_proxy.revision = nil @unlocked = true diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb index 4933727b36..5d83e47b49 100644 --- a/spec/install/gemfile/git_spec.rb +++ b/spec/install/gemfile/git_spec.rb @@ -854,6 +854,43 @@ describe "bundle install with git sources" do expect(out).to eq("YES") end + it "does not use old extension after ref changes" do + git_reader = build_git "foo", :no_default => true do |s| + s.extensions = ["ext/extconf.rb"] + s.write "ext/extconf.rb", <<-RUBY + require "mkmf" + create_makefile("foo") + RUBY + s.write "ext/foo.c", "void Init_foo() {}" + end + + 2.times do |i| + Dir.chdir(git_reader.path) do + File.open("ext/foo.c", "w") do |file| + file.write <<-C + #include "ruby.h" + VALUE foo() { return INT2FIX(#{i}); } + void Init_foo() { rb_define_global_function("foo", &foo, 0); } + C + end + `git commit -m 'commit for iteration #{i}' ext/foo.c` + end + git_sha = git_reader.ref_for("HEAD") + + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "foo", :git => "#{lib_path('foo-1.0')}", :ref => "#{git_sha}" + G + + run <<-R + require 'foo' + puts foo + R + + expect(out).to eq(i.to_s) + end + end + it "does not prompt to gem install if extension fails" do build_git "foo" do |s| s.add_dependency "rake" -- cgit v1.2.1