restpack-web 0.2.20 → 0.2.21
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/restpack-web/app.rb +6 -3
- data/lib/restpack-web/version.rb +1 -1
- metadata +2 -2
data/lib/restpack-web/app.rb
CHANGED
@@ -10,14 +10,17 @@ module RestPack
|
|
10
10
|
options[:core_domain] ||= ENV['RESTPACK_CORE_SERVICE']
|
11
11
|
options[:access_key] ||= ENV['RESTPACK_ACCESS_KEY']
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
unless options[:core_domain] || options[:access_key]
|
14
|
+
p "[WARNING] Missing RestPack configuration"
|
15
|
+
else
|
16
|
+
@core_cache = RestPack::Core::Client::Cache.create(options[:core_domain], options[:access_key])
|
17
|
+
end
|
16
18
|
end
|
17
19
|
|
18
20
|
def call(env)
|
19
21
|
env[:restpack] ||= {}
|
20
22
|
|
23
|
+
#TODO: GJ: ignore requests with a file extension
|
21
24
|
begin #TODO: GJ: cache should handle errors gracefully
|
22
25
|
request = Rack::Request.new(env)
|
23
26
|
channel = @core_cache.get_channel(request.host)
|
data/lib/restpack-web/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.21
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack-auto-session-domain
|