mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge Bundler 1.17.2 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
23ff1abc9c
commit
36d93e831b
4 changed files with 20 additions and 2 deletions
|
@ -305,7 +305,7 @@ module Bundler
|
||||||
# end
|
# end
|
||||||
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
||||||
# TODO: 2.0 upgrade this setting to the default
|
# TODO: 2.0 upgrade this setting to the default
|
||||||
if Bundler.settings["github.https"]
|
if Bundler.feature_flag.github_https?
|
||||||
Bundler::SharedHelpers.major_deprecation 2, "The `github.https` setting will be removed"
|
Bundler::SharedHelpers.major_deprecation 2, "The `github.https` setting will be removed"
|
||||||
"https://github.com/#{repo_name}.git"
|
"https://github.com/#{repo_name}.git"
|
||||||
else
|
else
|
||||||
|
|
|
@ -60,6 +60,8 @@ module Bundler
|
||||||
|
|
||||||
settings_option(:default_cli_command) { bundler_2_mode? ? :cli_help : :install }
|
settings_option(:default_cli_command) { bundler_2_mode? ? :cli_help : :install }
|
||||||
|
|
||||||
|
settings_method(:github_https?, "github.https") { bundler_2_mode? }
|
||||||
|
|
||||||
def initialize(bundler_version)
|
def initialize(bundler_version)
|
||||||
@bundler_version = Gem::Version.create(bundler_version)
|
@bundler_version = Gem::Version.create(bundler_version)
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,7 @@ module Bundler
|
||||||
# We're doing this because we might write tests that deal
|
# We're doing this because we might write tests that deal
|
||||||
# with other versions of bundler and we are unsure how to
|
# with other versions of bundler and we are unsure how to
|
||||||
# handle this better.
|
# handle this better.
|
||||||
VERSION = "1.17.1" unless defined?(::Bundler::VERSION)
|
VERSION = "1.17.2" unless defined?(::Bundler::VERSION)
|
||||||
|
|
||||||
def self.overwrite_loaded_gem_version
|
def self.overwrite_loaded_gem_version
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -25,7 +25,23 @@ RSpec.describe Bundler::Dsl do
|
||||||
expect { subject.git_source(:example) }.to raise_error(Bundler::InvalidOption)
|
expect { subject.git_source(:example) }.to raise_error(Bundler::InvalidOption)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "github_https feature flag" do
|
||||||
|
it "is true when github.https is true" do
|
||||||
|
bundle "config github.https true"
|
||||||
|
expect(Bundler.feature_flag.github_https?).to eq "true"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context "default hosts (git, gist)", :bundler => "< 2" do
|
context "default hosts (git, gist)", :bundler => "< 2" do
|
||||||
|
context "when github.https config is true" do
|
||||||
|
before { bundle "config github.https true" }
|
||||||
|
it "converts :github to :git using https" do
|
||||||
|
subject.gem("sparks", :github => "indirect/sparks")
|
||||||
|
github_uri = "https://github.com/indirect/sparks.git"
|
||||||
|
expect(subject.dependencies.first.source.uri).to eq(github_uri)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it "converts :github to :git" do
|
it "converts :github to :git" do
|
||||||
subject.gem("sparks", :github => "indirect/sparks")
|
subject.gem("sparks", :github => "indirect/sparks")
|
||||||
github_uri = "git://github.com/indirect/sparks.git"
|
github_uri = "git://github.com/indirect/sparks.git"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue