rack-locale_chooser 0.0.7 → 0.0.8

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.
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module LocaleChooser
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  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: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jefferson Jean Martins Gir\xC3\xA3o"