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.
@@ -3,20 +3,18 @@ require 'restpack-core-client'
3
3
  module RestPack
4
4
  module Web
5
5
  class App
6
- def initialize(app, settings)
6
+ def initialize(app, options = {})
7
7
  p "RestPack::Web::App.initialize"
8
8
  @app = app
9
- @settings = settings
10
9
 
11
- @core_cache = RestPack::Core::Client::Cache.create(@settings[:core_domain], @settings[:password])
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"]
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Web
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
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.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: