diff --git a/kong-0.5.2-1.rockspec b/kong-0.5.2-1.rockspec index 56b92167c118..fdf6fa47563d 100644 --- a/kong-0.5.2-1.rockspec +++ b/kong-0.5.2-1.rockspec @@ -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", diff --git a/kong/dao/cassandra/base_dao.lua b/kong/dao/cassandra/base_dao.lua index 19154805be30..9cc5788d845d 100644 --- a/kong/dao/cassandra/base_dao.lua +++ b/kong/dao/cassandra/base_dao.lua @@ -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 diff --git a/kong/tools/utils.lua b/kong/tools/utils.lua index a74257902fe3..8423d3cd5e8b 100644 --- a/kong/tools/utils.lua +++ b/kong/tools/utils.lua @@ -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 = {} diff --git a/spec/integration/dao/cassandra/base_dao_spec.lua b/spec/integration/dao/cassandra/base_dao_spec.lua index 6b1e7b5f8da3..9e581bc92a64 100644 --- a/spec/integration/dao/cassandra/base_dao_spec.lua +++ b/spec/integration/dao/cassandra/base_dao_spec.lua @@ -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 diff --git a/spec/plugins/key-auth/daos_spec.lua b/spec/plugins/key-auth/daos_spec.lua index 4c35139b6a26..26bef046c5a7 100644 --- a/spec/plugins/key-auth/daos_spec.lua +++ b/spec/plugins/key-auth/daos_spec.lua @@ -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 diff --git a/spec/plugins/rate-limiting/daos_spec.lua b/spec/plugins/rate-limiting/daos_spec.lua index 239e45c2bfaf..1ccf84298df3 100644 --- a/spec/plugins/rate-limiting/daos_spec.lua +++ b/spec/plugins/rate-limiting/daos_spec.lua @@ -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 diff --git a/spec/plugins/response-ratelimiting/daos_spec.lua b/spec/plugins/response-ratelimiting/daos_spec.lua index 6c42b22ac18d..0d45ebe10ec7 100644 --- a/spec/plugins/response-ratelimiting/daos_spec.lua +++ b/spec/plugins/response-ratelimiting/daos_spec.lua @@ -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 diff --git a/spec/unit/tools/faker_spec.lua b/spec/unit/tools/faker_spec.lua index 9a420783085d..47db1bcf1683 100644 --- a/spec/unit/tools/faker_spec.lua +++ b/spec/unit/tools/faker_spec.lua @@ -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"