From d16f1b9bc7fba50e5cf72bd99e8df37188825408 Mon Sep 17 00:00:00 2001 From: Max Kadel Date: Wed, 24 Jul 2024 14:08:17 -0400 Subject: [PATCH] Get rubocop and tests running locally Get tests passing locally - Pinning to sqlite3 ~> 1.3 until the fix for this issue is released - https://github.com/rails/rails/pull/51592 (should be in 7.1.4) - Update gemfiles using Appraisal Add development info to readme --- .rubocop.yml | 8 +++++--- Gemfile | 5 ++++- README.md | 18 ++++++++++++++++++ gemfiles/rails_6.1.gemfile | 5 ++++- gemfiles/rails_7.1_.gemfile | 5 ++++- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a3151a77..8ede04b1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,6 +2,8 @@ require: - rubocop-rake - rubocop-rspec - rubocop-capybara + - rubocop-factory_bot + - rubocop-rspec_rails AllCops: TargetRubyVersion: 2.5 @@ -491,9 +493,6 @@ RSpec/NestedGroups: RSpec/AnyInstance: Enabled: false -RSpec/FilePath: - Enabled: false - RSpec/LeakyConstantDeclaration: Enabled: false @@ -527,6 +526,9 @@ RSpec/SubjectDeclaration: RSpec/VerifiedDoubleReference: Enabled: true +RSpec/ExpectInLet: + Enabled: false + RSpec/Rails/AvoidSetupHook: Enabled: true diff --git a/Gemfile b/Gemfile index 11d5ffee..c08cb558 100644 --- a/Gemfile +++ b/Gemfile @@ -15,11 +15,14 @@ gem 'redis-client' gem 'resque' gem 'rspec-rails' gem 'rubocop' +gem 'rubocop-capybara' +gem 'rubocop-factory_bot' gem 'rubocop-rake' gem 'rubocop-rspec' +gem 'rubocop-rspec_rails' gem 'sidekiq', '>= 3.0' gem 'spork' -gem 'sqlite3', '>= 1.3' +gem 'sqlite3', '~> 1.3' gem 'timecop' gemspec diff --git a/README.md b/README.md index 63d51179..2c7c762d 100644 --- a/README.md +++ b/README.md @@ -434,6 +434,24 @@ nicolas@desktop:$ echo $? 2 ``` +## Development +In order to work on development on the gem itself + +### Installing the gems +Use the [appraisal gem](https://github.com/thoughtbot/appraisal) to install the bundles for different rails versions: + +```bash +appraisal clean +appraisal generate +appraisal install +``` + +### Running the tests +Use appraisal to run the tests using rake +```bash +appraisal rake +``` + ## License The MIT License (MIT) diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index d9ddb6d9..3142c53b 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -18,11 +18,14 @@ gem 'redis-client' gem 'resque' gem 'rspec-rails' gem 'rubocop' +gem 'rubocop-capybara' +gem 'rubocop-factory_bot' gem 'rubocop-rake' gem 'rubocop-rspec' +gem 'rubocop-rspec_rails' gem 'sidekiq', '>= 3.0' gem 'spork' -gem 'sqlite3', '>= 1.3' +gem 'sqlite3', '~> 1.3' gem 'timecop' gemspec path: '../' diff --git a/gemfiles/rails_7.1_.gemfile b/gemfiles/rails_7.1_.gemfile index 90bb3224..96d02573 100644 --- a/gemfiles/rails_7.1_.gemfile +++ b/gemfiles/rails_7.1_.gemfile @@ -18,11 +18,14 @@ gem 'redis-client' gem 'resque' gem 'rspec-rails' gem 'rubocop' +gem 'rubocop-capybara' +gem 'rubocop-factory_bot' gem 'rubocop-rake' gem 'rubocop-rspec' +gem 'rubocop-rspec_rails' gem 'sidekiq', '>= 3.0' gem 'spork' -gem 'sqlite3', '>= 1.3' +gem 'sqlite3', '~> 1.3' gem 'timecop' gemspec path: '../'