restpack-web 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/restpack-web/app.rb +6 -6
- data/lib/restpack-web/version.rb +1 -1
- metadata +1 -1
data/lib/restpack-web/app.rb
CHANGED
@@ -12,18 +12,18 @@ module RestPack
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def call(env)
|
15
|
-
env[
|
15
|
+
restpack = env[:restpack] ||= {}
|
16
16
|
host = env["SERVER_NAME"]
|
17
17
|
|
18
|
-
|
18
|
+
restpack[:host] = host
|
19
19
|
begin #TODO: GJ: cache should handle errors gracefully
|
20
20
|
channel = @core_cache.get_channel(host)
|
21
21
|
domain = channel.get_domain_by_identifier(host)
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
rescue Exception => e
|
23
|
+
restpack[:channel] = channel
|
24
|
+
restpack[:application] = domain.application
|
25
|
+
restpack[:domain] = domain
|
26
|
+
rescue Exception => e
|
27
27
|
p e.message
|
28
28
|
p e.backtrace.inspect
|
29
29
|
end
|
data/lib/restpack-web/version.rb
CHANGED