restpack-web 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/restpack-web/app.rb +5 -7
- data/lib/restpack-web/version.rb +1 -1
- metadata +1 -1
data/lib/restpack-web/app.rb
CHANGED
@@ -3,20 +3,18 @@ require 'restpack-core-client'
|
|
3
3
|
module RestPack
|
4
4
|
module Web
|
5
5
|
class App
|
6
|
-
def initialize(app,
|
6
|
+
def initialize(app, options = {})
|
7
7
|
p "RestPack::Web::App.initialize"
|
8
8
|
@app = app
|
9
|
-
@settings = settings
|
10
9
|
|
11
|
-
|
10
|
+
options[:core_domain] ||= ENV['RESTPACK_CORE_SERVICE']
|
11
|
+
options[:password] ||= ENV['RESTPACK_ACCESS_KEY']
|
12
|
+
|
13
|
+
@core_cache = RestPack::Core::Client::Cache.create(options[:core_domain], options[:password])
|
12
14
|
end
|
13
15
|
|
14
16
|
def call(env)
|
15
17
|
begin #TODO: GJ: cache should handle errors gracefully
|
16
|
-
|
17
|
-
p " - env[RESTPACK_ACCESS_KEY]: #{env['RESTPACK_ACCESS_KEY']}"
|
18
|
-
p " - ENV[RESTPACK_ACCESS_KEY]: #{ENV['RESTPACK_ACCESS_KEY']}"
|
19
|
-
|
20
18
|
env[:restpack] ||= {}
|
21
19
|
|
22
20
|
host = env["SERVER_NAME"]
|
data/lib/restpack-web/version.rb
CHANGED