domotics-core 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/domotics/core/server.rb +3 -3
- data/lib/domotics/core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eca10e6f705a187186a2656342714b990f23eeee
|
4
|
+
data.tar.gz: 261c537133b2ac6ee8d15a2de0632785cc5cfa33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f403cc9cd6974724d3e23b94c9473acf632280cd34c266065a1fe0cf56ca2ece20375715566a81c5e3e7039c99e7c2b34418b3e1a9e93ff3171233f555987e12
|
7
|
+
data.tar.gz: 82762b63df335fb078dc48b03c6017468c86592b33a693be8df4a8bf7c57f196e525b96c12e91f0938d82580c1d1b833f4279c4aad1eac9cedabc7a3c6dfcb30
|
data/lib/domotics/core/server.rb
CHANGED
@@ -5,7 +5,6 @@ module Domotics::Core
|
|
5
5
|
end
|
6
6
|
def call(env)
|
7
7
|
# [object]/[action]/[params]
|
8
|
-
p env['PATH_INFO']
|
9
8
|
request = env['PATH_INFO'][1..-1].split('/')
|
10
9
|
request[-1], form = request.last.split(".")
|
11
10
|
object = request.shift
|
@@ -30,9 +29,10 @@ module Domotics::Core
|
|
30
29
|
when "json"
|
31
30
|
return ok object.verbose_state.to_json
|
32
31
|
when "jpg"
|
33
|
-
return jpg result
|
32
|
+
return jpg result if result
|
33
|
+
return invalid 'request'
|
34
34
|
else
|
35
|
-
return ok object.verbose_state
|
35
|
+
return ok object.verbose_state.to_s
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|