1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] Extract a gemspec_dir helper

https://github.com/bundler/bundler/commit/71a29e286a
This commit is contained in:
David Rodríguez 2019-08-16 08:45:11 +02:00 committed by Hiroshi SHIBATA
parent a2d7c97a91
commit 08c58e3c0d
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 5 additions and 2 deletions

View file

@ -309,8 +309,7 @@ RSpec.describe "bundle gem" do
end
it "sets a minimum ruby version" do
gemspec_path = ruby_core? ? "../../../lib/bundler" : "../.."
bundler_gemspec = Bundler::GemHelper.new(File.expand_path(gemspec_path, __dir__)).gemspec
bundler_gemspec = Bundler::GemHelper.new(gemspec_dir).gemspec
expect(bundler_gemspec.required_ruby_version).to eq(generated_gemspec.required_ruby_version)
end

View file

@ -13,6 +13,10 @@ module Spec
@gemspec ||= root.join(ruby_core? ? "lib/bundler/bundler.gemspec" : "bundler.gemspec")
end
def gemspec_dir
@gemspec_dir ||= gemspec.parent
end
def bindir
@bindir ||= root.join(ruby_core? ? "libexec" : "exe")
end