Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating vendored Riddle.

  • Loading branch information...
commit 3efd9d1fd672a38b4b1ee91b92be51f36c88ea21 1 parent 55c56e7
@pat pat authored
View
4 vendor/riddle/lib/riddle/auto_version.rb
@@ -8,9 +8,9 @@ def self.configure
require "riddle/#{version}"
when /1.10/
require 'riddle/1.10'
- when /2.0.\d/
+ when /2.0.[12]/
require 'riddle/2.0.1'
- when /2.1.\d/
+ when /2.0.3/, /2.1.\d/
require 'riddle/2.1.0'
end
end
View
6 vendor/riddle/lib/riddle/client.rb
@@ -567,10 +567,12 @@ def initialise_socket
self.connection.call(self)
elsif self.class.connection
self.class.connection.call(self)
- elsif server.index('/') == 0
+ elsif server && server.index('/') == 0
UNIXSocket.new server
- else
+ elsif server
TCPSocket.new server, @port
+ else
+ raise "Server not set."
end
rescue Errno::ETIMEDOUT, Errno::ECONNRESET, Errno::ECONNREFUSED => e
retry if (tries += 1) < 5
View
5 vendor/riddle/lib/riddle/query.rb
@@ -59,7 +59,10 @@ def self.set(variable, values, global = true)
def self.snippets(data, index, query, options = nil)
options = ', ' + options.keys.collect { |key|
- "#{options[key]} AS #{key}"
+ value = options[key]
+ value = "'#{value}'" if value.is_a?(String)
+
+ "#{value} AS #{key}"
}.join(', ') unless options.nil?
"CALL SNIPPETS('#{data}', '#{index}', '#{query}'#{options})"
View
2  vendor/riddle/lib/riddle/version.rb
@@ -1,3 +1,3 @@
module Riddle
- Version = '1.5.0'
+ Version = '1.5.1'
end
Please sign in to comment.
Something went wrong with that request. Please try again.