Skip to content

Commit

Permalink
fix: Makefile with new migrations command
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Apr 9, 2015
1 parent 9831700 commit c930381
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ dev:
echo "$$rock already installed, skipping" ; \
fi \
done;
bin/kong config -e TEST
bin/kong config -e DEVELOPMENT
bin/kong db -c $(DEVELOPMENT_CONF) migrations:up
bin/kong config -c kong.yml -e TEST
bin/kong config -c kong.yml -e DEVELOPMENT
bin/kong migrations -c $(DEVELOPMENT_CONF) up

clean:
@rm -f luacov.*
@rm -f $(DEVELOPMENT_CONF) $(TESTING_CONF)
@rm -rf nginx_tmp
@bin/kong db -c $(DEVELOPMENT_CONF) migrations:reset
@bin/kong migrations -c $(DEVELOPMENT_CONF) reset

run:
@bin/kong start -c $(DEVELOPMENT_CONF)
Expand Down
2 changes: 1 addition & 1 deletion src/dao/schemas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function _M.validate(t, schema, is_update)
-- Check the given table against a given schema
for column, v in pairs(schema) do

-- Set default value for the filed if given
-- Set default value for the field if given
if t[column] == nil and v.default ~= nil then
if type(v.default) == "function" then
t[column] = v.default()
Expand Down
10 changes: 5 additions & 5 deletions src/vendor/lapp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ local function quit(msg,no_usage)
end

local function error(msg,no_usage)
quit(msg,no_usage)
quit(arg[0]:gsub('.+[\\/]','')..':'..msg,no_usage)
end

local function ltrim(line)
Expand All @@ -68,7 +68,7 @@ local function trim(s)
return ltrim(rtrim(s))
end

local function open(file,opt)
local function open (file,opt)
local val,err = io.open(file,opt)
if not val then error(err,true) end
append(open_files,val)
Expand Down Expand Up @@ -122,7 +122,7 @@ local function force_short(short)
xassert(#short==1,short..": short parameters should be one character")
end

function process_options_string(str, main_command)
function process_options_string(str)
local res = {}
local varargs

Expand Down Expand Up @@ -297,8 +297,8 @@ function process_options_string(str, main_command)
-- check unused parms, set defaults and check if any required parameters were missed
for parm,ps in pairs(parms) do
if not ps.used then
if ps.required then error("Missing required parameter: "..parm) end
set_result(parm,ps.defval)
if ps.required then error("missing required parameter: "..parm) end
set_result(ps,parm,ps.defval)
end
end
return res
Expand Down

0 comments on commit c930381

Please sign in to comment.