tandusrl / acts_as_bookable

A reservation plugin for Rails applications that allows resources to be bookable.
MIT License
140 stars 104 forks source link

Not compatible with Rails 5/activerecord #14

Closed colemerrick closed 7 years ago

colemerrick commented 7 years ago

Bundler could not find compatible versions for gem "activerecord": In Gemfile:

acts_as_bookable (~> 0.1.2) was resolved to 0.1.2, which depends on
  activerecord (< 5, >= 3.2)

rails (>= 5.0.0.1, ~> 5.0.0) was resolved to 5.0.0.1, which depends on
  activerecord (= 5.0.0.1)
colemerrick commented 7 years ago

So I forked the project and have a rails5_compatibility branch going... I'm not finding any breaking changes - as the same two tests fail both before and after upgrading to activerecord >= 3.2 (using postgres).

In terms of the failing tests in the booking spec, I don't quite understand the reasoning behind them. In my mind, an overlap exception should be raised for a new booking when a start time equals a previously booked end time (line 234), and when an end time equals a previously booked start time (line 224).

What's stopping you from making the gem compatible with activerecord 5? Anything I can help with?

Chosko commented 7 years ago

Which tests are failing? Can you link them on Travis please?

I didn't include activerecord 5 because when I started the project it was not stable yet. Great to hear that you are interested in expanding the compatibility!

colemerrick commented 7 years ago
screen shot 2016-10-21 at 8 22 17 pm screen shot 2016-10-21 at 8 42 53 pm

Sorry it's been a while. These were the tests for your records. Looking into it further...

Chosko commented 7 years ago

Hey that's weird.... If you see here, actually all tests are passing for master branch.... https://travis-ci.org/tandusrl/acts_as_bookable/builds/110934291

but for your PR #15 the only tests that fail are the ones with activerecord 5 https://travis-ci.org/tandusrl/acts_as_bookable/builds/176247250 and they fail while installing dependencies, e.g. https://travis-ci.org/tandusrl/acts_as_bookable/jobs/176247260

I see there are actually 2 tests failing, but they are on develop (the ones you just posted) https://travis-ci.org/tandusrl/acts_as_bookable/builds/111431529 But your pull request was based on master, so they are not a problem here

Chosko commented 7 years ago

I fixed this with https://github.com/tandusrl/acts_as_bookable/tree/v0.1.3

A new version v0.1.3 is available at rubygems.org

CharlieIGG commented 7 years ago

Any way we can allow for this to work with activerecord 5.0.1? Version 0.1.3 currently only allows activerecord up to 5.0.0.1...

Chosko commented 7 years ago

Sure. I'll update dependencies ASAP

askl56 commented 7 years ago

@Chosko did you update the dependencies?

Chosko commented 7 years ago

@askl56 Yes, a new version v0.1.4 is now available at rubygems

Chosko commented 7 years ago

I'm closing this issue for now. LMK if the new version works for you. If not, i'll reopen the issue

occorom commented 6 years ago

Hello @Chosko

Is it possible to have it working on activerecord 5.1.4 ?

I am blocked without it because i am already in an advanced stage of my app and can't go to a prior version of activerecord