From 2b3a7472f9b4c3c25e1fe7d607d5d0df7eac90e8 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 19 Jan 2012 16:11:08 +0000 Subject: Starting to reorganize mvc.lua and acf_www controllers to move www-specific things from mvc to acf_www, and visa versa Goal is to have mvc.lua more usable from a lua app Also affects acf-cli and acf_cli controller --- bin/acf-cli | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'bin/acf-cli') diff --git a/bin/acf-cli b/bin/acf-cli index c804c97..a0560a7 100755 --- a/bin/acf-cli +++ b/bin/acf-cli @@ -19,12 +19,7 @@ Output will be a serialized Lua table. end require("posix") ---local PATH = package.path ---local p = posix.dirname(arg[0]) ---if p:sub(1,1) ~= "/" then p = posix.getcwd().."/"..p end ---package.path = p.."/?.lua;" .. package.path mvc = require("acf.mvc") ---package.path = PATH -- this is to get around having to store -- the config file in /etc/helloworld/helloworld.conf @@ -38,7 +33,6 @@ APP=FRAMEWORK:new("acf_cli") -- (put into ENV.PATH_INFO) -- followed by parameters -- (put into APP.clientdata) -ENV.PATH_INFO = arg[1] APP.clientdata = {} for i=2,#arg do a,v = string.match(arg[i], "([^=]*)=(.*)") @@ -48,6 +42,6 @@ for i=2,#arg do APP.clientdata[arg[i]] = true end end -APP:dispatch() +APP:dispatch(APP.parse_path_info(arg[1])) APP:destroy() FRAMEWORK:destroy() -- cgit v1.2.3