rack-locale_chooser 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-locale_chooser (0.6)
4
+ rack-locale_chooser (1.1)
5
+ i18n
5
6
 
6
7
  GEM
7
8
  remote: http://rubygems.org/
@@ -86,8 +86,8 @@ module Rack::LocaleChooser
86
86
 
87
87
  def set_locale
88
88
  I18n.locale = @env['rack.locale'] = locale.to_sym
89
- @env['rack.city'] = geo_record.city if geo_record
90
- @env['rack.country_code'] = geo_record.country_code if geo_record
89
+ geo_record.nil? ? @env['rack.city'] = 'undefined' : geo_record.city
90
+ geo_record.nil? ? @env['rack.country_code'] = 'undefined' : geo_record.country_code
91
91
  end
92
92
 
93
93
  def localized_url
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module LocaleChooser
3
- VERSION = "1.1"
3
+ VERSION = "1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-locale_chooser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 1
9
- version: "1.1"
8
+ - 2
9
+ version: "1.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Jefferson Jean Martins Gir\xC3\xA3o"