summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2015-08-24 07:21:36 +0900
committerHomu <homu@barosl.com>2015-08-24 07:21:36 +0900
commit3e4f55db30c0e5aa3650c44e7d6dfe429b6842a4 (patch)
tree32c44c690be5f3fe4296f2da029d14647c89fd67
parent1f04cbef33dd12c1a1b04d0c6b3b585ec811632b (diff)
parent71a638848e3031828ff311d72648ba934df08e33 (diff)
downloadbundler-3e4f55db30c0e5aa3650c44e7d6dfe429b6842a4.tar.gz
Auto merge of #3961 - bundler:more-test-retrying, r=segiddins
maybe we can install missing system gems? (this seems to be the current leading reason for CI job failures)
-rw-r--r--.rubocop.yml13
-rw-r--r--spec/support/builders.rb12
2 files changed, 14 insertions, 11 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 5e60f77b23..38bbcc04bb 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -73,26 +73,21 @@ Style/TrailingComma:
# Metrics
-# Arbitrary max lengths for classes simply do not work and enabling this will
-# lead to a never ending stream of annoyance and changes.
+# We've chosen to use Rubocop only for style, and not for complexity or quality checks.
Metrics/ClassLength:
Enabled: false
-# Arbitrary max lengths for methods simply do not work and enabling this will
-# lead to a never ending stream of annoyance and changes.
+Metrics/ModuleLength:
+ Enabled: false
+
Metrics/MethodLength:
Enabled: false
-# No enforced convention here.
Metrics/BlockNesting:
Enabled: false
-# It will be obvious which code is complex, Rubocop should only lint simple
-# rules for us.
Metrics/AbcSize:
Enabled: false
-# It will be obvious which code is complex, Rubocop should only lint simple
-# rules for us.
Metrics/CyclomaticComplexity:
Enabled: false
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 2c02327b3d..fe9b2ba4d7 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -298,12 +298,20 @@ module Spec
def build_repo(path, &blk)
return if File.directory?(path)
rake_path = Dir["#{Path.base_system_gems}/**/rake*.gem"].first
+
+ if rake_path.nil?
+ Spec::Path.base_system_gems.rmtree
+ Spec::Rubygems.setup
+ rake_path = Dir["#{Path.base_system_gems}/**/rake*.gem"].first
+ end
+
if rake_path
FileUtils.mkdir_p("#{path}/gems")
FileUtils.cp rake_path, "#{path}/gems/"
else
- abort "You need to `rm -rf #{tmp}`"
+ abort "Your test gems are missing! Run `rm -rf #{tmp}` and try again."
end
+
update_repo(path, &blk)
end
@@ -628,7 +636,7 @@ module Spec
Bundler.rubygems.build(@spec, opts[:skip_validation])
if opts[:to_system]
- `gem install --ignore-dependencies #{@spec.full_name}.gem`
+ `gem install --ignore-dependencies --no-ri --no-rdoc #{@spec.full_name}.gem`
else
FileUtils.mv("#{@spec.full_name}.gem", opts[:path] || _default_path)
end