Closed mlt closed 4 years ago
@mlt it is achievable with current Appraisal:
[
{ rails: '4.2.11', activerecord-jdbc-adapter: '~> 1.3.25', activerecord-jdbcsqlite3-adapter: ''},
{ rails: '5.2.2', activerecord-jdbc-adapter: '~> 52.1'', activerecord-jdbcsqlite3-adapter: '', sqlite3: '' },
].each do |deps|
appraise deps.map { |name, requirement| "#{name}-#{requirement}" }.join('_') do
deps.each { |name, requirement| gem name, requirement }
end
end
I think this is something we can solve nicer if we solve #131. So I'm going to close this one. Please re-open if that wouldn't solve this particular case though.
Here is the use case... I would like to test a gem versus Rails 4 and 5 on Travis using regular ruby and jruby. While I can hide some conditional stuff in dot gemspec file, there is no way to check whether Rails 4 or Rails 5 is being used. This is somewhat critical as while using jruby and rails 4, I need
whereas for Rails 5 I need
and plain
for everything else. There is a sort of bug with
activerecord-jdbc-adapter
that allows to install incorrect version for Rails 4.2.10, but it is still a valid case as opposed to hand editing generated gemfiles.Could we have, perhaps, a way to pass environment variables to set with appraise DSL in
Appraisals
file?P.S. Also I see often in projects
gem ... if ENV['CI']
that gets flattened out by appraisal.