Mercurial Hosting > luan
comparison core/src/luan/modules/host/Hosting.luan @ 435:5b36f663a1b8
make members lower case
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 03 May 2015 21:28:49 -0600 |
parents | e9e445e28f0b |
children | 92c3d22745b8 |
comparison
equal
deleted
inserted
replaced
434:472fc70853cd | 435:5b36f663a1b8 |
---|---|
6 | 6 |
7 | 7 |
8 port = 9101 | 8 port = 9101 |
9 | 9 |
10 function push(domain,password,dir) | 10 function push(domain,password,dir) |
11 local f = Io.Uri("file:"..dir) | 11 local f = Io.uri("file:"..dir) |
12 f.exists() or error("directory '"..dir.."' not found") | 12 f.exists() or error("directory '"..dir.."' not found") |
13 f.is_directory() or error("'"..dir.."' is not a directory") | 13 f.is_directory() or error("'"..dir.."' is not a directory") |
14 local socket = "socket:" .. domain .. ":" .. port | 14 local socket = "socket:" .. domain .. ":" .. port |
15 local pc = Io.Uri(socket).Pickle_client() | 15 local pc = Io.uri(socket).pickle_client() |
16 local pickle = pc.pickle | 16 local pickle = pc.pickle |
17 pc.call(%> | 17 pc.call(%> |
18 local Hosting = require "luan:host/Hosting" | 18 local Hosting = require "luan:host/Hosting" |
19 Hosting.do_push(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) | 19 Hosting.do_push(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>) |
20 <%) | 20 <%) |
21 pc.close() | 21 pc.close() |
22 end | 22 end |
23 | 23 |
24 function delete(domain,password) | 24 function delete(domain,password) |
25 local socket = "socket:" .. domain .. ":" .. port | 25 local socket = "socket:" .. domain .. ":" .. port |
26 local pc = Io.Uri(socket).Pickle_client() | 26 local pc = Io.uri(socket).pickle_client() |
27 local pickle = pc.pickle | 27 local pickle = pc.pickle |
28 pc.call(%> | 28 pc.call(%> |
29 local Hosting = require "luan:host/Hosting" | 29 local Hosting = require "luan:host/Hosting" |
30 Hosting.do_delete(<%=pickle(domain)%>,<%=pickle(password)%>) | 30 Hosting.do_delete(<%=pickle(domain)%>,<%=pickle(password)%>) |
31 <%) | 31 <%) |