geo_redirect 0.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82d54b2c77fe8c90bc209fd0adcb1b01815a1cad
4
- data.tar.gz: 3928b90c6060facb3365babf3b9222da9e31fec3
3
+ metadata.gz: bb805fe570535898e17ea6ce307d9678fca06592
4
+ data.tar.gz: f778479e3b46d3f14370918f92cbd609aa399b8d
5
5
  SHA512:
6
- metadata.gz: 7571edc045457947731740163892ea1ce6b4ce957167d87f564eb605154aadb3823a03fc44d1e665491a843ed8c7c3ddc5d8d8c7732a4e22f230927b1f85e931
7
- data.tar.gz: 5b802714a2b3b312ec50b43bf37052717083ab45b3f8fb373f2db979a19ce2dff39ef8fb54e57e534887d4ed432c62103d5b3c1fa83fa74e2aec75194e685003
6
+ metadata.gz: 26a9a0e3ec64548126373b48582e968ee617eeebab97d509679cbbe5b0e1b536d2865d1d43167adc6ae18ad601e411f2de81dba508342830449f12ccdf641604
7
+ data.tar.gz: 3d3cb9208831106ff865db2cd66840eaef622d43869a2660bdcc8ce790520f5e6eb7c9fc3d97a7bd0b1e7f91f894d79c836e26972019d0d828c7171ea821804d
data/README.md CHANGED
@@ -110,7 +110,7 @@ will match `www.myapp.com/exclude` but not `www.myapp.com/other/path/exclude`
110
110
 
111
111
  The default paths for these files are:
112
112
 
113
- 1. `config/georedirect.yml`
113
+ 1. `config/geo_redirect.yml`
114
114
  2. `db/GeoIP.dat`
115
115
 
116
116
  If that doesn't suit you, you can customize these when adding `GeoRedirect` to
@@ -39,6 +39,7 @@ module GeoRedirect
39
39
 
40
40
  def session_exists?
41
41
  host = @request.session['geo_redirect']
42
+ host = host.to_sym if host && host.respond_to?(:to_sym)
42
43
  if host && @config[host].nil? # Invalid var, remove it
43
44
  log 'Invalid session var, forgetting'
44
45
  forget_host(host)
@@ -50,6 +51,7 @@ module GeoRedirect
50
51
 
51
52
  def handle_session
52
53
  host = @request.session['geo_redirect']
54
+ host = host.is_a?(Symbol) ? host : host.to_sym if host
53
55
  log "Handling session var: #{host}"
54
56
  redirect_request(host)
55
57
  end
@@ -1,3 +1,3 @@
1
1
  module GeoRedirect
2
- VERSION = '0.5'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_redirect
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sagie Maoz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-23 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake