Skip to content

Commit

Permalink
Merge pull request Kong#140 from Mashape/refactor/source-folder
Browse files Browse the repository at this point in the history
rename src/ to kong/
  • Loading branch information
thibaultcha committed Apr 15, 2015
2 parents 7a0d805 + b60eec9 commit 1988458
Show file tree
Hide file tree
Showing 66 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ When developing, use the `Makefile` for doing the following operations:
| `run` | Run the `DEVELOPMENT` environment (`kong_DEVELOPMENT.yml`) |
| `seed` | Seed the `DEVELOPMENT` environment (`kong_DEVELOPMENT.yml`) |
| `drop` | Drop the `DEVELOPMENT` environment (`kong_DEVELOPMENT.yml`) |
| `lint` | Lint Lua files in `src/` |
| `lint` | Lint Lua files in `kong/` |
| `coverage` | Run unit tests + coverage report (only unit-tested modules) |
| `test` | Run the unit tests |
| `test-proxy` | Run the proxy integration tests |
Expand Down
128 changes: 64 additions & 64 deletions kong-0.2.0-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,97 +20,97 @@ dependencies = {
"lapis ~> 1.1.0-1",
"inspect ~> 3.0-1",
"stringy ~> 0.4-1",
"multipart ~> 0.1-2",
"cassandra ~> 0.5-5",
"lua-path ~> 0.2.3-1",
"lua-cjson ~> 2.1.0-1",
"luasocket ~> 2.0.2-5",
"ansicolors ~> 1.0.2-3",
"lrexlib-pcre ~> 2.7.2-1",
"lua-llthreads2 ~> 0.1.3-1",
"multipart ~> 0.1-2"
"lua-llthreads2 ~> 0.1.3-1"
}
build = {
type = "builtin",
modules = {
["kong"] = "src/kong.lua",
["kong"] = "kong/kong.lua",

["classic"] = "src/vendor/classic.lua",
["lapp"] = "src/vendor/lapp.lua",
["classic"] = "kong/vendor/classic.lua",
["lapp"] = "kong/vendor/lapp.lua",

["kong.constants"] = "src/constants.lua",
["kong.constants"] = "kong/constants.lua",

["kong.cli.utils"] = "src/cli/utils/utils.lua",
["kong.cli.utils.signal"] = "src/cli/utils/signal.lua",
["kong.cli.db"] = "src/cli/db.lua",
["kong.cli.config"] = "src/cli/config.lua",
["kong.cli.quit"] = "src/cli/quit.lua",
["kong.cli.stop"] = "src/cli/stop.lua",
["kong.cli.start"] = "src/cli/start.lua",
["kong.cli.reload"] = "src/cli/reload.lua",
["kong.cli.restart"] = "src/cli/restart.lua",
["kong.cli.version"] = "src/cli/version.lua",
["kong.cli.migrations"] = "src/cli/migrations.lua",
["kong.cli.utils"] = "kong/cli/utils/utils.lua",
["kong.cli.utils.signal"] = "kong/cli/utils/signal.lua",
["kong.cli.db"] = "kong/cli/db.lua",
["kong.cli.config"] = "kong/cli/config.lua",
["kong.cli.quit"] = "kong/cli/quit.lua",
["kong.cli.stop"] = "kong/cli/stop.lua",
["kong.cli.start"] = "kong/cli/start.lua",
["kong.cli.reload"] = "kong/cli/reload.lua",
["kong.cli.restart"] = "kong/cli/restart.lua",
["kong.cli.version"] = "kong/cli/version.lua",
["kong.cli.migrations"] = "kong/cli/migrations.lua",

["kong.tools.utils"] = "src/tools/utils.lua",
["kong.tools.io"] = "src/tools/io.lua",
["kong.tools.migrations"] = "src/tools/migrations.lua",
["kong.tools.faker"] = "src/tools/faker.lua",
["kong.tools.cache"] = "src/tools/cache.lua",
["kong.tools.timestamp"] = "src/tools/timestamp.lua",
["kong.tools.http_client"] = "src/tools/http_client.lua",
["kong.tools.utils"] = "kong/tools/utils.lua",
["kong.tools.io"] = "kong/tools/io.lua",
["kong.tools.migrations"] = "kong/tools/migrations.lua",
["kong.tools.faker"] = "kong/tools/faker.lua",
["kong.tools.cache"] = "kong/tools/cache.lua",
["kong.tools.timestamp"] = "kong/tools/timestamp.lua",
["kong.tools.http_client"] = "kong/tools/http_client.lua",

["kong.resolver.handler"] = "src/resolver/handler.lua",
["kong.resolver.access"] = "src/resolver/access.lua",
["kong.resolver.header_filter"] = "src/resolver/header_filter.lua",
["kong.resolver.handler"] = "kong/resolver/handler.lua",
["kong.resolver.access"] = "kong/resolver/access.lua",
["kong.resolver.header_filter"] = "kong/resolver/header_filter.lua",

["kong.dao.error"] = "src/dao/error.lua",
["kong.dao.schemas"] = "src/dao/schemas.lua",
["kong.dao.cassandra.factory"] = "src/dao/cassandra/factory.lua",
["kong.dao.cassandra.base_dao"] = "src/dao/cassandra/base_dao.lua",
["kong.dao.cassandra.apis"] = "src/dao/cassandra/apis.lua",
["kong.dao.cassandra.ratelimiting_metrics"] = "src/dao/cassandra/ratelimiting_metrics.lua",
["kong.dao.cassandra.basicauth_credentials"] = "src/dao/cassandra/basicauth_credentials.lua",
["kong.dao.cassandra.keyauth_credentials"] = "src/dao/cassandra/keyauth_credentials.lua",
["kong.dao.cassandra.plugins_configurations"] = "src/dao/cassandra/plugins_configurations.lua",
["kong.dao.cassandra.consumers"] = "src/dao/cassandra/consumers.lua",
["kong.dao.error"] = "kong/dao/error.lua",
["kong.dao.schemas"] = "kong/dao/schemas.lua",
["kong.dao.cassandra.factory"] = "kong/dao/cassandra/factory.lua",
["kong.dao.cassandra.base_dao"] = "kong/dao/cassandra/base_dao.lua",
["kong.dao.cassandra.apis"] = "kong/dao/cassandra/apis.lua",
["kong.dao.cassandra.ratelimiting_metrics"] = "kong/dao/cassandra/ratelimiting_metrics.lua",
["kong.dao.cassandra.basicauth_credentials"] = "kong/dao/cassandra/basicauth_credentials.lua",
["kong.dao.cassandra.keyauth_credentials"] = "kong/dao/cassandra/keyauth_credentials.lua",
["kong.dao.cassandra.plugins_configurations"] = "kong/dao/cassandra/plugins_configurations.lua",
["kong.dao.cassandra.consumers"] = "kong/dao/cassandra/consumers.lua",

["kong.plugins.base_plugin"] = "src/plugins/base_plugin.lua",
["kong.plugins.base_plugin"] = "kong/plugins/base_plugin.lua",

["kong.plugins.basicauth.handler"] = "src/plugins/basicauth/handler.lua",
["kong.plugins.basicauth.access"] = "src/plugins/basicauth/access.lua",
["kong.plugins.basicauth.schema"] = "src/plugins/basicauth/schema.lua",
["kong.plugins.basicauth.api"] = "src/plugins/basicauth/api.lua",
["kong.plugins.basicauth.handler"] = "kong/plugins/basicauth/handler.lua",
["kong.plugins.basicauth.access"] = "kong/plugins/basicauth/access.lua",
["kong.plugins.basicauth.schema"] = "kong/plugins/basicauth/schema.lua",
["kong.plugins.basicauth.api"] = "kong/plugins/basicauth/api.lua",

["kong.plugins.keyauth.handler"] = "src/plugins/keyauth/handler.lua",
["kong.plugins.keyauth.access"] = "src/plugins/keyauth/access.lua",
["kong.plugins.keyauth.schema"] = "src/plugins/keyauth/schema.lua",
["kong.plugins.keyauth.api"] = "src/plugins/keyauth/api.lua",
["kong.plugins.keyauth.handler"] = "kong/plugins/keyauth/handler.lua",
["kong.plugins.keyauth.access"] = "kong/plugins/keyauth/access.lua",
["kong.plugins.keyauth.schema"] = "kong/plugins/keyauth/schema.lua",
["kong.plugins.keyauth.api"] = "kong/plugins/keyauth/api.lua",

["kong.plugins.tcplog.handler"] = "src/plugins/tcplog/handler.lua",
["kong.plugins.tcplog.log"] = "src/plugins/tcplog/log.lua",
["kong.plugins.tcplog.schema"] = "src/plugins/tcplog/schema.lua",
["kong.plugins.tcplog.handler"] = "kong/plugins/tcplog/handler.lua",
["kong.plugins.tcplog.log"] = "kong/plugins/tcplog/log.lua",
["kong.plugins.tcplog.schema"] = "kong/plugins/tcplog/schema.lua",

["kong.plugins.udplog.handler"] = "src/plugins/udplog/handler.lua",
["kong.plugins.udplog.log"] = "src/plugins/udplog/log.lua",
["kong.plugins.udplog.schema"] = "src/plugins/udplog/schema.lua",
["kong.plugins.udplog.handler"] = "kong/plugins/udplog/handler.lua",
["kong.plugins.udplog.log"] = "kong/plugins/udplog/log.lua",
["kong.plugins.udplog.schema"] = "kong/plugins/udplog/schema.lua",

["kong.plugins.filelog.handler"] = "src/plugins/filelog/handler.lua",
["kong.plugins.filelog.log"] = "src/plugins/filelog/log.lua",
["kong.plugins.filelog.schema"] = "src/plugins/filelog/schema.lua",
["kong.plugins.filelog.handler"] = "kong/plugins/filelog/handler.lua",
["kong.plugins.filelog.log"] = "kong/plugins/filelog/log.lua",
["kong.plugins.filelog.schema"] = "kong/plugins/filelog/schema.lua",

["kong.plugins.ratelimiting.handler"] = "src/plugins/ratelimiting/handler.lua",
["kong.plugins.ratelimiting.access"] = "src/plugins/ratelimiting/access.lua",
["kong.plugins.ratelimiting.schema"] = "src/plugins/ratelimiting/schema.lua",
["kong.plugins.ratelimiting.handler"] = "kong/plugins/ratelimiting/handler.lua",
["kong.plugins.ratelimiting.access"] = "kong/plugins/ratelimiting/access.lua",
["kong.plugins.ratelimiting.schema"] = "kong/plugins/ratelimiting/schema.lua",

["kong.web.app"] = "src/web/app.lua",
["kong.web.routes.apis"] = "src/web/routes/apis.lua",
["kong.web.routes.consumers"] = "src/web/routes/consumers.lua",
["kong.web.routes.plugins_configurations"] = "src/web/routes/plugins_configurations.lua",
["kong.web.routes.base_controller"] = "src/web/routes/base_controller.lua"
["kong.web.app"] = "kong/web/app.lua",
["kong.web.routes.apis"] = "kong/web/routes/apis.lua",
["kong.web.routes.consumers"] = "kong/web/routes/consumers.lua",
["kong.web.routes.plugins_configurations"] = "kong/web/routes/plugins_configurations.lua",
["kong.web.routes.base_controller"] = "kong/web/routes/base_controller.lua"
},
install = {
conf = { "kong.yml" },
bin = { "bin/kong" }
},
copy_directories = { "src/web/admin/", "src/web/static/", "database/migrations/" }
copy_directories = { "kong/web/admin/", "kong/web/static/", "database/migrations/" }
}
4 changes: 2 additions & 2 deletions src/cli/config.lua → kong/cli/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local DEFAULT_ENV_VALUES = {
["nginx_working_dir: /usr/local/kong/"] = "nginx_working_dir: nginx_tmp",
["send_anonymous_reports: true"] = "send_anonymous_reports: false",
["keyspace: kong"] = "keyspace: kong_tests",
["lua_package_path ';;'"] = "lua_package_path './src/?.lua;;'",
["lua_package_path ';;'"] = "lua_package_path './kong/?.lua;;'",
["error_log logs/error.log info"] = "error_log logs/error.log debug",
["listen 8000"] = "listen 8100",
["listen 8001"] = "listen 8101"
Expand All @@ -35,7 +35,7 @@ local DEFAULT_ENV_VALUES = {
["nginx_working_dir: /usr/local/kong/"] = "nginx_working_dir: nginx_tmp",
["send_anonymous_reports: true"] = "send_anonymous_reports: false",
["keyspace: kong"] = "keyspace: kong_development",
["lua_package_path ';;'"] = "lua_package_path './src/?.lua;;'",
["lua_package_path ';;'"] = "lua_package_path './kong/?.lua;;'",
["error_log logs/error.log info"] = "error_log logs/error.log debug",
["lua_code_cache on"] = "lua_code_cache off",
["daemon on"] = "daemon off"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function BaseController:new(dao_collection, collection)
end
end)

app:get("/"..collection.."/", function(self)
app:get("/"..collection, function(self)
local size = self.params.size
if size then
size = tonumber(size)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions spec/unit/stub_coverage_spec.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-- This file requires all .lua files from kong's src/ folder in order to compute the real coverage
-- This file requires all .lua files from kong's kong/ folder in order to compute the real coverage
-- since not all files are currently unit tested and the coverage is erroneous.

local IO = require "kong.tools.io"

-- Stub DAO for lapis controllers
_G.dao = {}

local lua_sources = IO.retrieve_files(".//src", { exclude_dir_pattern = "cli", file_pattern = ".lua" })
local lua_sources = IO.retrieve_files(".//kong", { exclude_dir_pattern = "cli", file_pattern = ".lua" })

for _, source_link in ipairs(lua_sources) do
local source_file = dofile(source_link)
Expand Down

0 comments on commit 1988458

Please sign in to comment.