Sha256: 4c143011a415380bd6b9de2904a60bea7afdbe44dc6fa6296d43ce6d27f3acc8

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

def appgen(gems)
  description = gems.map{ |name, version| "#{name} #{version}" }.join(', ')
  appraise description do
    gems.each do |name, version|
      gem name, version
    end

    if RUBY_VERSION < '2.0'
      gem 'concurrent-ruby', '!= 1.1.1'
      gem 'rack-cache', '< 1.7.2'
      gem 'rake', '< 12.3'
    end

    if RUBY_VERSION < '2.1'
      gem 'nokogiri', '< 1.7'
    end

    gem 'tzinfo'

    gem 'sprockets-rails' if gems['railties'] != '~> 3.2' && !gems['sprockets-rails']
  end
end

if RUBY_VERSION < '2.4'
  appgen 'railties' => '~> 3.2'
end

if RUBY_VERSION >= '1.9' && RUBY_VERSION < '2.5'
  appgen 'railties' => '~> 4.0', 'sprockets-rails' => '~> 2.0'
  appgen 'railties' => '~> 4.0', 'sprockets' => '~> 3.0'
end

if RUBY_VERSION >= '2.3' && RUBY_VERSION < '2.7'
  appgen 'railties' => '~> 5.0', 'sprockets-rails' => '~> 2.0'
  appgen 'railties' => '~> 5.0', 'sprockets' => '~> 3.0'
  appgen 'railties' => '~> 5.0', 'sprockets' => '>= 4.0' if RUBY_VERSION >= '2.5'
end

if RUBY_VERSION >= '2.5'
  appgen 'railties' => '~> 6.0', 'sprockets-rails' => '~> 2.0'
  appgen 'railties' => '~> 6.0', 'sprockets' => '~> 3.0'
  appgen 'railties' => '~> 6.0', 'sprockets' => '>= 4.0'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
image_optim_rails-0.5.0 Appraisals