brendon / acts_as_list

An ActiveRecord plugin for managing lists.
http://brendon.github.io/acts_as_list/
MIT License
2.04k stars 355 forks source link

Update Appraisals to fix Travis build #216

Closed rdvdijk closed 8 years ago

rdvdijk commented 8 years ago

Forces use of rack < 2.0. I've also updated and installed the Appraisals to match some previous manual edits of those Gemfiles.

(Hopefully this actually fixes the build 😉)

rdvdijk commented 8 years ago

Travis agrees! 🎉

brendon commented 8 years ago

Hi @rdvdijk, this is great. Just thinking, we should only constrict the rack version (and thus ruby version) for those versions of rails that can't run ruby 2.2. I'd be keen to see the rest update over time. Or have I got this wrong somehow? :)

krzysiek1507 commented 8 years ago

@brendon maybe we should drop Ruby < 2.1 and Rails < 4 or < 4.1?

brendon commented 8 years ago

Hi @krzysiek1507. Personally I still have a large application running 3.2 and 1.9.3 (though it's being upgraded). I've come across several instances of gem vendors pulling support for older rails/ruby versions arbitrarily (i.e. no actual code advantage) and it's a real pain. It creates major dependency problems.

I can understand when support is pulled because of the use of a new feature that isn't compatible with the old version, but when it's just done for the sake of it I'm not so understanding :)

In this case I think we can easily set different rake dependencies based on rails/ruby combo. I'll look into it a bit further.

krzysiek1507 commented 8 years ago

@brendon ok, thanks.

We can add something like: (end exclude failing cases)

{ '3-2': '3.2.21', '4-1': '4.1.10', '4-2': '4.2.1', '5-0': '5.0.0.rc2' }.each do |rails, version|
  appraise "rails-#{rails}-rack-1" do
    gem "activerecord", "~> #{version}"

    gem "rack", '~> 1.0'
  end

  appraise "rails-#{rails}" do
     gem "activerecord", "~> #{version}"
  end
end

Or we can test only on rack ~> 1.0

brendon commented 8 years ago

Thanks @krzysiek1507, I've managed to solve the problem via using bundlers :platforms feature to specify rack version 1.x for all the rubies below 2.2. I've created a PR for comment and I'll close this PR for now:

https://github.com/swanandp/acts_as_list/pull/217

swanandp commented 8 years ago

Nice! Thanks @brendon and @rdvdijk