diff --git a/.travis.yml b/.travis.yml index 5e7df530..8756753b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ rvm: - 2.1 - 2.2 - 2.3 + - 2.4 + - 2.5 - jruby-9.1.5.0 before_install: - gem update --system diff --git a/lib/riak/client/beefcake/ts_cell_codec.rb b/lib/riak/client/beefcake/ts_cell_codec.rb index 45082d0f..07d51956 100644 --- a/lib/riak/client/beefcake/ts_cell_codec.rb +++ b/lib/riak/client/beefcake/ts_cell_codec.rb @@ -34,10 +34,10 @@ def cell_for(measure) TsCell.new case measure when String { varchar_value: measure } - when Fixnum - { sint64_value: measure } when Bignum { sint64_value: check_bignum_range(measure) } + when Fixnum + { sint64_value: measure } when Float { double_value: measure } when BigDecimal diff --git a/lib/riak/map_reduce.rb b/lib/riak/map_reduce.rb index 7ee1d03f..0d6cea9e 100644 --- a/lib/riak/map_reduce.rb +++ b/lib/riak/map_reduce.rb @@ -203,9 +203,11 @@ def reduce(*params) # @see Phase#initialize def link(*params) options = params.extract_options! - walk_spec_options = options.slice!(:type, :function, :language, :arg) unless params.first + phase_options_keys = [:type, :function, :language, :arg] + walk_spec_options = options.reject { |key| phase_options_keys.include? key } unless params.first walk_spec = WalkSpec.normalize(params.shift || walk_spec_options).first - @query << Phase.new({:type => :link, :function => walk_spec}.merge(options)) + phase_options = walk_spec_options ? options.slice(*phase_options_keys) : options + @query << Phase.new({:type => :link, :function => walk_spec}.merge(phase_options)) self end