rack-locale_chooser 0.0.14 → 0.5

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.
data/README ADDED
@@ -0,0 +1,35 @@
1
+ Locale Chooser - A Rack Middleware for Locale Selection
2
+
3
+ Priority
4
+
5
+ Cookie Setting > Geolocation > HTTP Accept Language Header > Default
6
+
7
+ Prerequisites
8
+ ---
9
+ GeoIP C API Installed: http://www.maxmind.com/app/c
10
+ GeoIP Ruby Wrapper Installed: http://rubyforge.org/scm/?group_id=947
11
+
12
+ ---
13
+ Install
14
+
15
+ gem install rack-locale_chooser
16
+
17
+ ---
18
+ Example for Rails Use on some enviroment file:
19
+
20
+ config.gem 'rack-locale_chooser'
21
+
22
+ config.middleware.use 'Rack::LocaleChooser', :geodb_path => '/usr/local/share/GeoIP/GeoLiteCity.dat',
23
+ :default_domain => 'example.com',
24
+ :host_mappings => { :es => 'es.example.com',
25
+ :pt_BR => 'br.example.com'
26
+ },
27
+ :country_mappings => { 'BR' => :pt_BR, 'MX' => :es }
28
+
29
+ ---
30
+ Params
31
+
32
+ host_mappings -> Mapping from locale to host for url rewriting
33
+ country_mappings -> Mapping from country codes returned by GeoIP to locales
34
+ default_domain -> default domain for cookie setting
35
+ geodb_path -> path for GeoIP dat file
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module LocaleChooser
3
- VERSION = "0.0.14"
3
+ VERSION = "0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-locale_chooser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 0
9
- - 14
10
- version: 0.0.14
8
+ - 5
9
+ version: "0.5"
11
10
  platform: ruby
12
11
  authors:
13
12
  - "Jefferson Jean Martins Gir\xC3\xA3o"
@@ -77,6 +76,7 @@ files:
77
76
  - .gitignore
78
77
  - Gemfile
79
78
  - Gemfile.lock
79
+ - README
80
80
  - Rakefile
81
81
  - lib/rack-locale_chooser.rb
82
82
  - lib/rack-locale_chooser/chooser.rb