Skip to content

Commit

Permalink
Replacing the previous uuid library with our lua_uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
subnetmarco committed Nov 9, 2015
1 parent 787c517 commit 752ac77
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion kong-0.5.2-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = {
"lua ~> 5.1",
"luasec ~> 0.5-2",

"uuid ~> 0.2-1",
"lua_uuid ~> 0.1-4",
"luatz ~> 0.3-1",
"yaml ~> 1.1.2-1",
"lapis ~> 1.3.0-1",
Expand Down
5 changes: 1 addition & 4 deletions kong/dao/cassandra/base_dao.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ local DaoError = require "kong.dao.error"
local stringy = require "stringy"
local Object = require "classic"
local utils = require "kong.tools.utils"
local uuid = require "uuid"
local uuid = require "lua_uuid"

local cassandra_constants = cassandra.constants
local error_types = constants.DATABASE_ERROR_TYPES

local BaseDao = Object:extend()

-- This is important to seed the UUID generator
uuid.seed()

local function session_uniq_addr(session)
return session.host..":"..session.port
end
Expand Down
5 changes: 1 addition & 4 deletions kong/tools/utils.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
-- Module containing some general utility functions

local uuid = require "uuid"

-- This is important to seed the UUID generator
uuid.seed()
local uuid = require "lua_uuid"

local _M = {}

Expand Down
2 changes: 1 addition & 1 deletion spec/integration/dao/cassandra/base_dao_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local constants = require "kong.constants"
local DaoError = require "kong.dao.error"
local utils = require "kong.tools.utils"
local cjson = require "cjson"
local uuid = require "uuid"
local uuid = require "lua_uuid"

-- Raw session for double-check purposes
local session
Expand Down
2 changes: 1 addition & 1 deletion spec/plugins/key-auth/daos_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local spec_helper = require "spec.spec_helpers"
local uuid = require "uuid"
local uuid = require "lua_uuid"

local env = spec_helper.get_env()
local dao_factory = env.dao_factory
Expand Down
2 changes: 1 addition & 1 deletion spec/plugins/rate-limiting/daos_spec.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local spec_helper = require "spec.spec_helpers"
local timestamp = require "kong.tools.timestamp"
local uuid = require "uuid"
local uuid = require "lua_uuid"

local env = spec_helper.get_env()
local dao_factory = env.dao_factory
Expand Down
2 changes: 1 addition & 1 deletion spec/plugins/response-ratelimiting/daos_spec.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local spec_helper = require "spec.spec_helpers"
local timestamp = require "kong.tools.timestamp"
local uuid = require "uuid"
local uuid = require "lua_uuid"

local env = spec_helper.get_env()
local dao_factory = env.dao_factory
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/tools/faker_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local uuid = require "uuid"
local uuid = require "lua_uuid"
local Faker = require "kong.tools.faker"
local DaoError = require "kong.dao.error"

Expand Down

0 comments on commit 752ac77

Please sign in to comment.