nephos-server 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de5678099fcc3956f42a2a7514fa6b361150d534
|
4
|
+
data.tar.gz: bd85f6a4f24f28e8187e2826891d35fc1a1f924e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b863db2c4a3f057ded010093ca174a065c036b78fb784523e294e8f117d94635e9b94339bdfeefe99f21f1b3ad5881b995266e96c3b72cf5e36f131db8ef4de4
|
7
|
+
data.tar.gz: 1bb97559b4f080c79f1c877cce79583e9c5399b7e6415087c0ee92cf67a902226749cd96614436eb3e803e6fa6c4ba99057ca8ad0da87711bbc79b90a528aa18
|
@@ -3,8 +3,8 @@ module Nephos
|
|
3
3
|
|
4
4
|
attr_reader :env, :infos
|
5
5
|
|
6
|
-
# @params
|
7
|
-
# @params
|
6
|
+
# @params env [Hash] env extracted from the http request
|
7
|
+
# @params parsed [Hash] pre-parsed env with parameters, ...
|
8
8
|
def initialize env, parsed
|
9
9
|
@env= env
|
10
10
|
@infos= parsed
|
@@ -10,13 +10,13 @@ module Nephos
|
|
10
10
|
|
11
11
|
ALL = []
|
12
12
|
|
13
|
-
# @params
|
13
|
+
# @params arg [Hash or Symbol]
|
14
14
|
# shortcut to #{Nephos::Responder.render}
|
15
15
|
def self.render arg
|
16
16
|
Responder.render arg
|
17
17
|
end
|
18
18
|
|
19
|
-
# @params
|
19
|
+
# @params path [Array]
|
20
20
|
# find the right route to use from the url
|
21
21
|
def self.parse_path path, verb
|
22
22
|
route = File.join(["/"] + path)
|
@@ -25,21 +25,21 @@ def route_prefix
|
|
25
25
|
File.join(["/"] + @route_prefix)
|
26
26
|
end
|
27
27
|
|
28
|
-
# @params
|
28
|
+
# @params what [Hash]
|
29
29
|
def get what
|
30
30
|
what[:url] = File.expand_path File.join(route_prefix, what[:url])
|
31
31
|
Nephos::Route.check!(what)
|
32
32
|
Nephos::Route.add(what, "GET")
|
33
33
|
end
|
34
34
|
|
35
|
-
# @params
|
35
|
+
# @params what [Hash]
|
36
36
|
def post what
|
37
37
|
what[:url] = File.join(route_prefix, what[:url])
|
38
38
|
Nephos::Route.check!(what)
|
39
39
|
Nephos::Route.add(what, "POST")
|
40
40
|
end
|
41
41
|
|
42
|
-
# @params
|
42
|
+
# @params what [Hash]
|
43
43
|
def put what
|
44
44
|
what[:url] = File.join(route_prefix, what[:url])
|
45
45
|
Nephos::Route.check!(what)
|
@@ -6,7 +6,7 @@ module Nephos
|
|
6
6
|
CT_TJ = {'Content-type' => 'text/javascript' + CT_CHARSET_}
|
7
7
|
CT_TH = {'Content-type' => 'text/html' + CT_CHARSET_}
|
8
8
|
|
9
|
-
# @params
|
9
|
+
# @params params [Hash, Symbol]
|
10
10
|
def self.render params
|
11
11
|
if params == :empty
|
12
12
|
return [204, CT_TP, [""]]
|
data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|