aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml5
-rw-r--r--Rakefile2
-rw-r--r--lib/bundler/fetcher/compact_index.rb11
-rw-r--r--spec/bundler/gem_helper_spec.rb8
4 files changed, 14 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index f1aeb662..f8dd2dd7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,9 @@
language: ruby
script: rake spec:travis
-before_script: travis_retry rake spec:travis:deps
+before_script:
+ - travis_retry rake spec:travis:deps
+ - travis_retry rake man:build
+ - travis_retry rake spec:rubygems:clone_rubygems_$RGV
branches:
only:
diff --git a/Rakefile b/Rakefile
index b47adc61..7c4a2eb0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -131,7 +131,7 @@ begin
(branches + releases).each do |rg|
desc "Run specs with Rubygems #{rg}"
RSpec::Core::RakeTask.new(rg) do |t|
- t.rspec_opts = %w(--format documentation --color)
+ t.rspec_opts = %w(--format progress --color)
t.ruby_opts = %w(-w)
end
diff --git a/lib/bundler/fetcher/compact_index.rb b/lib/bundler/fetcher/compact_index.rb
index be5683db..b51ba150 100644
--- a/lib/bundler/fetcher/compact_index.rb
+++ b/lib/bundler/fetcher/compact_index.rb
@@ -97,13 +97,12 @@ module Bundler
end
def bundle_worker(func = nil)
- if @bundle_worker
- @bundle_worker.tap do |worker|
- worker.instance_variable_set(:@func, func) if func
- end
- else
+ @bundle_worker ||= begin
worker_name = "Compact Index (#{display_uri.host})"
- @bundle_worker ||= Bundler::Worker.new(25, worker_name, func)
+ Bundler::Worker.new(25, worker_name, func)
+ end
+ @bundle_worker.tap do |worker|
+ worker.instance_variable_set(:@func, func) if func
end
end
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb
index 3d365215..4e1af32c 100644
--- a/spec/bundler/gem_helper_spec.rb
+++ b/spec/bundler/gem_helper_spec.rb
@@ -198,6 +198,10 @@ describe Bundler::GemHelper do
`git config user.name "name"`
`git config push.default simple`
end
+
+ # silence messages
+ allow(Bundler.ui).to receive(:confirm)
+ allow(Bundler.ui).to receive(:error)
end
context "fails" do
@@ -213,10 +217,6 @@ describe Bundler::GemHelper do
end
it "when there is no git remote" do
- # silence messages
- allow(Bundler.ui).to receive(:confirm)
- allow(Bundler.ui).to receive(:error)
-
Dir.chdir(app_path) { `git commit -a -m "initial commit"` }
expect { Rake.application["release"].invoke }.to raise_error(RuntimeError)
end