Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master

- Add .isolator_ignore.yml configuration file for Rails application.

## 0.7.0 (2020-09-25)

- Add debug mode. ([@palkan][])
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ You can add as many _ignores_ as you want, the offense is registered iff all of

### Using with legacy Rails codebases

If you already have a huge Rails project it can be tricky to turn Isolator on because you'll immediately get a lot of failed specs. If you want to fix detected issues one by one, you can list all of them in the special file `.isolator_todo.yml` in the following way:
If you already have a huge Rails project it can be tricky to turn Isolator on because you'll immediately get a lot of failed specs. If you want to fix detected issues one by one, you can list all of them in the special files `.isolator_todo.yml` and `.isolator_ignore.yml` in the following way:

```
sidekiq:
Expand All @@ -171,6 +171,8 @@ sidekiq:

All the exceptions raised in the listed lines will be ignored.

The `.isolator_todo.yml` file is intended to point to the code that should be fixed later, and `.isolator_ignore.yml` points to the code that for some reasons is not expected to be fixed. (See https://github.com/palkan/isolator/issues/40)

### Using with legacy Ruby codebases

If you are not using Rails, you'll have to load ignores from file manually, using `Isolator::Ignorer.prepare(path:)`, for instance `Isolator::Ignorer.prepare(path: "./config/.isolator_todo.yml")`
Expand Down
1 change: 1 addition & 0 deletions lib/isolator/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Railtie < ::Rails::Railtie # :nodoc:
load File.join(__dir__, "adapters.rb")

Isolator.config.ignorer&.prepare
Isolator.config.ignorer&.prepare(path: ".isolator_ignore.yml")

next unless Rails.env.test?

Expand Down