From 42cbdaf6c8a486dac78450d751d5a0f6f513ca10 Mon Sep 17 00:00:00 2001 From: Kingdaro Date: Fri, 6 Feb 2015 08:42:52 -0500 Subject: [PATCH] made things more "require friendly" --- http.lua => gamejolt/http.lua | 0 gamejolt.lua => gamejolt/init.lua | 11 ++++++----- md5.lua => gamejolt/md5.lua | 0 3 files changed, 6 insertions(+), 5 deletions(-) rename http.lua => gamejolt/http.lua (100%) rename gamejolt.lua => gamejolt/init.lua (97%) rename md5.lua => gamejolt/md5.lua (100%) diff --git a/http.lua b/gamejolt/http.lua similarity index 100% rename from http.lua rename to gamejolt/http.lua diff --git a/gamejolt.lua b/gamejolt/init.lua similarity index 97% rename from gamejolt.lua rename to gamejolt/init.lua index 75cfc99..22787ec 100644 --- a/gamejolt.lua +++ b/gamejolt/init.lua @@ -1,5 +1,6 @@ -local md5 = require "md5" -local http = require "socket.http" +local folder = (...):gsub('%.init$', '') +local md5 = require(folder .. ".md5" ) +local http = require("socket.http") local GJ = { gameID, gameKey, @@ -75,7 +76,7 @@ function GJ.fetchUserByName(name) parseKeypair(r, function(k, v) t[k] = v end) - + return t end @@ -86,7 +87,7 @@ function GJ.fetchUserByID(id) parseKeypair(r, function(k, v) t[k] = v end) - + return t end @@ -220,4 +221,4 @@ function GJ.fetchTables() return t end -return GJ \ No newline at end of file +return GJ diff --git a/md5.lua b/gamejolt/md5.lua similarity index 100% rename from md5.lua rename to gamejolt/md5.lua