Sha256: 477c8ba531effaf3a389092cca317d5bacf1d47d9d9c78dbfe751fc22c03f7a6
Contents?: true
Size: 648 Bytes
Versions: 2
Compression:
Stored size: 648 Bytes
Contents
require 'net/http' require 'json' rails_versions = JSON.parse(Net::HTTP.get(URI('https://rubygems.org/api/v1/versions/rails.json'))) .group_by { |version| version['number'] }.keys.grep_v(/rc|racecar|beta|pre/) %w[5.0 5.1 5.2 6.0 6.1 7.0].each do |version| appraise "rails_#{version}" do current_version = rails_versions .select { |key| key.match(/\A#{version}/) } .max { |a, b| Gem::Version.new(a) <=> Gem::Version.new(b) } gem 'activesupport', "~> #{current_version}" gem 'activerecord', "~> #{current_version}" gem 'sqlite3', Gem::Version.new(version) > Gem::Version.new(5.0) ? '~> 1.4.2' : '< 1.4' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enumerate_it-3.2.4 | Appraisals |
enumerate_it-3.2.3 | Appraisals |