1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Fix specs for Rails 5.1 or higher

This commit is contained in:
Tatsuya Hoshino 2018-05-17 22:14:34 +09:00
parent 1d718e82a0
commit 6ef36323b9
6 changed files with 648 additions and 2 deletions

View file

@ -126,7 +126,11 @@ EOS
out = @ap.awesome(@diana)
raw_object_string =
if activerecord_5_0?
if activerecord_5_2?
ActiveRecordData.raw_5_2_diana
elsif activerecord_5_1?
ActiveRecordData.raw_5_1_diana
elsif activerecord_5_0?
ActiveRecordData.raw_5_0_diana
elsif activerecord_4_2?
if RUBY_VERSION > '1.9.3'
@ -153,7 +157,11 @@ EOS
out = @ap.awesome([@diana, @laura])
raw_object_string =
if activerecord_5_0?
if activerecord_5_2?
ActiveRecordData.raw_5_2_multi
elsif activerecord_5_1?
ActiveRecordData.raw_5_1_multi
elsif activerecord_5_0?
ActiveRecordData.raw_5_0_multi
elsif activerecord_4_2?
if RUBY_VERSION > '1.9.3'

View file

@ -0,0 +1,104 @@
#<User:placeholder_id
@_start_transaction_state = {},
@aggregation_cache = {},
@association_cache = {},
@destroyed = false,
@marked_for_destruction = false,
@new_record = true,
@readonly = false,
@transaction_state = nil,
attr_accessor :attributes = #<ActiveRecord::AttributeSet:placeholder_id
@attributes = {
"admin" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = false
>,
"created_at" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "1992-10-10 12:30:00"
>,
"id" => #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "id",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
"name" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "Diana"
>,
"rank" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "rank",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "rank",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = 1
>
}
>,
attr_accessor :destroyed_by_association = nil
>

View file

@ -0,0 +1,210 @@
[
[0] #<User:placeholder_id
@_start_transaction_state = {},
@aggregation_cache = {},
@association_cache = {},
@destroyed = false,
@marked_for_destruction = false,
@new_record = true,
@readonly = false,
@transaction_state = nil,
attr_accessor :attributes = #<ActiveRecord::AttributeSet:placeholder_id
@attributes = {
"admin" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = false
>,
"created_at" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "1992-10-10 12:30:00"
>,
"id" => #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "id",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
"name" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "Diana"
>,
"rank" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "rank",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "rank",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = 1
>
}
>,
attr_accessor :destroyed_by_association = nil
>,
[1] #<User:placeholder_id
@_start_transaction_state = {},
@aggregation_cache = {},
@association_cache = {},
@destroyed = false,
@marked_for_destruction = false,
@new_record = true,
@readonly = false,
@transaction_state = nil,
attr_accessor :attributes = #<ActiveRecord::AttributeSet:placeholder_id
@attributes = {
"admin" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = true
>,
"created_at" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "2003-05-26 14:15:00"
>,
"id" => #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "id",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
"name" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "Laura"
>,
"rank" => #<ActiveRecord::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveRecord::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "rank",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "rank",
attr_reader :type = #<ActiveModel::Type::Integer:placeholder_id
@range = -2147483648...2147483648,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = 2
>
}
>,
attr_accessor :destroyed_by_association = nil
>
]

View file

@ -0,0 +1,104 @@
#<User:placeholder_id
@_start_transaction_state = {},
@aggregation_cache = {},
@association_cache = {},
@destroyed = false,
@marked_for_destruction = false,
@new_record = true,
@readonly = false,
@transaction_state = nil,
attr_accessor :attributes = #<ActiveModel::AttributeSet:placeholder_id
@attributes = {
"admin" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = false
>,
"created_at" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "1992-10-10 12:30:00"
>,
"id" => #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "id",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
"name" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "Diana"
>,
"rank" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "rank",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "rank",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = 1
>
}
>,
attr_accessor :destroyed_by_association = nil
>

View file

@ -0,0 +1,210 @@
[
[0] #<User:placeholder_id
@_start_transaction_state = {},
@aggregation_cache = {},
@association_cache = {},
@destroyed = false,
@marked_for_destruction = false,
@new_record = true,
@readonly = false,
@transaction_state = nil,
attr_accessor :attributes = #<ActiveModel::AttributeSet:placeholder_id
@attributes = {
"admin" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = false
>,
"created_at" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "1992-10-10 12:30:00"
>,
"id" => #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "id",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
"name" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "Diana"
>,
"rank" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "rank",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "rank",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = 1
>
}
>,
attr_accessor :destroyed_by_association = nil
>,
[1] #<User:placeholder_id
@_start_transaction_state = {},
@aggregation_cache = {},
@association_cache = {},
@destroyed = false,
@marked_for_destruction = false,
@new_record = true,
@readonly = false,
@transaction_state = nil,
attr_accessor :attributes = #<ActiveModel::AttributeSet:placeholder_id
@attributes = {
"admin" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "admin",
attr_reader :type = #<ActiveModel::Type::Boolean:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = true
>,
"created_at" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "created_at",
attr_reader :type = #<ActiveRecord::Type::DateTime:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "2003-05-26 14:15:00"
>,
"id" => #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "id",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
"name" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "name",
attr_reader :type = #<ActiveModel::Type::String:placeholder_id
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = "Laura"
>,
"rank" => #<ActiveModel::Attribute::FromUser:placeholder_id
@original_attribute = #<ActiveModel::Attribute::FromDatabase:placeholder_id
@original_attribute = nil,
attr_reader :name = "rank",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = nil
>,
attr_reader :name = "rank",
attr_reader :type = #<ActiveRecord::ConnectionAdapters::SQLite3Adapter::SQLite3Integer:placeholder_id
@range = -9223372036854775808...9223372036854775808,
attr_reader :limit = nil,
attr_reader :precision = nil,
attr_reader :scale = nil
>,
attr_reader :value_before_type_cast = 2
>
}
>,
attr_accessor :destroyed_by_association = nil
>
]

View file

@ -3,6 +3,16 @@ module RailsVersions
Gem::Version.new(Rails::VERSION::STRING)
end
def rails_5_2?
Gem::Requirement.new('~> 5.2.0').satisfied_by?(rails_version)
end
alias_method :activerecord_5_2?, :rails_5_2?
def rails_5_1?
Gem::Requirement.new('~> 5.1.0').satisfied_by?(rails_version)
end
alias_method :activerecord_5_1?, :rails_5_1?
def rails_5_0?
Gem::Requirement.new('~> 5.0.0.racecar1').satisfied_by?(rails_version)
end