summaryrefslogtreecommitdiff
path: root/lib/bundler/dsl.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-06-27 17:39:34 +0200
committerSamuel Giddins <segiddins@segiddins.me>2017-06-28 13:42:45 +0200
commit5d257f1b3b2223a79db565948cefd9f4a5599c0a (patch)
treeaae2c3d46d4b0a918870cdb8300bc0ada1ccde49 /lib/bundler/dsl.rb
parent34234e5e67425fa5d1e857d436846175b6a3b3df (diff)
downloadbundler-5d257f1b3b2223a79db565948cefd9f4a5599c0a.tar.gz
[DSL] Remove default git sources on 2.0seg-no-default-git-sources
Diffstat (limited to 'lib/bundler/dsl.rb')
-rw-r--r--lib/bundler/dsl.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index b91e4034a7..c368c533fe 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -204,6 +204,7 @@ module Bundler
def github(repo, options = {})
raise ArgumentError, "GitHub sources require a block" unless block_given?
+ raise DeprecatedError, "The #github method has been removed" if Bundler.feature_flag.skip_default_git_sources?
github_uri = @git_sources["github"].call(repo)
git_options = normalize_hash(options).merge("uri" => github_uri)
git_source = @sources.add_git_source(git_options)
@@ -264,6 +265,8 @@ module Bundler
private
def add_git_sources
+ return if Bundler.feature_flag.skip_default_git_sources?
+
git_source(:github) do |repo_name|
warn_deprecated_git_source(:github, <<-'RUBY'.strip, 'Change any "reponame" :github sources to "username/reponame".')
"https://github.com/#{repo_name}.git"