summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-08-05 07:54:09 +0900
committerHomu <homu@barosl.com>2016-08-05 07:54:09 +0900
commite23ea1519cfd9164053cb0eca84c3447ed6a2d57 (patch)
treee8d7b000ef91fdef747ca169bf6f17afa6503ac6
parentc5e902f912abc505ccc34870747bd7396844723b (diff)
parent004585f9dd099f6ed97c070a78512606a697bf1a (diff)
downloadbundler-e23ea1519cfd9164053cb0eca84c3447ed6a2d57.tar.gz
Auto merge of #4839 - bundler:seg-travis-output, r=indirect
Clean up spec output on Travis
-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 f1aeb66244..f8dd2dd7ca 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 b47adc61b1..7c4a2eb0a4 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 be5683dbbd..b51ba150a9 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 3d365215fa..4e1af32c11 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