geo_locale 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/lib/geo_locale/locale.rb +2 -2
- data/lib/geo_locale/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aad903af3f55a1262afb745660501b52d00eece6
|
4
|
+
data.tar.gz: 8b480b35329b6d97dee4fd90825354d1db8f8b60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 337eb1b972d2d643d87dc9782929db9f101038702a69e2e87d5750ba88062a970cc5b785ce53c8058fb8b33d7c752d30710c77cb33f3fe875c65da7365032333
|
7
|
+
data.tar.gz: 1ac2a1f5efcccb9ba885dac6572aa68fd5d7d6bdb7e83b8eac4a865a3a557c1156090e79077b72e625dee8c7009cac11afa189782b0d6b05870a90fc59792a4c
|
data/README.md
CHANGED
@@ -4,6 +4,10 @@ Simple wrapper for GeoIP gem with some redundancy on GeoKit to get a two-letter
|
|
4
4
|
|
5
5
|
Basic use-case: Detect application user's origin and display app in that language.
|
6
6
|
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
Ruby 2.0.0 and greater
|
10
|
+
|
7
11
|
## Installation
|
8
12
|
|
9
13
|
Add this line to your application's Gemfile:
|
@@ -61,9 +65,12 @@ GeoLocale.locale(ip: "97.77.25.20", country_code: "lv")
|
|
61
65
|
=> "lv"
|
62
66
|
```
|
63
67
|
|
64
|
-
##
|
68
|
+
## TO-DO
|
65
69
|
|
66
|
-
|
70
|
+
1. Extend the country_code => locale hash in lib/geo_locale/locale.rb
|
71
|
+
2. Open the hash to configuration overrides
|
72
|
+
|
73
|
+
## Contributing
|
67
74
|
|
68
75
|
1. Fork it ( https://github.com/Epigene/geo_locale/fork )
|
69
76
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
data/lib/geo_locale/locale.rb
CHANGED
@@ -60,7 +60,7 @@ module GeoLocale
|
|
60
60
|
}
|
61
61
|
|
62
62
|
|
63
|
-
def self.figure_out_returnable_locale(locale:)
|
63
|
+
def self.figure_out_returnable_locale(locale: "")
|
64
64
|
if locale.present?
|
65
65
|
return locale
|
66
66
|
else
|
@@ -68,7 +68,7 @@ module GeoLocale
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
def self.figure_out_returnable_lcid(lcid_string:)
|
71
|
+
def self.figure_out_returnable_lcid(lcid_string: "")
|
72
72
|
if lcid_string.present?
|
73
73
|
return lcid_string
|
74
74
|
else
|
data/lib/geo_locale/version.rb
CHANGED