mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Extract a root_gemspec
local variable
https://github.com/bundler/bundler/commit/a4beba4cbf
This commit is contained in:
parent
09455301ef
commit
4318405609
1 changed files with 4 additions and 3 deletions
|
@ -134,11 +134,12 @@ module Spec
|
|||
|
||||
def with_root_gemspec
|
||||
if ruby_core?
|
||||
root_gemspec = root.join("bundler.gemspec")
|
||||
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 }
|
||||
yield(root.join("bundler.gemspec"))
|
||||
FileUtils.rm(root.join("bundler.gemspec"))
|
||||
File.open(root_gemspec.to_s, "w") {|f| f.write spec.to_ruby }
|
||||
yield(root_gemspec)
|
||||
FileUtils.rm(root_gemspec)
|
||||
else
|
||||
yield(gemspec)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue