code4lib / ruby-oai

a Ruby library for building OAI-PMH clients and servers
MIT License
62 stars 42 forks source link

tests only on Rails 4.0.x #60

Closed jrochkind closed 4 years ago

jrochkind commented 4 years ago

The gemspec itself does not express a dependency on activerecord, which may make sense becuase it is an "optional" dependency.

Of course, you will need activerecord in your app to use the ActiveRecordWrapper. Because the gemspec doesn't allow you to use activerecord, it will allow any version of activerecord.

There are tests that test the ActiveRecordWrapper, so of course these do need activerecord available. This is accomplished by activerecord being mentioned in the Gemfile (which is not used by actual users of the gem, but is used by developers, including testing or CI runs). However, it is mentioned there as gem 'activerecord', '~> 4.0.0'.

So travis, if it were to run, would only be testing against ActiveRecord 4.0.x (not even 4.1 or 4.2). In addition if you try to run tests locally, they would only running against ActiveRecord 4 as well.

Rails 6.0 is out. The easiest way to fix this would be to simply update to testing on Rails 6.x instead of 4.x. Alternately, we could provide some more test infrastructure to be able to test on multiple versions of AR, which would take more work. (likely using the appraisal gem).

I am willing to do some work on this, including multiple Rails versions if desired. But would appreciate feedback from anyone who has commit rights, to see if there is some chance of my PR getting reviewed/committed!

Then, the bigger challenge may be that it will not pass tests under rails 5.x or 6.x. (See #49 from 2015). I am investigating that (I currently can't get tests to pass even under Rails 4!)

jrochkind commented 4 years ago

Actually, I don't believe this is currently active in travis at all, despite having a .travis.yml.

We'd need someone with commit rights to enable it in travis.

Is there anyone out there?