diff --git a/.rubocop.yml b/.rubocop.yml index b65c898..b4cc1a4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -64,7 +64,6 @@ Lint/AmbiguousRegexpLiteral: # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: Exclude: - - 'Rakefile' - 'features/support/env.rb' # Offense count: 2 @@ -97,7 +96,6 @@ Style/Documentation: # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys Style/HashSyntax: Exclude: - - 'Rakefile' - 'gemfiles/rails4.2.gemfile' - 'gemfiles/rails5.0.gemfile' - 'gemfiles/rails5.1.gemfile' @@ -124,9 +122,7 @@ Style/PercentLiteralDelimiters: Style/StringLiterals: EnforcedStyle: "double_quotes" Exclude: - - 'Appraisals' - 'Gemfile' - - 'Rakefile' - 'factory_bot_rails.gemspec' - 'features/step_definitions/rails_steps.rb' - 'features/support/env.rb' @@ -169,10 +165,3 @@ Style/WordArray: # URISchemes: http, https Metrics/LineLength: Max: 133 - -# Offense count: 1 -# Cop supports --auto-correct. -Performance/RegexpMatch: - Exclude: - - 'Rakefile' - diff --git a/Appraisals b/Appraisals index b9e69d5..1f5446d 100644 --- a/Appraisals +++ b/Appraisals @@ -1,19 +1,19 @@ # These are the versions of Rails we want to test against. -appraise 'rails4.2' do - gem 'rails', '~> 4.2.0' +appraise "rails4.2" do + gem "rails", "~> 4.2.0" end -appraise 'rails5.0' do - gem 'activerecord', '~> 5.0.0' - gem 'railties', '~> 5.0.0' +appraise "rails5.0" do + gem "activerecord", "~> 5.0.0" + gem "railties", "~> 5.0.0" end -appraise 'rails5.1' do - gem 'activerecord', '~> 5.1.0' - gem 'railties', '~> 5.1.0' +appraise "rails5.1" do + gem "activerecord", "~> 5.1.0" + gem "railties", "~> 5.1.0" end -appraise 'rails5.2' do - gem 'activerecord', '~> 5.2.0' - gem 'railties', '~> 5.2.0' +appraise "rails5.2" do + gem "activerecord", "~> 5.2.0" + gem "railties", "~> 5.2.0" end diff --git a/Rakefile b/Rakefile index 6b5fb85..80696ea 100644 --- a/Rakefile +++ b/Rakefile @@ -1,27 +1,27 @@ -require 'bundler/setup' -require 'cucumber/rake/task' -require 'rspec/core/rake_task' +require "bundler/setup" +require "cucumber/rake/task" +require "rspec/core/rake_task" -Bundler::GemHelper.install_tasks name: 'factory_bot_rails' +Bundler::GemHelper.install_tasks name: "factory_bot_rails" Cucumber::Rake::Task.new(:cucumber) do |t| t.fork = true - t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')] + t.cucumber_opts = ["--format", (ENV["CUCUMBER_FORMAT"] || "progress")] end RSpec::Core::RakeTask.new(:spec) -require 'appraisal' +require "appraisal" -desc 'Run the test suite' -task :default do |t| - if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/ - exec 'rake spec && rake cucumber' +desc "Run the test suite" +task :default do + if ENV["BUNDLE_GEMFILE"] =~ /gemfiles/ + exec "rake spec && rake cucumber" else - Rake::Task['appraise'].execute + Rake::Task["appraise"].execute end end -task :appraise => ['appraisal:install'] do |t| - exec 'rake appraisal' +task appraise: ["appraisal:install"] do + exec "rake appraisal" end