rack-locale_chooser 0.0.9 → 0.0.10
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.
|
@@ -8,6 +8,7 @@ module Rack::LocaleChooser
|
|
|
8
8
|
:geodb_path => '/usr/local/Cellar/geoip/1.4.6/share/GeoIP/GeoLiteCity.dat'
|
|
9
9
|
}.merge(options)
|
|
10
10
|
@geodb = Net::GeoIP.new(@options[:geodb_path])
|
|
11
|
+
@logger = File.new("log/locale_chooser.log", "a")
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def call(env)
|
|
@@ -20,7 +21,7 @@ module Rack::LocaleChooser
|
|
|
20
21
|
|
|
21
22
|
set_locale
|
|
22
23
|
|
|
23
|
-
puts "Url Locale: #{url_locale} | Cookie Locale: #{cookie_locale} | Geo Locale: #{geo_locale} | Browser Locale: #{browser_locale} | Definitive Locale: #{locale} | Original URL: #{@original_url} | New URL: #{localized_url}"
|
|
24
|
+
@logger.puts "Url Locale: #{url_locale} | Cookie Locale: #{cookie_locale} | Geo Locale: #{geo_locale} | Browser Locale: #{browser_locale} | Definitive Locale: #{locale} | Original URL: #{@original_url} | New URL: #{localized_url}"
|
|
24
25
|
|
|
25
26
|
@app.call(env) if @request.post? || @request.put? || @request.delete?
|
|
26
27
|
|
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: 11
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.0.10
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- "Jefferson Jean Martins Gir\xC3\xA3o"
|