Commit Graph

6 Commits

Author SHA1 Message Date
Jared Beck 4641a3e7e7 Support rails 6.0.0.rc2
Update usage of private migration API, to compensate for
breaking change in https://github.com/rails/rails/pull/36439
2019-08-01 13:06:22 -04:00
Jared Beck 657f5ddfa5 Temporarily constrain rails 6 to < rc2 2019-07-28 00:41:24 -04:00
Jared Beck 02aa30274e activerecord 6.0.0.rc1 requires sqlite3 ~> 1.4
This changed between 6.0.0.beta3 and 6.0.0.rc1,
in 0908184e4c2.
2019-05-10 14:17:11 -04:00
Jared Beck 43a0634589 Test matrix: Address CVE-2019-5420 2019-03-13 17:26:25 -04:00
Jared Beck 9635c79080 Fix: test suite was not actually using 6.0.0.beta1
This fixes an omission that was not caught in
https://github.com/paper-trail-gem/paper_trail/pull/1182
2019-01-26 21:28:10 -05:00
Edouard Chin 2b479a7f08 Support rails 6.0.0 (#1172)
* Change update_attributes to update

In Rails 6.0 update_attributes/update_attributes! is considered deprecated. Method update/update! is the replacement.

* CI: Don't use Bundler 1.16.1

- Bundler 1.16.1 has bug where dependencies can't be resolved properly
  when a gem is a release candidate or an alpha version.
  The underlying bundler issue can be found here https://github.com/bundler/bundler/issues/6449

* Disable eager_load in test env:

- In Rails 6.0, rails/rails@3b95478 made a change to eagerly define
  attribute methods of a Model when `eager_load` is enabled.
  This breaks our test suite because of the way we run migration.

  The TL;DR is that doing `People.attribute_names` will return an
  empty array instead of `[:id, time_zone, ...]`.
  You can find a failing build here https://travis-ci.org/paper-trail-gem/paper_trail/jobs/463369634

  Basically what happens is:

  1) The dummy app boot, attribute methods of each model are defined
     but since migration didn't run yet, the tables aren't even
     created resulting in a empty attribute set.
  2) Migration runs, but it's already too late.

  In this commit I disabled eager_loading in test, AFAIT there isn't
  much benefit in eager_loading the dummy app anyway.
  Also renaming the `user.rb` file to `postgres_user.rb` in order for
  rails autoloading to work correctly.
2018-12-04 16:10:35 -05:00