amatsuda / database_rewinder

minimalist's tiny and ultra-fast database cleaner
MIT License
806 stars 92 forks source link

Update cache_key for rails 6.1 #67

Closed JuanitoFatas closed 4 years ago

JuanitoFatas commented 4 years ago

The connection pool got refactored in https://github.com/rails/rails/pull/37253 and released in Rails 6.1.0.alpha (I‘m running rails master on my side project).

This Pull Request adds support for Rails 6.1.

amatsuda commented 4 years ago

@JuanitoFatas Thanks for the patch! I was aware of the incompatibility in AR but I didn't immediately follow up here in this repo because I thought the AR refactoring is still ongoing and so we'll see more updates in the connection pool API until 6.1 stable release. But for this particular patch, I'm okay to merge because the patch is small enough.

One thing before merging though, could you make the new method private? Note that this gem still supports Ruby 2.0, so use of private def would break the CI.

amatsuda commented 4 years ago

Thanks!