[bundler/bundler] Extract a root_gemspec
local variable
https://github.com/bundler/bundler/commit/a4beba4cbf
This commit is contained in:
parent
09455301ef
commit
4318405609
@ -134,11 +134,12 @@ module Spec
|
|||||||
|
|
||||||
def with_root_gemspec
|
def with_root_gemspec
|
||||||
if ruby_core?
|
if ruby_core?
|
||||||
|
root_gemspec = root.join("bundler.gemspec")
|
||||||
spec = Gem::Specification.load(gemspec.to_s)
|
spec = Gem::Specification.load(gemspec.to_s)
|
||||||
spec.bindir = "libexec"
|
spec.bindir = "libexec"
|
||||||
File.open(root.join("bundler.gemspec").to_s, "w") {|f| f.write spec.to_ruby }
|
File.open(root_gemspec.to_s, "w") {|f| f.write spec.to_ruby }
|
||||||
yield(root.join("bundler.gemspec"))
|
yield(root_gemspec)
|
||||||
FileUtils.rm(root.join("bundler.gemspec"))
|
FileUtils.rm(root_gemspec)
|
||||||
else
|
else
|
||||||
yield(gemspec)
|
yield(gemspec)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user