rack-entrance 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Rack
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 0
6
- TINY = 2
6
+ TINY = 3
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
9
9
  end
data/lib/rack/entrance.rb CHANGED
@@ -9,7 +9,7 @@ module Rack
9
9
 
10
10
  def call(env)
11
11
  request = Rack::Request.new(env)
12
- ip = env["action_dispatch.remote_ip"] || request.ip
12
+ ip = (env["action_dispatch.remote_ip"] || request.ip).to_s
13
13
  request.env['entrance.ip'] = ip
14
14
  request.env['entrance.internal_ips'] = internal_ips
15
15
  request.env['entrance.internal'] = internal?(ip)
@@ -11,7 +11,7 @@ describe Rack::Entrance do
11
11
 
12
12
  context 'internal request' do
13
13
  before do
14
- ENV['ENTRANCE_INTERNAL_IPS'] = '127.0.0.1'
14
+ ENV['ENTRANCE_INTERNAL_IPS'] = '127.0.0.1,203.0.113.255'
15
15
  get '/'
16
16
  end
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-entrance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: