summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgis Anastasopoulos <agis.anast@gmail.com>2015-11-02 05:03:17 +0200
committerAgis Anastasopoulos <agis.anast@gmail.com>2015-11-02 05:03:17 +0200
commit9ac0f0635967292652bd6f428a355cf66b0d40e4 (patch)
tree179df42314b6344e75711f0ac3f83470ac9779d8
parent79fbef40df95e323591d824e62918957c29bee2b (diff)
downloadbundler-fix-git-sources-tests.tar.gz
Fix bitbucket/gist sources deprecation warningsfix-git-sources-tests
Also fix the respective test failures which were around for a while.
-rw-r--r--lib/bundler/dsl.rb6
-rw-r--r--spec/deprecation_spec.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 49d3b4bc8e..366c57841c 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -224,14 +224,14 @@ module Bundler
# TODO 2.0 remove this deprecated git source
git_source(:gist) do |repo_name|
- warn_deprecated_git_source(:gist, "https://gist.github.com/#{repo_name}.git")
+ warn_deprecated_git_source(:gist, 'https://gist.github.com/#{repo_name}.git')
"https://gist.github.com/#{repo_name}.git"
end
# TODO 2.0 remove this deprecated git source
git_source(:bitbucket) do |repo_name|
user_name, repo_name = repo_name.split "/"
- warn_deprecated_git_source(:bitbucket, "https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git")
+ warn_deprecated_git_source(:bitbucket, 'https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git')
repo_name ||= user_name
"https://#{user_name}@bitbucket.org/#{user_name}/#{repo_name}.git"
end
@@ -389,7 +389,7 @@ module Bundler
Bundler.ui.deprecate "The :#{name} git source is deprecated, and will be removed " \
"in Bundler 2.0. Add this code to your Gemfile to ensure it continues to work:\n" \
" git_source(:#{name}) do |repo_name|\n" \
- " #{repo_string}\n" \
+ " \"#{repo_string}\"\n" \
" end", true
end
diff --git a/spec/deprecation_spec.rb b/spec/deprecation_spec.rb
index 8bd036c4b1..1eafc26bf5 100644
--- a/spec/deprecation_spec.rb
+++ b/spec/deprecation_spec.rb
@@ -107,8 +107,8 @@ describe "Bundler version 1.99" do
msg = "The :bitbucket git source is deprecated, and will be removed " \
"in Bundler 2.0. Add this code to your Gemfile to ensure it " \
"continues to work:\n git_source(:bitbucket) do |repo_name|\n " \
- " https://\#{user_name}@bitbucket.org/\#{user_name}/\#{repo_name}" \
- ".git\n end"
+ " \"https://\#{user_name}@bitbucket.org/\#{user_name}/\#{repo_name}" \
+ ".git\"\n end"
expect(Bundler.ui).to receive(:deprecate).with(msg, true)
subject.gem("not-really-a-gem", :bitbucket => "mcorp/flatlab-rails")
end
@@ -120,7 +120,7 @@ describe "Bundler version 1.99" do
msg = "The :gist git source is deprecated, and will be removed " \
"in Bundler 2.0. Add this code to your Gemfile to ensure it " \
"continues to work:\n git_source(:gist) do |repo_name|\n " \
- " https://gist.github.com/\#{repo_name}.git\n" \
+ " \"https://gist.github.com/\#{repo_name}.git\"\n" \
" end"
expect(Bundler.ui).to receive(:deprecate).with(msg, true)
subject.gem("not-really-a-gem", :gist => "1234")