city-state 0.0.6 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c33a5381f1355008108f627cdeedae57df0c5750
4
- data.tar.gz: 288ab4bc38632df89c32920863453c104b3df0e1
3
+ metadata.gz: af6b5373a9ad4a02e647879ad544774923df5c3c
4
+ data.tar.gz: 2d0dce08c9d63339f52a1b45a7c1b025485c6296
5
5
  SHA512:
6
- metadata.gz: 955adfae9aabd67b4a73dac35fb41199078984a3498881b5c7d0f1160926dc49de2e60e90cfd51901b3314dff825d03be16c2402e4bf7fdd4ebf30aaf3e1d217
7
- data.tar.gz: b6ab44121baba409805b6edec1167ff952efd3edde424fc42258a75c61ac4ba013d09c109c435a3bc6f8fc422d018849ead4013d4a868310810959195d4568d7
6
+ metadata.gz: 3989726ce642b099b923a5e8d3f2d9171404480350fdfae5eb09a1273028328af322e9f980ad1df615f2a251a8bd787c47ba26ed5bcd011071eddba07e77124b
7
+ data.tar.gz: bbe60a848a5548e64e871349731568ab36aecc14fa8c61b9b2f071c7c8b2ec511bd4d9b078b2c33a8cecd7344132cbe69e418a104d44672eb553848f9e2a1c95
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # city-state Ruby Gem
1
+ # city-state ruby gem
2
2
 
3
- **city-state** is a very simple Ruby Gem that you can use to get a list of states of a country. Also, you can get a list of cities from a state.
3
+ **city-state** is a very simple ruby gem that you can use to get a list of states in a country. Also, you can get a list of cities in a state.
4
4
 
5
5
  ## Put this gem at your Gemfile:
6
6
  ```ruby
@@ -12,14 +12,16 @@ gem 'city-state'
12
12
  CS.states(:us)
13
13
  # => {:AK=>"Alaska", :AL=>"Alabama", :AR=>"Arkansas", :AZ=>"Arizona", :CA=>"California", :CO=>"Colorado", :CT=>"Connecticut", :DC=>"District of Columbia", :DE=>"Delaware", :FL=>"Florida", :GA=>"Georgia", :HI=>"Hawaii", :IA=>"Iowa", :ID=>"Idaho", :IL=>"Illinois", :IN=>"Indiana", :KS=>"Kansas", :KY=>"Kentucky", :LA=>"Louisiana", :MA=>"Massachusetts", :MD=>"Maryland", :ME=>"Maine", :MI=>"Michigan", :MN=>"Minnesota", :MO=>"Missouri", :MS=>"Mississippi", :MT=>"Montana", :NC=>"North Carolina", :ND=>"North Dakota", :NE=>"Nebraska", :NH=>"New Hampshire", :NJ=>"New Jersey", :NM=>"New Mexico", :NV=>"Nevada", :NY=>"New York", :OH=>"Ohio", :OK=>"Oklahoma", :OR=>"Oregon", :PA=>"Pennsylvania", :RI=>"Rhode Island", :SC=>"South Carolina", :SD=>"South Dakota", :TN=>"Tennessee", :TX=>"Texas", :UT=>"Utah", :VA=>"Virginia", :VT=>"Vermont", :WA=>"Washington", :WI=>"Wisconsin", :WV=>"West Virginia", :WY=>"Wyoming"}
14
14
  ```
15
+ **PS:** *city-state is case insensitive. You can use :US, :us, :Us, "us", "US", ...*
15
16
 
16
17
  ## Get a list of cities:
17
18
  ```ruby
18
- CS.cities(:ak)
19
+ CS.cities(:ak, :us)
19
20
  # => ["Adak", "Akhiok", "Akiachak", "Akiak", "Akutan", "Alakanuk", "Ambler", "Anchor Point", "Anchorage", "Angoon", "Atqasuk", "Barrow", "Bell Island Hot Springs", "Bethel", "Big Lake", "Buckland", "Chefornak", "Chevak", "Chicken", "Chugiak", "Coffman Cove", "Cooper Landing", "Copper Center", "Cordova", "Craig", "Deltana", "Dillingham", "Douglas", "Dutch Harbor", "Eagle River", "Eielson Air Force Base", "Fairbanks", "Fairbanks North Star Borough", "Fort Greely", "Fort Richardson", "Galena", "Girdwood", "Goodnews Bay", "Haines", "Homer", "Hooper Bay", "Juneau", "Kake", "Kaktovik", "Kalskag", "Kenai", "Ketchikan", "Kiana", "King Cove", "King Salmon", "Kipnuk", "Klawock", "Kodiak", "Kongiganak", "Kotlik", "Koyuk", "Kwethluk", "Levelock", "Manokotak", "May Creek", "Mekoryuk", "Metlakatla", "Mountain Village", "Nabesna", "Naknek", "Nazan Village", "Nenana", "New Stuyahok", "Nikiski", "Ninilchik", "Noatak", "Nome", "Nondalton", "Noorvik", "North Pole", "Northway", "Old Kotzebue", "Palmer", "Pedro Bay", "Petersburg", "Pilot Station", "Point Hope", "Point Lay", "Prudhoe Bay", "Russian Mission", "Sand Point", "Scammon Bay", "Selawik", "Seward", "Shungnak", "Sitka", "Skaguay", "Soldotna", "Stebbins", "Sterling", "Sutton", "Talkeetna", "Teller", "Thorne Bay", "Togiak", "Tok", "Toksook Bay", "Tuntutuliak", "Two Rivers", "Unalakleet", "Unalaska", "Valdez", "Wainwright", "Wasilla"]
20
21
  ```
