[前][次][番号順一覧][スレッド一覧]

ruby-changes:54878

From: hsbt <ko1@a...>
Date: Mon, 18 Feb 2019 18:46:32 +0900 (JST)
Subject: [ruby-changes:54878] hsbt:r67083 (trunk): The ruby core applied the difference structure from bundler upstream repository. We need to modify a configuration for test-bundler.

hsbt	2019-02-18 18:46:25 +0900 (Mon, 18 Feb 2019)

  New Revision: 67083

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67083

  Log:
    The ruby core applied the difference structure from bundler upstream repository. We need to modify a configuration for test-bundler.

  Modified files:
    trunk/spec/bundler/quality_spec.rb
    trunk/spec/bundler/support/helpers.rb
Index: spec/bundler/quality_spec.rb
===================================================================
--- spec/bundler/quality_spec.rb	(revision 67082)
+++ spec/bundler/quality_spec.rb	(revision 67083)
@@ -225,7 +225,16 @@ RSpec.describe "The library itself" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/quality_spec.rb#L225
   it "can still be built" do
     Dir.chdir(root) do
       begin
-        gem_command! :build, gemspec
+        if ruby_core?
+          spec = Gem::Specification.load(gemspec.to_s)
+          spec.bindir = "libexec"
+          File.open(root.join("bundler.gemspec").to_s, "w"){|f| f.write spec.to_ruby }
+          gem_command! :build, root.join("bundler.gemspec").to_s
+          FileUtils.rm(root.join("bundler.gemspec").to_s)
+        else
+          gem_command! :build, gemspec
+        end
+
         if Bundler.rubygems.provides?(">= 2.4")
           # there's no way aroudn this warning
           last_command.stderr.sub!(/^YAML safe loading.*/, "")
@@ -236,8 +245,7 @@ RSpec.describe "The library itself" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/quality_spec.rb#L245
         end
       ensure
         # clean up the .gem generated
-        path_prefix = ruby_core? ? "lib/" : "./"
-        FileUtils.rm("#{path_prefix}bundler-#{Bundler::VERSION}.gem")
+        FileUtils.rm("bundler-#{Bundler::VERSION}.gem")
       end
     end
   end
Index: spec/bundler/support/helpers.rb
===================================================================
--- spec/bundler/support/helpers.rb	(revision 67082)
+++ spec/bundler/support/helpers.rb	(revision 67083)
@@ -313,12 +313,16 @@ module Spec https://github.com/ruby/ruby/blob/trunk/spec/bundler/support/helpers.rb#L313
       gem_repo = options.fetch(:gem_repo) { gem_repo1 }
       gems.each do |g|
         path = if g == :bundler
-          Dir.chdir(root) { gem_command! :build, gemspec.to_s }
-          bundler_path = if ruby_core?
-            root + "lib/bundler-#{Bundler::VERSION}.gem"
+          if ruby_core?
+            spec = Gem::Specification.load(gemspec.to_s)
+            spec.bindir = "libexec"
+            File.open(root.join("bundler.gemspec").to_s, "w"){|f| f.write spec.to_ruby }
+            Dir.chdir(root) { gem_command! :build, root.join("bundler.gemspec").to_s }
+            FileUtils.rm(root.join("bundler.gemspec"))
           else
-            root + "bundler-#{Bundler::VERSION}.gem"
+            Dir.chdir(root) { gem_command! :build, gemspec.to_s }
           end
+          bundler_path = root + "bundler-#{Bundler::VERSION}.gem"
         elsif g.to_s =~ %r{\A/.*\.gem\z}
           g
         else

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]