postal_codes 0.0.3 → 0.0.6
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.
- checksums.yaml +15 -0
- data/README.md +10 -2
- data/lib/data/india.yml +19164 -19156
- data/lib/postal_codes/version.rb +1 -1
- data/lib/postal_codes.rb +1 -1
- metadata +11 -18
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
MjU3OWZjZTI1OGUwNDgxY2RkOWRlMWY3ZmY3NGU0ZTMzZjU3ZjY5MQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
NjRlNGY4NTk2MGM1ZjUwZmViMTA0OTRkZDU3Yzc1ZTk5MzczMTNlNA==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
YmEzYjJkMjBiNDkzOTAxOTFjMWFlNGM3MjAxZjcyMTliYzczZTBhMDFlMzYy
|
|
10
|
+
YjFjOWYzMDVhMzkzYTBhYzRjMmZjYjgxYTYzNjM1MzAyMjljZjgyMTRmZDNk
|
|
11
|
+
YmQzNWRhNTA4MmM1NzQzOTVlNmZiMjlhZTM0NjIwZmM4YTM0NDk=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
ZTY4ODFhN2JlNzcxNzNlZjA4NjUxOGE2NzVhNmQwNGU5YzkwMWUwZmQ0NGI1
|
|
14
|
+
Nzk1MzQwM2U4YzIwNmI4NzczMDJmNjUxZWNlMjZhMWQyNTRkMjlhNjU0MDNh
|
|
15
|
+
ODc3YTZmOTlhYmY3ZGFmZWZmZGMxNmIxMWFlYzRjNjMwMjIyOTY=
|
data/README.md
CHANGED
|
@@ -27,11 +27,19 @@ To Find information of postal code :
|
|
|
27
27
|
|
|
28
28
|
It will return the array of Hash:
|
|
29
29
|
|
|
30
|
-
[{"country"=>{"name"=>"India", "calling_code"=>"+91", "alpha_2_code"=>"IN", "alpha_3_code"=>"IND", "numeric_code"=>"356"}, "state"=>"DELHI", "locality"=>"
|
|
31
|
-
|
|
30
|
+
[{"country"=>{"name"=>"India", "calling_code"=>"+91", "alpha_2_code"=>"IN", "alpha_3_code"=>"IND", "numeric_code"=>"356"}, "state"=>"DELHI", "locality"=>"Dayalpur,Khazuri Khas,Sabhapur,Gokal Puri,Johripur"}]
|
|
31
|
+
|
|
32
|
+
locality contains the comma separated list of localities which comes under given postal_code.
|
|
33
|
+
|
|
32
34
|
In rare case if a postal code present in more than one country then it will display result as follows :
|
|
33
35
|
|
|
34
36
|
[{"country"=>{"name"=>"India", "calling_code"=>"+91", "alpha_2_code"=>"IN", "alpha_3_code"=>"IND", "numeric_code"=>"356"},"state"=>"DELHI", "locality"=>"New Delhi"}, {"country"=>{"name"=>"USA","calling_code"=>"+1","alpha_2_code"=>"US", "alpha_3_code"=>"USA", "numeric_code"=>"840"},"state"=>"Alabama", "locality"=>"Moody"}]
|
|
37
|
+
|
|
38
|
+
First Load will take time to load. If using Rails, you can load the hash on app startup for production and staging.
|
|
39
|
+
|
|
40
|
+
# config/initializers/postal_codes_load.rb
|
|
41
|
+
PostalCodes.data unless Rails.env.development?
|
|
42
|
+
|
|
35
43
|
|
|
36
44
|
## Contributing
|
|
37
45
|
|