rack-geoipcountry 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack/geoipcountry.rb +2 -1
- data/lib/rack/geoipcountry/version.rb +1 -1
- metadata +2 -2
data/lib/rack/geoipcountry.rb
CHANGED
@@ -34,7 +34,8 @@ module Rack
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def call(env)
|
37
|
-
|
37
|
+
request = Rack::Request.new(env)
|
38
|
+
result = @db.country(request.ip).to_hash
|
38
39
|
env['X_GEOIP_COUNTRY_ID'] = result[:country_code]
|
39
40
|
env['X_GEOIP_COUNTRY_CODE'] = result[:country_code2]
|
40
41
|
env['X_GEOIP_COUNTRY_CODE3'] = result[:country_code3]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-geoipcountry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-04-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: geoip
|