restpack-web 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,12 +2,12 @@ module RestPack
2
2
  module Web
3
3
  class App
4
4
  attr_accessor :core_domain
5
- def initialize(app)
5
+ def initialize(app, settings = {})
6
6
  p "RestPack::Web::App.initialize"
7
7
  @app = app
8
- @core_domain = "default"
8
+ @settings = settings
9
9
 
10
- yield
10
+ p "settings: #{settings}"
11
11
  end
12
12
 
13
13
  def call(env)
@@ -15,9 +15,7 @@ module RestPack
15
15
  host = env["SERVER_NAME"]
16
16
 
17
17
  env["restpack"][:host] = host #TODO: GJ: add some magic
18
- env["restpack"][:core_domain] = @core_domain
19
-
20
-
18
+ env["restpack"][:settings] = @settings
21
19
 
22
20
  @app.call(env)
23
21
  end
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Web
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -12,8 +12,9 @@ describe RestPack::Web do
12
12
 
13
13
  let(:app) {
14
14
  RestPack::Web::App.new(
15
- lambda { |env| [200, {'Content-Type' => 'text/plain'}, 'hello there'] }
16
- )
15
+ lambda { |env| [200, {'Content-Type' => 'text/plain'}, 'hello there'] },
16
+ { :aa => 444}
17
+ )
17
18
  }
18
19
 
19
20
  it "returns a valid response" do
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.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: