Sha256: 604d850038a164816c0797100738c8488a011fecbd1f2931f4569f991f6c568a
Contents?: true
Size: 906 Bytes
Versions: 5
Compression:
Stored size: 906 Bytes
Contents
module Desert class VersionChecker class << self def current_rails_version_matches?(version_requirement) version_matches?(::Rails::VERSION::STRING, version_requirement) end def version_matches?(version, version_requirement) Gem::Version::Requirement.new([version_requirement]).satisfied_by?(Gem::Version.new(version)) end def rails_version_is_below_1990? result = current_rails_version_matches?('<1.99.0') result end def rails_version_is_below_rc2? current_rails_version_matches?('<1.99.1') end def rails_version_is_1991? current_rails_version_matches?('=1.99.1') end def rails_version_is_below_220? current_rails_version_matches?('<2.2.0') end def rails_version_is_below_230? current_rails_version_matches?('<2.3.0') end end end end
Version data entries
5 entries across 5 versions & 3 rubygems