diff options
author | The Bundler Bot <bot@bundler.io> | 2017-06-16 18:53:09 +0000 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-07-17 12:02:14 -0500 |
commit | eaaf3ab0b6125f5b934207fc93c43ee8078a9078 (patch) | |
tree | dc8f7992f94bafb8a2ae33eadff0ce4ddfb491cf | |
parent | 38b5d5d1cf7b95cab403b30f67a1dc15a300bbc4 (diff) | |
download | bundler-eaaf3ab0b6125f5b934207fc93c43ee8078a9078.tar.gz |
Auto merge of #5728 - bundler:seg-bundle-gem-github-source, r=indirect
Create Gemfiles with an HTTPS github source defined
### What was the end-user problem that led to this PR?
The problem was that people are creating new Gemfiles that use the built-in `github` git source, which is being removed in 2.0. Additionally, it does _not_ use an encrypted connection to GitHub.
### Was was your diagnosis of the problem?
My diagnosis was that we can't change the default because of backwards compatibility, but we can encourage _new_ Gemfiles to "do the right thing".
### What is your fix for the problem, implemented in this PR?
My fix is to add our new, recommended definition of the shortcut to all bundler-generated gemfiles.
### Why did you choose this fix out of the possible options?
I chose this fix because it will only affect new Gemfiles.
(cherry picked from commit d11d693e6b1b28b3e873406ff0f29a4c25e8e67e)
# Conflicts:
# lib/bundler/templates/gems.rb
-rw-r--r-- | lib/bundler/templates/Gemfile | 2 | ||||
-rw-r--r-- | lib/bundler/templates/newgem/Gemfile.tt | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/bundler/templates/Gemfile b/lib/bundler/templates/Gemfile index 7db8998d32..21c6283123 100644 --- a/lib/bundler/templates/Gemfile +++ b/lib/bundler/templates/Gemfile @@ -1,4 +1,6 @@ # frozen_string_literal: true source "https://rubygems.org" +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + # gem "rails" diff --git a/lib/bundler/templates/newgem/Gemfile.tt b/lib/bundler/templates/newgem/Gemfile.tt index 4cd2e40f4f..c114bd6665 100644 --- a/lib/bundler/templates/newgem/Gemfile.tt +++ b/lib/bundler/templates/newgem/Gemfile.tt @@ -1,4 +1,6 @@ source "https://rubygems.org" +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + # Specify your gem's dependencies in <%= config[:name] %>.gemspec gemspec |