.rubocop.yml in peppermint-0.1.14 vs .rubocop.yml in peppermint-0.1.15

- old
+ new

@@ -1,25 +1,33 @@ +<% +require "open3" +def gem_exists(gem) + res = Open3.popen3("bundle", "info", "^#{gem}$") do |i, o, e, t| + t.value.success? + end +end +%> --- inherit_mode: merge: - Exclude require: - standard - - standard-rails + <%= "- standard-rails" if gem_exists "rails" %> - standard-custom - standard-performance - rubocop-performance - rubocop-rake - - rubocop-rspec - - rubocop-rails - - rubocop-rspec_rails - - rubocop-capybara - + <%= "- rubocop-rspec" if gem_exists "rspec" %> + <%= "- rubocop-rails" if gem_exists "rails" %> + <%= "- rubocop-rspec_rails" if gem_exists "rails" %> + <%= "- rubocop-capybara" if gem_exists "capybara" %> + inherit_gem: - standard: config/base.yml - standard-rails: config/base.yml + standard: config/base.yml + <%= "standard-rails: config/base.yml" if gem_exists "rails" %> standard-performance: config/base.yml standard-custom: config/base.yml # custom enables/disables Layout/LineLength: @@ -28,13 +36,17 @@ AllowAdjacentOneLineDefs: true Style/DisableCopsWithinSourceCodeDirective: Enabled: true Rake/Desc: Enabled: false +<% +<<RSPEC if gem_exists "rspec" RSpec/MultipleExpectations: Enabled: false RSpec/ExampleLength: Enabled: false +RSPEC +%> # # Ignore differences from Rails autogeneration # Layout/SpaceInsideHashLiteralBraces: