rack-locale_chooser 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ module Rack::LocaleChooser
|
|
7
7
|
:default_domain => 'example.com',
|
8
8
|
:geodb_path => '/usr/local/Cellar/geoip/1.4.6/share/GeoIP/GeoLiteCity.dat'
|
9
9
|
}.merge(options)
|
10
|
-
@geodb = Net::GeoIP.new(@options[:geodb_path])
|
10
|
+
@geodb = Net::GeoIP.new(@options[:geodb_path])
|
11
11
|
end
|
12
12
|
|
13
13
|
def call(env)
|
@@ -30,7 +30,7 @@ module Rack::LocaleChooser
|
|
30
30
|
response.set_cookie('locale', {
|
31
31
|
:value => I18n.locale,
|
32
32
|
:path => '/',
|
33
|
-
:domain => @env["rack.session.options"][:domain]})
|
33
|
+
:domain => @env["rack.session.options"][:domain]}) if geo_locale != cookie_locale
|
34
34
|
response.finish
|
35
35
|
end
|
36
36
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-locale_chooser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jefferson Jean Martins Gir\xC3\xA3o"
|