diff --git a/Gemfile b/Gemfile index 10b4d8f..c8c0140 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "http://rubygems.org" gemspec -gem 'rake' +gem 'rake', '< 11.0' rails = ENV['RAILS'] || '4-2-stable' arel = ENV['AREL'] || '6-0-stable' diff --git a/lib/squeel/nodes/order.rb b/lib/squeel/nodes/order.rb index c4d932f..5dc4d31 100644 --- a/lib/squeel/nodes/order.rb +++ b/lib/squeel/nodes/order.rb @@ -5,12 +5,12 @@ class Order < Node # @return The expression being ordered on. Might be an attribute, function, or operation attr_reader :expr - # @return [Fixnum] 1 or -1, depending on ascending or descending direction, respectively + # @return [Integer] 1 or -1, depending on ascending or descending direction, respectively attr_reader :direction # Create a new Order node with the given expression and direction # @param expr The expression to order on - # @param [Fixnum] direction 1 or -1, depending on the desired sort direction + # @param [Integer] direction 1 or -1, depending on the desired sort direction def initialize(expr, direction = 1) raise ArgumentError, "Direction #{direction} is not valid. Must be -1 or 1." unless [-1,1].include? direction @expr, @direction = expr, direction diff --git a/lib/squeel/visitors/visitor.rb b/lib/squeel/visitors/visitor.rb index a6d88a8..e4c68af 100644 --- a/lib/squeel/visitors/visitor.rb +++ b/lib/squeel/visitors/visitor.rb @@ -138,7 +138,7 @@ def visit_without_hash_context_shift(k, v, parent) # object if not passed as an SqlLiteral. def quoted?(object) case object - when Arel::Nodes::SqlLiteral, Bignum, Fixnum, + when Arel::Nodes::SqlLiteral, Integer Arel::SelectManager false when NilClass @@ -208,8 +208,7 @@ def visit_passthrough(object, parent) object end - alias :visit_Fixnum :visit_passthrough - alias :visit_Bignum :visit_passthrough + alias :visit_Integer :visit_passthrough # Visit an array, which involves accepting any values we know how to # accept, and skipping the rest. @@ -448,7 +447,7 @@ def visit_ActiveRecord_Relation(o, parent) # # @param [ActiveRecord::Base] o The AR::Base object to visit # @param parent The current parent object in the context - # @return [Fixnum] The id of the object + # @return [Integer] The id of the object def visit_ActiveRecord_Base(o, parent) o.id end diff --git a/squeel.gemspec b/squeel.gemspec index bf8a63b..ab6e9fe 100644 --- a/squeel.gemspec +++ b/squeel.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency 'activerecord', '>= 3.0' s.add_dependency 'activesupport', '>= 3.0' - s.add_dependency 'polyamorous', '~> 1.1.0' + s.add_dependency 'polyamorous', '~> 1.3.0' s.add_development_dependency 'rspec', '~> 2.6.0' s.add_development_dependency 'faker', '~> 0.9.5' s.add_development_dependency 'sqlite3', '~> 1.3.3'