geo_redirect 0.2.1 → 0.2.2
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.
- data/README.md +3 -1
- data/lib/geo_redirect/version.rb +1 -1
- data/lib/geo_redirect.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -73,6 +73,8 @@ You can download the database file [directly from MaxMind](http://geolite.maxmin
|
|
73
73
|
|
74
74
|
$ rake georedirect:fetch_db
|
75
75
|
|
76
|
+
It'd be a good idea to use this task on your (Capistrano or whatever) deployment scripts.
|
77
|
+
|
76
78
|
### Custom paths
|
77
79
|
|
78
80
|
The default paths for these files are:
|
@@ -82,7 +84,7 @@ The default paths for these files are:
|
|
82
84
|
|
83
85
|
If that doesn't suit you, you can customize these when adding `GeoRedirect` to your project:
|
84
86
|
|
85
|
-
Rails.application.middleware.use GeoRedirect::Middleware {
|
87
|
+
Rails.application.middleware.use GeoRedirect::Middleware, {
|
86
88
|
:db => 'db/geo_database.dat',
|
87
89
|
:config => 'geo_cfg.yml'
|
88
90
|
}
|
data/lib/geo_redirect/version.rb
CHANGED
data/lib/geo_redirect.rb
CHANGED
@@ -119,7 +119,7 @@ module GeoRedirect
|
|
119
119
|
}.to_param
|
120
120
|
url.query = nil if url.query.empty?
|
121
121
|
|
122
|
-
[301, {'Location' => url.to_s}, ['Moved Permanently\n']]
|
122
|
+
[301, {'Location' => url.to_s, 'Content-Type' => 'text/plain'}, ['Moved Permanently\n']]
|
123
123
|
else
|
124
124
|
@app.call(@request.env)
|
125
125
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geo_redirect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: geoip
|