21
22
 
22
23
  ## Update the database from MaxMind:
24
+ MaxMind update their databases weekly on tuesdays. To get a new and updated version, you can update with:
23
25
  ```ruby
24
26
  CS.update
25
27
  ```
@@ -34,13 +36,13 @@ CS.cities(:sp, :br)
34
36
  The country is an optional argument. **city-state** always uses the last country that you used.
35
37
  ```ruby
36
38
  CS.states(:br)
37
- # => {:AC=>"Acre", :AL=>"Alagoas", :AM=>"Amazonas", :AP=>"Amapa", :BA=>"Bahia", :CE=>"Ceara", :DF=>"Federal District", :ES=>"Espirito Santo", :GO=>"Goias", :MA=>"Maranhao", :MG=>"Minas Gerais", :MS=>"Mato Grosso do Sul", :MT=>"Mato Grosso", :PA=>"Para", :PB=>"Paraiba", :PE=>"Pernambuco", :PI=>"Piaui", :PR=>"Parana", :RJ=>"Rio de Janeiro", :RN=>"Rio Grande do Norte", :RO=>"Rondonia", :RR=>"Roraima", :RS=>"Rio Grande do Sul", :SC=>"Santa Catarina", :SE=>"Sergipe", :SP=>"Sao Paulo", :TO=>"Tocantins"}
39
+ # => {:AC=>"Acre", :AL=>"Alagoas", :AM=>"Amazonas", :AP=>"Amapa", :BA=>"Bahia", :CE=>"Ceara", :DF=>"Federal District", :ES=>"Espirito Santo", :GO=>"Goias", :MA=>"Maranhao", :MG=>"Minas Gerais", :MS=>"Mato Grosso do Sul", :MT=>"Mato Grosso", :PA=>"Para", :PB=>"Paraiba", :PE=>"Pernambuco", :PI=>"Piaui", :PR=>"Parana", :RJ=>"Rio de Janeiro", :RN=>"Rio Grande do Norte", :RO=>"Rondonia", :RR=>"Roraima", :RS=>"Rio Grande do Sul", :SC=>"Santa Catarina", :SE=>"Sergipe", :SP=>"Sao Paulo", :TO=>"Tocantins"}
38
40
  CS.cities(:to)
39
- # => ["Aparecida do Rio Negro", "Araguaína", "Brejinho de Nazare", "Gurupi", "Itaguatins", "Miracema do Tocantins", "Monte Alegre", "Palmas", "Paraiso do Tocantins", "Parana", "Pedro Afonso", "Porto Nacional", "Presidente Kennedy", "Salvador", "Santo Antonio", "Sao Domingos", "Taguatinga", "Tucum"]
41
+ # => ["Aparecida do Rio Negro", "Araguaína", "Brejinho de Nazare", "Gurupi", "Itaguatins", "Miracema do Tocantins", "Monte Alegre", "Palmas", "Paraiso do Tocantins", "Parana", "Pedro Afonso", "Porto Nacional", "Presidente Kennedy", "Salvador", "Santo Antonio", "Sao Domingos", "Taguatinga", "Tucum"]
40
42
  ```
41
43
 
42
- # City-State License
43
- city-state is a open source project by Daniel Loureiro with a MIT license. Also, it uses MaxMind open source database.
44
+ # CityState License
45
+ **city-state** is a open source project by Daniel Loureiro with a MIT license. Also, it uses MaxMind open source database.
44
46
 
45
47
  # MaxMind License
46
48
  Database and Contents Copyright (c) 2015 MaxMind, Inc.
data/city-state.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Daniel Loureiro"]
10
10
  spec.email = ["loureirorg@gmail.com"]
11
11
  spec.summary = %q{Simple list of cities and states of the world}
12
- spec.description = %q{Useful to do forms and validations. It uses MaxMind CC database.}
12
+ spec.description = %q{Useful to make forms and validations. It uses MaxMind database.}
13
13
  spec.homepage = "https://github.com/loureirorg/city-state"
14
14
  spec.license = "MIT"
15
15
 
@@ -1,3 +1,3 @@
1
1
  module CS
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: city-state
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Loureiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-08 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.1'
55
- description: Useful to do forms and validations. It uses MaxMind CC database.
55
+ description: Useful to make forms and validations. It uses MaxMind database.
56
56
  email:
57
57
  - loureirorg@gmail.com
58
58
  executables: []