rack-mux 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/rack/mux.rb +2 -2
  2. data/spec/rack_mux_spec.rb +4 -0
  3. metadata +3 -3
data/lib/rack/mux.rb CHANGED
@@ -2,7 +2,7 @@ require 'rack'
2
2
 
3
3
  module Rack
4
4
  class Mux
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  HEADER = 'X-Mux-Uri'
7
7
 
8
8
  def initialize(app, options = {})
@@ -15,7 +15,7 @@ module Rack
15
15
  end
16
16
 
17
17
  def call(env)
18
- @app.call(env.merge(HEADER => @uri.to_s))
18
+ @app.call(env.merge(HEADER => @uri.to_s, 'SERVER_PORT' => @port.to_s))
19
19
  end
20
20
 
21
21
  def rackup
@@ -13,4 +13,8 @@ describe Rack::Mux do
13
13
  new_uri = JSON.parse(new_client.get('/').body)['X-Mux-Uri']
14
14
  new_uri.should == uri
15
15
  end
16
+
17
+ it 'sets the SERVER_PORT header' do
18
+ JSON.parse(@client.get('/').body)['SERVER_PORT'].should_not be_empty
19
+ end
16
20
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-mux
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ben Burkert