Skip to content

Commit

Permalink
Merge pull request #199 from Mashape/feat/multiple-ports
Browse files Browse the repository at this point in the history
[feature] allow cassandra hosts with different ports. fix #185
  • Loading branch information
thibaultcha committed May 5, 2015
2 parents 617503f + babaa0c commit f62d652
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kong-0.2.1-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = {
"inspect ~> 3.0-1",
"stringy ~> 0.4-1",
"multipart ~> 0.1-2",
"cassandra ~> 0.5-6",
"cassandra ~> 0.5-7",
"lua-path ~> 0.2.3-1",
"lua-cjson ~> 2.1.0-1",
"luasocket ~> 2.0.2-5",
Expand Down
2 changes: 1 addition & 1 deletion kong/dao/cassandra/factory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local LOCALHOST_IP = "127.0.0.1"
-- @param host can either be a string or an array of hosts
local function normalize_localhost(host)
if type(host) == "table" then
for i,v in ipairs(host) do
for i, v in ipairs(host) do
if v == LOCALHOST then
host[i] = LOCALHOST_IP
end
Expand Down
4 changes: 4 additions & 0 deletions kong/tools/printable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ local printable_mt = {}
function printable_mt:__tostring()
local t = {}
for k, v in pairs(self) do
if type(v) == "table" then
v = table.concat(v, ",")
end

table.insert(t, k.."="..v)
end
return table.concat(t, " ")
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function _M.start_kong(conf_file, skip_wait)
local result, exit_code = IO.os_execute(KONG_BIN.." start -c "..env.conf_file)

if exit_code ~= 0 then
error("spec_helper cannot start kong: "..result)
error("spec_helper cannot start kong: \n"..result)
end

if not skip_wait then
Expand Down

0 comments on commit f62d652

Please sign in to comment.