diff options
-rw-r--r-- | .rubocop.yml | 13 | ||||
-rw-r--r-- | spec/support/builders.rb | 12 |
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 |