turkish_cities 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.hound.yml +3 -0
- data/.rspec +1 -0
- data/.rubocop.yml +20 -0
- data/.travis.yml +12 -0
- data/CHANGELOG.md +21 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +75 -0
- data/LICENSE.txt +7 -0
- data/README.md +106 -0
- data/lib/turkish_cities/city.rb +30 -11
- data/lib/turkish_cities/data/cities.yaml +405 -0
- data/lib/turkish_cities/version.rb +5 -0
- data/lib/turkish_cities.rb +1 -0
- data/turkish_cities.gemspec +34 -0
- metadata +101 -8
- data/lib/turkish_cities/data/city_list.rb +0 -247
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0522e7708e876a18f959cb45c4707a4d2490201a605c31b2175af4497369214
|
4
|
+
data.tar.gz: '0853e0da391ef43b97806c40ee2094fdbc94901ff97dcd3f67ee6079428270da'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fe106b6c80be5368c405b09679ad3af659fd5655438a4ed357b55802cd4a7f1dc261c83be5638e2144f97bd608198393216638de8591419764ae2223c6fc099
|
7
|
+
data.tar.gz: ba31383c0eb87f4d79a5d4d779cb99fbf00a3aebeb15ead25c8afe2fb2865bee1c1fe1fe87bbb62e641fdf009afb0f880f5c6b76dd5ec6659b9783db2913d7c9
|
data/.gitignore
ADDED
data/.hound.yml
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5.1
|
3
|
+
Exclude:
|
4
|
+
- 'Gemfile'
|
5
|
+
- 'turkish_cities.gemspec'
|
6
|
+
Layout/LineLength:
|
7
|
+
Max: 100
|
8
|
+
Metrics/BlockLength:
|
9
|
+
ExcludedMethods: ['describe', 'context']
|
10
|
+
Style/Documentation:
|
11
|
+
Enabled: false
|
12
|
+
Style/HashEachMethods:
|
13
|
+
Enabled: true
|
14
|
+
Style/HashTransformKeys:
|
15
|
+
Description: 'Prefer `transform_keys` over `each_with_object` and `map`.'
|
16
|
+
Enabled: true
|
17
|
+
Style/HashTransformValues:
|
18
|
+
Description: 'Prefer `transform_values` over `each_with_object` and `map`.'
|
19
|
+
Enabled: true
|
20
|
+
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.1.2 (2020-04-13)
|
4
|
+
|
5
|
+
### New features
|
6
|
+
|
7
|
+
* [#11](https://github.com/sarslanoglu/turkish_cities/pull/11): Change city_list data to yaml file format
|
8
|
+
|
9
|
+
### Bug fixes
|
10
|
+
|
11
|
+
* [#6](https://github.com/sarslanoglu/turkish_cities/pull/6): Fix capital Turkish characters bug on cities with capital 'I' letter
|
12
|
+
|
13
|
+
### Changes
|
14
|
+
|
15
|
+
* [#16](https://github.com/sarslanoglu/turkish_cities/pull/16): Handle error messages at ```find_name_by_plate_number``` and ```find_plate_number_by_name``` methods
|
16
|
+
|
17
|
+
## 0.1.1 (2020-03-31)
|
18
|
+
|
19
|
+
### Changes
|
20
|
+
|
21
|
+
* Fix homepage problem on .gemspec file
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at arslanoglusemih93@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
turkish_cities (0.1.2)
|
5
|
+
i18n (>= 0.6.4, <= 2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.0)
|
11
|
+
concurrent-ruby (1.1.6)
|
12
|
+
coveralls (0.8.23)
|
13
|
+
json (>= 1.8, < 3)
|
14
|
+
simplecov (~> 0.16.1)
|
15
|
+
term-ansicolor (~> 1.3)
|
16
|
+
thor (>= 0.19.4, < 2.0)
|
17
|
+
tins (~> 1.6)
|
18
|
+
diff-lcs (1.3)
|
19
|
+
docile (1.3.2)
|
20
|
+
i18n (1.8.2)
|
21
|
+
concurrent-ruby (~> 1.0)
|
22
|
+
jaro_winkler (1.5.4)
|
23
|
+
json (2.3.0)
|
24
|
+
parallel (1.19.1)
|
25
|
+
parser (2.7.1.0)
|
26
|
+
ast (~> 2.4.0)
|
27
|
+
rainbow (3.0.0)
|
28
|
+
rexml (3.2.4)
|
29
|
+
rspec (3.9.0)
|
30
|
+
rspec-core (~> 3.9.0)
|
31
|
+
rspec-expectations (~> 3.9.0)
|
32
|
+
rspec-mocks (~> 3.9.0)
|
33
|
+
rspec-core (3.9.1)
|
34
|
+
rspec-support (~> 3.9.1)
|
35
|
+
rspec-expectations (3.9.1)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.9.0)
|
38
|
+
rspec-mocks (3.9.1)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.9.0)
|
41
|
+
rspec-support (3.9.2)
|
42
|
+
rubocop (0.80.1)
|
43
|
+
jaro_winkler (~> 1.5.1)
|
44
|
+
parallel (~> 1.10)
|
45
|
+
parser (>= 2.7.0.1)
|
46
|
+
rainbow (>= 2.2.2, < 4.0)
|
47
|
+
rexml
|
48
|
+
ruby-progressbar (~> 1.7)
|
49
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
50
|
+
ruby-progressbar (1.10.1)
|
51
|
+
simplecov (0.16.1)
|
52
|
+
docile (~> 1.1)
|
53
|
+
json (>= 1.8, < 3)
|
54
|
+
simplecov-html (~> 0.10.0)
|
55
|
+
simplecov-html (0.10.2)
|
56
|
+
sync (0.5.0)
|
57
|
+
term-ansicolor (1.7.1)
|
58
|
+
tins (~> 1.0)
|
59
|
+
thor (1.0.1)
|
60
|
+
tins (1.24.1)
|
61
|
+
sync
|
62
|
+
unicode-display_width (1.6.1)
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
bundler (~> 2.1.4)
|
69
|
+
coveralls (~> 0.8.23)
|
70
|
+
rspec (~> 3.9.0)
|
71
|
+
rubocop (~> 0.80.1)
|
72
|
+
turkish_cities!
|
73
|
+
|
74
|
+
BUNDLED WITH
|
75
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (c) 2020 Semih Arslanoglu
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
# 🏙️ Turkish Cities
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/turkish_cities.svg)](https://rubygems.org/gems/turkish_cities)
|
3
|
+
[![Build Status](https://travis-ci.org/sarslanoglu/turkish_cities.svg?branch=master)](https://travis-ci.org/sarslanoglu/turkish_cities)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/sarslanoglu/turkish_cities.svg)](https://codeclimate.com/github/sarslanoglu/turkish_cities)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/sarslanoglu/turkish_cities/badge.svg?branch=master)](https://coveralls.io/github/sarslanoglu/turkish_cities?branch=master)
|
6
|
+
[![Protected by Hound](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com)
|
7
|
+
[![License](https://img.shields.io/github/license/sarslanoglu/turkish_cities.svg)](https://opensource.org/licenses/MIT)
|
8
|
+
|
9
|
+
**turkish_cities** is a Ruby gem which makes searching and listing Turkish cities easy. https://rubygems.org/gems/turkish_cities
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Installation is pretty standard:
|
14
|
+
|
15
|
+
```sh
|
16
|
+
$ gem install turkish_cities
|
17
|
+
```
|
18
|
+
|
19
|
+
or with using Bundler, add this line to your Gemfile
|
20
|
+
|
21
|
+
```rb
|
22
|
+
gem 'turkish_cities'
|
23
|
+
```
|
24
|
+
|
25
|
+
and run
|
26
|
+
|
27
|
+
```sh
|
28
|
+
$ bundle
|
29
|
+
```
|
30
|
+
|
31
|
+
## Documentation
|
32
|
+
|
33
|
+
With using irb just require gem and start using
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
require 'turkish_cities'
|
37
|
+
```
|
38
|
+
|
39
|
+
### Finding city name by plate number
|
40
|
+
|
41
|
+
There are 81 cities in Turkey. By calling a plate number between 1-81 will give city_name
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
TurkishCities.find_name_by_plate_number(26) # => "Eskişehir"
|
45
|
+
TurkishCities.find_name_by_plate_number(7) # => "Antalya"
|
46
|
+
TurkishCities.find_name_by_plate_number(0007) # => "Antalya"
|
47
|
+
TurkishCities.find_name_by_plate_number(43.0) # => "Kütahya"
|
48
|
+
TurkishCities.find_name_by_plate_number('78') # => "Karabük"
|
49
|
+
TurkishCities.find_name_by_plate_number(100) # => 'Given value [100] is outside bounds of 1 to 81.'
|
50
|
+
```
|
51
|
+
|
52
|
+
### Finding plate number by city name
|
53
|
+
|
54
|
+
City name can be given case and turkish character insensitive
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
TurkishCities.find_plate_number_by_name('Ankara') # => 6
|
58
|
+
TurkishCities.find_plate_number_by_name('Eskişehir') # => 26
|
59
|
+
TurkishCities.find_plate_number_by_name('Canakkale') # => 17
|
60
|
+
TurkishCities.find_plate_number_by_name('kirsehir') # => 40
|
61
|
+
TurkishCities.find_plate_number_by_name('falansehir') # => "Couldn't find city name with 'falansehir'"
|
62
|
+
```
|
63
|
+
|
64
|
+
### Listing all cities
|
65
|
+
|
66
|
+
By default cities will be listed by their plate number ascending.
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
TurkishCities.list_cities # => ["Adana", "Adıyaman" ... "Kilis", "Osmaniye", "Düzce"]
|
70
|
+
```
|
71
|
+
|
72
|
+
While listing cities two additional parameters can be send ```alphabetically_sorted``` and ```metropolitan_municipality``` Both parameters can be send seperately and together.
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
TurkishCities.list_cities({ alphabetically_sorted: true })
|
76
|
+
# => ["Adana", "Adıyaman" ... "Yalova", "Yozgat", "Zonguldak"]
|
77
|
+
TurkishCities.list_cities({ metropolitan_municipality: true })
|
78
|
+
# => ["Adana", "Ankara" ... "Trabzon", "Şanlıurfa", "Van"]
|
79
|
+
TurkishCities.list_cities({ alphabetically_sorted: true, metropolitan_municipality: true })
|
80
|
+
# => ["Adana", "Ankara" ... "Tekirdağ", "Trabzon", "Van"]
|
81
|
+
```
|
82
|
+
|
83
|
+
## Compatibility
|
84
|
+
|
85
|
+
- ✅ `2.7.0` (stable)
|
86
|
+
- ✅ `2.6.3` (stable)
|
87
|
+
- ✅ `2.5.5` (stable)
|
88
|
+
|
89
|
+
- This gem heavily depends of ```:turkic``` case mapping support of Ruby string downcase method. Below Ruby version 2.5.1 some functions will run buggy/false or even won't run at all.
|
90
|
+
|
91
|
+
## Contributing
|
92
|
+
|
93
|
+
1. Fork it ( https://github.com/sarslanoglu/turkish_cities/fork )
|
94
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
95
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
96
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
97
|
+
5. Create new Pull Request
|
98
|
+
|
99
|
+
## Changelog
|
100
|
+
|
101
|
+
turkish_cities changelog is available [here](CHANGELOG.md).
|
102
|
+
|
103
|
+
## Copyright
|
104
|
+
|
105
|
+
Copyright (c) 2020 Semih Arslanoglu. See [LICENSE.txt](LICENSE.txt) for
|
106
|
+
further details.
|
data/lib/turkish_cities/city.rb
CHANGED
@@ -1,31 +1,44 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'i18n'
|
4
|
-
require '
|
4
|
+
require 'yaml'
|
5
5
|
|
6
6
|
class City
|
7
7
|
I18n.enforce_available_locales = false
|
8
8
|
|
9
|
+
CITY_LIST = YAML.load_file('lib/turkish_cities/data/cities.yaml')
|
10
|
+
|
9
11
|
def find_by_id(plate_number)
|
10
|
-
|
12
|
+
unless plate_number.to_i.between?(1, 81)
|
13
|
+
raise RangeError, "Given value [#{plate_number}] is outside bounds of 1 to 81."
|
14
|
+
end
|
15
|
+
|
16
|
+
CITY_LIST.each do |city|
|
17
|
+
return city['name'] if city['plate_number'] == plate_number.to_i
|
18
|
+
end
|
11
19
|
end
|
12
20
|
|
13
21
|
def find_by_name(city_name)
|
14
|
-
CITY_LIST.
|
15
|
-
|
22
|
+
CITY_LIST.each do |city|
|
23
|
+
if convert_chars(city['name'].downcase(:turkic)) == convert_chars(city_name.downcase(:turkic))
|
24
|
+
return city['plate_number']
|
25
|
+
end
|
16
26
|
end
|
27
|
+
"Couldn't find city name with '#{city_name}'"
|
17
28
|
end
|
18
29
|
|
19
30
|
def list_cities(options)
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
city_list.push(attributes[:name]) unless attributes[:metropolitan_municipality_since].nil?
|
24
|
-
else
|
25
|
-
city_list.push(attributes[:name])
|
31
|
+
if options[:metropolitan_municipality]
|
32
|
+
city_list = CITY_LIST.map do |city|
|
33
|
+
city unless city['metropolitan_municipality_since'].nil?
|
26
34
|
end
|
35
|
+
city_list
|
36
|
+
else
|
37
|
+
city_list = CITY_LIST
|
27
38
|
end
|
28
|
-
|
39
|
+
|
40
|
+
final_city_list = prepare_city_list(city_list.compact)
|
41
|
+
options[:alphabetically_sorted] ? sort_cities(final_city_list) : final_city_list
|
29
42
|
end
|
30
43
|
|
31
44
|
private
|
@@ -34,6 +47,12 @@ class City
|
|
34
47
|
I18n.transliterate(string)
|
35
48
|
end
|
36
49
|
|
50
|
+
def prepare_city_list(city_list)
|
51
|
+
city_list.map do |city|
|
52
|
+
city['name']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
37
56
|
def sort_cities(city_list)
|
38
57
|
turkish_alphabet = ' -abcçdefgğhıijklmnoöprsştuüvyz'
|
39
58
|
city_list.sort_by do |city|
|
@@ -0,0 +1,405 @@
|
|
1
|
+
-
|
2
|
+
plate_number: 1
|
3
|
+
name: 'Adana'
|
4
|
+
phone_code: 322
|
5
|
+
metropolitan_municipality_since: 1986
|
6
|
+
-
|
7
|
+
plate_number: 2
|
8
|
+
name: 'Adıyaman'
|
9
|
+
phone_code: 416
|
10
|
+
metropolitan_municipality_since: null
|
11
|
+
-
|
12
|
+
plate_number: 3
|
13
|
+
name: 'Afyon'
|
14
|
+
phone_code: 272
|
15
|
+
metropolitan_municipality_since: null
|
16
|
+
-
|
17
|
+
plate_number: 4
|
18
|
+
name: 'Ağrı'
|
19
|
+
phone_code: 472
|
20
|
+
metropolitan_municipality_since: null
|
21
|
+
-
|
22
|
+
plate_number: 5
|
23
|
+
name: 'Amasya'
|
24
|
+
phone_code: 358
|
25
|
+
metropolitan_municipality_since: null
|
26
|
+
-
|
27
|
+
plate_number: 6
|
28
|
+
name: 'Ankara'
|
29
|
+
phone_code: 312
|
30
|
+
metropolitan_municipality_since: 1984
|
31
|
+
-
|
32
|
+
plate_number: 7
|
33
|
+
name: 'Antalya'
|
34
|
+
phone_code: 242
|
35
|
+
metropolitan_municipality_since: 1993
|
36
|
+
-
|
37
|
+
plate_number: 8
|
38
|
+
name: 'Artvin'
|
39
|
+
phone_code: 466
|
40
|
+
metropolitan_municipality_since: null
|
41
|
+
-
|
42
|
+
plate_number: 9
|
43
|
+
name: 'Aydın'
|
44
|
+
phone_code: 256
|
45
|
+
metropolitan_municipality_since: 2012
|
46
|
+
-
|
47
|
+
plate_number: 10
|
48
|
+
name: 'Balıkesir'
|
49
|
+
phone_code: 266
|
50
|
+
metropolitan_municipality_since: 2012
|
51
|
+
-
|
52
|
+
plate_number: 11
|
53
|
+
name: 'Bilecik'
|
54
|
+
phone_code: 228
|
55
|
+
metropolitan_municipality_since: null
|
56
|
+
-
|
57
|
+
plate_number: 12
|
58
|
+
name: 'Bingöl'
|
59
|
+
phone_code: 426
|
60
|
+
metropolitan_municipality_since: null
|
61
|
+
-
|
62
|
+
plate_number: 13
|
63
|
+
name: 'Bitlis'
|
64
|
+
phone_code: 434
|
65
|
+
metropolitan_municipality_since: null
|
66
|
+
-
|
67
|
+
plate_number: 14
|
68
|
+
name: 'Bolu'
|
69
|
+
phone_code: 374
|
70
|
+
metropolitan_municipality_since: null
|
71
|
+
-
|
72
|
+
plate_number: 15
|
73
|
+
name: 'Burdur'
|
74
|
+
phone_code: 248
|
75
|
+
metropolitan_municipality_since: null
|
76
|
+
-
|
77
|
+
plate_number: 16
|
78
|
+
name: 'Bursa'
|
79
|
+
phone_code: 224
|
80
|
+
metropolitan_municipality_since: 1987
|
81
|
+
-
|
82
|
+
plate_number: 17
|
83
|
+
name: 'Çanakkale'
|
84
|
+
phone_code: 286
|
85
|
+
metropolitan_municipality_since: null
|
86
|
+
-
|
87
|
+
plate_number: 18
|
88
|
+
name: 'Çankırı'
|
89
|
+
phone_code: 376
|
90
|
+
metropolitan_municipality_since: null
|
91
|
+
-
|
92
|
+
plate_number: 19
|
93
|
+
name: 'Çorum'
|
94
|
+
phone_code: 364
|
95
|
+
metropolitan_municipality_since: null
|
96
|
+
-
|
97
|
+
plate_number: 20
|
98
|
+
name: 'Denizli'
|
99
|
+
phone_code: 258
|
100
|
+
metropolitan_municipality_since: 2012
|
101
|
+
-
|
102
|
+
plate_number: 21
|
103
|
+
name: 'Diyarbakır'
|
104
|
+
phone_code: 412
|
105
|
+
metropolitan_municipality_since: 1993
|
106
|
+
-
|
107
|
+
plate_number: 22
|
108
|
+
name: 'Edirne'
|
109
|
+
phone_code: 284
|
110
|
+
metropolitan_municipality_since: null
|
111
|
+
-
|
112
|
+
plate_number: 23
|
113
|
+
name: 'Elazığ'
|
114
|
+
phone_code: 424
|
115
|
+
metropolitan_municipality_since: null
|
116
|
+
-
|
117
|
+
plate_number: 24
|
118
|
+
name: 'Erzincan'
|
119
|
+
phone_code: 446
|
120
|
+
metropolitan_municipality_since: null
|
121
|
+
-
|
122
|
+
plate_number: 25
|
123
|
+
name: 'Erzurum'
|
124
|
+
phone_code: 442
|
125
|
+
metropolitan_municipality_since: 1993
|
126
|
+
-
|
127
|
+
plate_number: 26
|
128
|
+
name: 'Eskişehir'
|
129
|
+
phone_code: 222
|
130
|
+
metropolitan_municipality_since: 1993
|
131
|
+
-
|
132
|
+
plate_number: 27
|
133
|
+
name: 'Gaziantep'
|
134
|
+
phone_code: 342
|
135
|
+
metropolitan_municipality_since: 1987
|
136
|
+
-
|
137
|
+
plate_number: 28
|
138
|
+
name: 'Giresun'
|
139
|
+
phone_code: 454
|
140
|
+
metropolitan_municipality_since: null
|
141
|
+
-
|
142
|
+
plate_number: 29
|
143
|
+
name: 'Gümüşhane'
|
144
|
+
phone_code: 456
|
145
|
+
metropolitan_municipality_since: null
|
146
|
+
-
|
147
|
+
plate_number: 30
|
148
|
+
name: 'Hakkari'
|
149
|
+
phone_code: 438
|
150
|
+
metropolitan_municipality_since: null
|
151
|
+
-
|
152
|
+
plate_number: 31
|
153
|
+
name: 'Hatay'
|
154
|
+
phone_code: 326
|
155
|
+
metropolitan_municipality_since: 2012
|
156
|
+
-
|
157
|
+
plate_number: 32
|
158
|
+
name: 'Isparta'
|
159
|
+
phone_code: 246
|
160
|
+
metropolitan_municipality_since: null
|
161
|
+
-
|
162
|
+
plate_number: 33
|
163
|
+
name: 'Mersin'
|
164
|
+
phone_code: 324
|
165
|
+
metropolitan_municipality_since: 1993
|
166
|
+
-
|
167
|
+
plate_number: 34
|
168
|
+
name: 'İstanbul'
|
169
|
+
phone_code: [212,216]
|
170
|
+
metropolitan_municipality_since: 1984
|
171
|
+
-
|
172
|
+
plate_number: 35
|
173
|
+
name: 'İzmir'
|
174
|
+
phone_code: 232
|
175
|
+
metropolitan_municipality_since: 1984
|
176
|
+
-
|
177
|
+
plate_number: 36
|
178
|
+
name: 'Kars'
|
179
|
+
phone_code: 474
|
180
|
+
metropolitan_municipality_since: null
|
181
|
+
-
|
182
|
+
plate_number: 37
|
183
|
+
name: 'Kastamonu'
|
184
|
+
phone_code: 366
|
185
|
+
metropolitan_municipality_since: null
|
186
|
+
-
|
187
|
+
plate_number: 38
|
188
|
+
name: 'Kayseri'
|
189
|
+
phone_code: 352
|
190
|
+
metropolitan_municipality_since: 1988
|
191
|
+
-
|
192
|
+
plate_number: 39
|
193
|
+
name: 'Kırklareli'
|
194
|
+
phone_code: 288
|
195
|
+
metropolitan_municipality_since: null
|
196
|
+
-
|
197
|
+
plate_number: 40
|
198
|
+
name: 'Kırşehir'
|
199
|
+
phone_code: 386
|
200
|
+
metropolitan_municipality_since: null
|
201
|
+
-
|
202
|
+
plate_number: 41
|
203
|
+
name: 'Kocaeli'
|
204
|
+
phone_code: 262
|
205
|
+
metropolitan_municipality_since: 1993
|
206
|
+
-
|
207
|
+
plate_number: 42
|
208
|
+
name: 'Konya'
|
209
|
+
phone_code: 332
|
210
|
+
metropolitan_municipality_since: 1987
|
211
|
+
-
|
212
|
+
plate_number: 43
|
213
|
+
name: 'Kütahya'
|
214
|
+
phone_code: 274
|
215
|
+
metropolitan_municipality_since: null
|
216
|
+
-
|
217
|
+
plate_number: 44
|
218
|
+
name: 'Malatya'
|
219
|
+
phone_code: 422
|
220
|
+
metropolitan_municipality_since: 2012
|
221
|
+
-
|
222
|
+
plate_number: 45
|
223
|
+
name: 'Manisa'
|
224
|
+
phone_code: 236
|
225
|
+
metropolitan_municipality_since: 2012
|
226
|
+
-
|
227
|
+
plate_number: 46
|
228
|
+
name: 'Kahramanmaraş'
|
229
|
+
phone_code: 344
|
230
|
+
metropolitan_municipality_since: 2012
|
231
|
+
-
|
232
|
+
plate_number: 47
|
233
|
+
name: 'Mardin'
|
234
|
+
phone_code: 482
|
235
|
+
metropolitan_municipality_since: 2012
|
236
|
+
-
|
237
|
+
plate_number: 48
|
238
|
+
name: 'Muğla'
|
239
|
+
phone_code: 252
|
240
|
+
metropolitan_municipality_since: 2012
|
241
|
+
-
|
242
|
+
plate_number: 49
|
243
|
+
name: 'Muş'
|
244
|
+
phone_code: 436
|
245
|
+
metropolitan_municipality_since: null
|
246
|
+
-
|
247
|
+
plate_number: 50
|
248
|
+
name: 'Nevşehir'
|
249
|
+
phone_code: 384
|
250
|
+
metropolitan_municipality_since: null
|
251
|
+
-
|
252
|
+
plate_number: 51
|
253
|
+
name: 'Niğde'
|
254
|
+
phone_code: 388
|
255
|
+
metropolitan_municipality_since: null
|
256
|
+
-
|
257
|
+
plate_number: 52
|
258
|
+
name: 'Ordu'
|
259
|
+
phone_code: 452
|
260
|
+
metropolitan_municipality_since: 2012
|
261
|
+
-
|
262
|
+
plate_number: 53
|
263
|
+
name: 'Rize'
|
264
|
+
phone_code: 464
|
265
|
+
metropolitan_municipality_since: null
|
266
|
+
-
|
267
|
+
plate_number: 54
|
268
|
+
name: 'Sakarya'
|
269
|
+
phone_code: 264
|
270
|
+
metropolitan_municipality_since: 2000
|
271
|
+
-
|
272
|
+
plate_number: 55
|
273
|
+
name: 'Samsun'
|
274
|
+
phone_code: 362
|
275
|
+
metropolitan_municipality_since: 1993
|
276
|
+
-
|
277
|
+
plate_number: 56
|
278
|
+
name: 'Siirt'
|
279
|
+
phone_code: 484
|
280
|
+
metropolitan_municipality_since: null
|
281
|
+
-
|
282
|
+
plate_number: 57
|
283
|
+
name: 'Sinop'
|
284
|
+
phone_code: 368
|
285
|
+
metropolitan_municipality_since: null
|
286
|
+
-
|
287
|
+
plate_number: 58
|
288
|
+
name: 'Sivas'
|
289
|
+
phone_code: 346
|
290
|
+
metropolitan_municipality_since: null
|
291
|
+
-
|
292
|
+
plate_number: 59
|
293
|
+
name: 'Tekirdağ'
|
294
|
+
phone_code: 282
|
295
|
+
metropolitan_municipality_since: 2012
|
296
|
+
-
|
297
|
+
plate_number: 60
|
298
|
+
name: 'Tokat'
|
299
|
+
phone_code: 356
|
300
|
+
metropolitan_municipality_since: null
|
301
|
+
-
|
302
|
+
plate_number: 61
|
303
|
+
name: 'Trabzon'
|
304
|
+
phone_code: 462
|
305
|
+
metropolitan_municipality_since: 2012
|
306
|
+
-
|
307
|
+
plate_number: 62
|
308
|
+
name: 'Tunceli'
|
309
|
+
phone_code: 428
|
310
|
+
metropolitan_municipality_since: null
|
311
|
+
-
|
312
|
+
plate_number: 63
|
313
|
+
name: 'Şanlıurfa'
|
314
|
+
phone_code: 414
|
315
|
+
metropolitan_municipality_since: 2012
|
316
|
+
-
|
317
|
+
plate_number: 64
|
318
|
+
name: 'Uşak'
|
319
|
+
phone_code: 276
|
320
|
+
metropolitan_municipality_since: null
|
321
|
+
-
|
322
|
+
plate_number: 65
|
323
|
+
name: 'Van'
|
324
|
+
phone_code: 432
|
325
|
+
metropolitan_municipality_since: 2012
|
326
|
+
-
|
327
|
+
plate_number: 66
|
328
|
+
name: 'Yozgat'
|
329
|
+
phone_code: 354
|
330
|
+
metropolitan_municipality_since: null
|
331
|
+
-
|
332
|
+
plate_number: 67
|
333
|
+
name: 'Zonguldak'
|
334
|
+
phone_code: 372
|
335
|
+
metropolitan_municipality_since: null
|
336
|
+
-
|
337
|
+
plate_number: 68
|
338
|
+
name: 'Aksaray'
|
339
|
+
phone_code: 382
|
340
|
+
metropolitan_municipality_since: null
|
341
|
+
-
|
342
|
+
plate_number: 69
|
343
|
+
name: 'Bayburt'
|
344
|
+
phone_code: 458
|
345
|
+
metropolitan_municipality_since: null
|
346
|
+
-
|
347
|
+
plate_number: 70
|
348
|
+
name: 'Karaman'
|
349
|
+
phone_code: 338
|
350
|
+
metropolitan_municipality_since: null
|
351
|
+
-
|
352
|
+
plate_number: 71
|
353
|
+
name: 'Kırıkkale'
|
354
|
+
phone_code: 318
|
355
|
+
metropolitan_municipality_since: null
|
356
|
+
-
|
357
|
+
plate_number: 72
|
358
|
+
name: 'Batman'
|
359
|
+
phone_code: 488
|
360
|
+
metropolitan_municipality_since: null
|
361
|
+
-
|
362
|
+
plate_number: 73
|
363
|
+
name: 'Şırnak'
|
364
|
+
phone_code: 486
|
365
|
+
metropolitan_municipality_since: null
|
366
|
+
-
|
367
|
+
plate_number: 74
|
368
|
+
name: 'Bartın'
|
369
|
+
phone_code: 378
|
370
|
+
metropolitan_municipality_since: null
|
371
|
+
-
|
372
|
+
plate_number: 75
|
373
|
+
name: 'Ardahan'
|
374
|
+
phone_code: 478
|
375
|
+
metropolitan_municipality_since: null
|
376
|
+
-
|
377
|
+
plate_number: 76
|
378
|
+
name: 'Iğdır'
|
379
|
+
phone_code: 476
|
380
|
+
metropolitan_municipality_since: null
|
381
|
+
-
|
382
|
+
plate_number: 77
|
383
|
+
name: 'Yalova'
|
384
|
+
phone_code: 226
|
385
|
+
metropolitan_municipality_since: null
|
386
|
+
-
|
387
|
+
plate_number: 78
|
388
|
+
name: 'Karabük'
|
389
|
+
phone_code: 370
|
390
|
+
metropolitan_municipality_since: null
|
391
|
+
-
|
392
|
+
plate_number: 79
|
393
|
+
name: 'Kilis'
|
394
|
+
phone_code: 348
|
395
|
+
metropolitan_municipality_since: null
|
396
|
+
-
|
397
|
+
plate_number: 80
|
398
|
+
name: 'Osmaniye'
|
399
|
+
phone_code: 328
|
400
|
+
metropolitan_municipality_since: null
|
401
|
+
-
|
402
|
+
plate_number: 81
|
403
|
+
name: 'Düzce'
|
404
|
+
phone_code: 380
|
405
|
+
metropolitan_municipality_since: null
|
data/lib/turkish_cities.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'turkish_cities/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'turkish_cities'
|
7
|
+
s.version = TurkishCities::VERSION
|
8
|
+
s.required_ruby_version = '>= 2.5.1'
|
9
|
+
s.authors = ['Semih Arslanoglu']
|
10
|
+
s.email = 'arslanoglusemih93@gmail.com'
|
11
|
+
|
12
|
+
s.date = '2020-04-13'
|
13
|
+
s.summary = 'List and find Turkish cities'
|
14
|
+
s.description = 'Simple ruby gem for listing and finding Turkish cities via name, plate number or size'
|
15
|
+
s.homepage = 'https://github.com/sarslanoglu/turkish_cities'
|
16
|
+
s.license = 'MIT'
|
17
|
+
|
18
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
20
|
+
s.require_paths = ['lib']
|
21
|
+
|
22
|
+
s.add_dependency 'i18n', ['>= 0.6.4', '<= 2']
|
23
|
+
|
24
|
+
s.add_development_dependency 'bundler', '~> 2.1.4'
|
25
|
+
s.add_development_dependency 'coveralls', '~> 0.8.23'
|
26
|
+
s.add_development_dependency 'rspec', '~> 3.9.0'
|
27
|
+
s.add_development_dependency 'rubocop', '~> 0.80.1'
|
28
|
+
|
29
|
+
if s.respond_to?(:metadata)
|
30
|
+
s.metadata['changelog_uri'] = 'https://github.com/sarslanoglu/turkish_cities/blob/master/CHANGELOG.md'
|
31
|
+
s.metadata['source_code_uri'] = 'https://github.com/sarslanoglu/turkish_cities'
|
32
|
+
s.metadata['bug_tracker_uri'] = 'https://github.com/sarslanoglu/turkish_cities/issues'
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,28 +1,121 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turkish_cities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Semih Arslanoglu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
12
|
-
dependencies:
|
13
|
-
|
11
|
+
date: 2020-04-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: i18n
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.4
|
20
|
+
- - "<="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.6.4
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 2.1.4
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.1.4
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: coveralls
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.8.23
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.8.23
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 3.9.0
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 3.9.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rubocop
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 0.80.1
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.80.1
|
89
|
+
description: Simple ruby gem for listing and finding Turkish cities via name, plate
|
90
|
+
number or size
|
14
91
|
email: arslanoglusemih93@gmail.com
|
15
92
|
executables: []
|
16
93
|
extensions: []
|
17
94
|
extra_rdoc_files: []
|
18
95
|
files:
|
96
|
+
- ".gitignore"
|
97
|
+
- ".hound.yml"
|
98
|
+
- ".rspec"
|
99
|
+
- ".rubocop.yml"
|
100
|
+
- ".travis.yml"
|
101
|
+
- CHANGELOG.md
|
102
|
+
- CODE_OF_CONDUCT.md
|
103
|
+
- Gemfile
|
104
|
+
- Gemfile.lock
|
105
|
+
- LICENSE.txt
|
106
|
+
- README.md
|
19
107
|
- lib/turkish_cities.rb
|
20
108
|
- lib/turkish_cities/city.rb
|
21
|
-
- lib/turkish_cities/data/
|
109
|
+
- lib/turkish_cities/data/cities.yaml
|
110
|
+
- lib/turkish_cities/version.rb
|
111
|
+
- turkish_cities.gemspec
|
22
112
|
homepage: https://github.com/sarslanoglu/turkish_cities
|
23
113
|
licenses:
|
24
114
|
- MIT
|
25
|
-
metadata:
|
115
|
+
metadata:
|
116
|
+
changelog_uri: https://github.com/sarslanoglu/turkish_cities/blob/master/CHANGELOG.md
|
117
|
+
source_code_uri: https://github.com/sarslanoglu/turkish_cities
|
118
|
+
bug_tracker_uri: https://github.com/sarslanoglu/turkish_cities/issues
|
26
119
|
post_install_message:
|
27
120
|
rdoc_options: []
|
28
121
|
require_paths:
|
@@ -31,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
31
124
|
requirements:
|
32
125
|
- - ">="
|
33
126
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
127
|
+
version: 2.5.1
|
35
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
129
|
requirements:
|
37
130
|
- - ">="
|
@@ -41,5 +134,5 @@ requirements: []
|
|
41
134
|
rubygems_version: 3.1.2
|
42
135
|
signing_key:
|
43
136
|
specification_version: 4
|
44
|
-
summary:
|
137
|
+
summary: List and find Turkish cities
|
45
138
|
test_files: []
|
@@ -1,247 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
CITY_LIST = {
|
4
|
-
1 => { name: 'Adana',
|
5
|
-
phone_code: 322,
|
6
|
-
metropolitan_municipality_since: 1986 },
|
7
|
-
2 => { name: 'Adıyaman',
|
8
|
-
phone_code: 416,
|
9
|
-
metropolitan_municipality_since: nil },
|
10
|
-
3 => { name: 'Afyon',
|
11
|
-
phone_code: 272,
|
12
|
-
metropolitan_municipality_since: nil },
|
13
|
-
4 => { name: 'Ağrı',
|
14
|
-
phone_code: 472,
|
15
|
-
metropolitan_municipality_since: nil },
|
16
|
-
5 => { name: 'Amasya',
|
17
|
-
phone_code: 358,
|
18
|
-
metropolitan_municipality_since: nil },
|
19
|
-
6 => { name: 'Ankara',
|
20
|
-
phone_code: 312,
|
21
|
-
metropolitan_municipality_since: 1984 },
|
22
|
-
7 => { name: 'Antalya',
|
23
|
-
phone_code: 242,
|
24
|
-
metropolitan_municipality_since: 1993 },
|
25
|
-
8 => { name: 'Artvin',
|
26
|
-
phone_code: 466,
|
27
|
-
metropolitan_municipality_since: nil },
|
28
|
-
9 => { name: 'Aydın',
|
29
|
-
phone_code: 256,
|
30
|
-
metropolitan_municipality_since: 2012 },
|
31
|
-
10 => { name: 'Balıkesir',
|
32
|
-
phone_code: 266,
|
33
|
-
metropolitan_municipality_since: 2012 },
|
34
|
-
11 => { name: 'Bilecik',
|
35
|
-
phone_code: 228,
|
36
|
-
metropolitan_municipality_since: nil },
|
37
|
-
12 => { name: 'Bingöl',
|
38
|
-
phone_code: 426,
|
39
|
-
metropolitan_municipality_since: nil },
|
40
|
-
13 => { name: 'Bitlis',
|
41
|
-
phone_code: 434,
|
42
|
-
metropolitan_municipality_since: nil },
|
43
|
-
14 => { name: 'Bolu',
|
44
|
-
phone_code: 374,
|
45
|
-
metropolitan_municipality_since: nil },
|
46
|
-
15 => { name: 'Burdur',
|
47
|
-
phone_code: 248,
|
48
|
-
metropolitan_municipality_since: nil },
|
49
|
-
16 => { name: 'Bursa',
|
50
|
-
phone_code: 224,
|
51
|
-
metropolitan_municipality_since: 1987 },
|
52
|
-
17 => { name: 'Çanakkale',
|
53
|
-
phone_code: 286,
|
54
|
-
metropolitan_municipality_since: nil },
|
55
|
-
18 => { name: 'Çankırı',
|
56
|
-
phone_code: 376,
|
57
|
-
metropolitan_municipality_since: nil },
|
58
|
-
19 => { name: 'Çorum',
|
59
|
-
phone_code: 364,
|
60
|
-
metropolitan_municipality_since: nil },
|
61
|
-
20 => { name: 'Denizli',
|
62
|
-
phone_code: 258,
|
63
|
-
metropolitan_municipality_since: 2012 },
|
64
|
-
21 => { name: 'Diyarbakır',
|
65
|
-
phone_code: 412,
|
66
|
-
metropolitan_municipality_since: 1993 },
|
67
|
-
22 => { name: 'Edirne',
|
68
|
-
phone_code: 284,
|
69
|
-
metropolitan_municipality_since: nil },
|
70
|
-
23 => { name: 'Elazığ',
|
71
|
-
phone_code: 424,
|
72
|
-
metropolitan_municipality_since: nil },
|
73
|
-
24 => { name: 'Erzincan',
|
74
|
-
phone_code: 446,
|
75
|
-
metropolitan_municipality_since: nil },
|
76
|
-
25 => { name: 'Erzurum',
|
77
|
-
phone_code: 442,
|
78
|
-
metropolitan_municipality_since: 1993 },
|
79
|
-
26 => { name: 'Eskişehir',
|
80
|
-
phone_code: 222,
|
81
|
-
metropolitan_municipality_since: 1993 },
|
82
|
-
27 => { name: 'Gaziantep',
|
83
|
-
phone_code: 342,
|
84
|
-
metropolitan_municipality_since: 1987 },
|
85
|
-
28 => { name: 'Giresun',
|
86
|
-
phone_code: 454,
|
87
|
-
metropolitan_municipality_since: nil },
|
88
|
-
29 => { name: 'Gümüşhane',
|
89
|
-
phone_code: 456,
|
90
|
-
metropolitan_municipality_since: nil },
|
91
|
-
30 => { name: 'Hakkari',
|
92
|
-
phone_code: 438,
|
93
|
-
metropolitan_municipality_since: nil },
|
94
|
-
31 => { name: 'Hatay',
|
95
|
-
phone_code: 326,
|
96
|
-
metropolitan_municipality_since: 2012 },
|
97
|
-
32 => { name: 'Isparta',
|
98
|
-
phone_code: 246,
|
99
|
-
metropolitan_municipality_since: nil },
|
100
|
-
33 => { name: 'Mersin',
|
101
|
-
phone_code: 324,
|
102
|
-
metropolitan_municipality_since: 1993 },
|
103
|
-
34 => { name: 'İstanbul',
|
104
|
-
phone_code: [212, 216],
|
105
|
-
metropolitan_municipality_since: 1984 },
|
106
|
-
35 => { name: 'İzmir',
|
107
|
-
phone_code: 232,
|
108
|
-
metropolitan_municipality_since: 1984 },
|
109
|
-
36 => { name: 'Kars',
|
110
|
-
phone_code: 474,
|
111
|
-
metropolitan_municipality_since: nil },
|
112
|
-
37 => { name: 'Kastamonu',
|
113
|
-
phone_code: 366,
|
114
|
-
metropolitan_municipality_since: nil },
|
115
|
-
38 => { name: 'Kayseri',
|
116
|
-
phone_code: 352,
|
117
|
-
metropolitan_municipality_since: 1988 },
|
118
|
-
39 => { name: 'Kırklareli',
|
119
|
-
phone_code: 288,
|
120
|
-
metropolitan_municipality_since: nil },
|
121
|
-
40 => { name: 'Kırşehir',
|
122
|
-
phone_code: 386,
|
123
|
-
metropolitan_municipality_since: nil },
|
124
|
-
41 => { name: 'Kocaeli',
|
125
|
-
phone_code: 262,
|
126
|
-
metropolitan_municipality_since: 1993 },
|
127
|
-
42 => { name: 'Konya',
|
128
|
-
phone_code: 332,
|
129
|
-
metropolitan_municipality_since: 1987 },
|
130
|
-
43 => { name: 'Kütahya',
|
131
|
-
phone_code: 274,
|
132
|
-
metropolitan_municipality_since: nil },
|
133
|
-
44 => { name: 'Malatya',
|
134
|
-
phone_code: 422,
|
135
|
-
metropolitan_municipality_since: 2012 },
|
136
|
-
45 => { name: 'Manisa',
|
137
|
-
phone_code: 236,
|
138
|
-
metropolitan_municipality_since: 2012 },
|
139
|
-
46 => { name: 'Kahramanmaraş',
|
140
|
-
phone_code: 344,
|
141
|
-
metropolitan_municipality_since: 2012 },
|
142
|
-
47 => { name: 'Mardin',
|
143
|
-
phone_code: 482,
|
144
|
-
metropolitan_municipality_since: 2012 },
|
145
|
-
48 => { name: 'Muğla',
|
146
|
-
phone_code: 252,
|
147
|
-
metropolitan_municipality_since: 2012 },
|
148
|
-
49 => { name: 'Muş',
|
149
|
-
phone_code: 436,
|
150
|
-
metropolitan_municipality_since: nil },
|
151
|
-
50 => { name: 'Nevşehir',
|
152
|
-
phone_code: 384,
|
153
|
-
metropolitan_municipality_since: nil },
|
154
|
-
51 => { name: 'Niğde',
|
155
|
-
phone_code: 388,
|
156
|
-
metropolitan_municipality_since: nil },
|
157
|
-
52 => { name: 'Ordu',
|
158
|
-
phone_code: 452,
|
159
|
-
metropolitan_municipality_since: 2012 },
|
160
|
-
53 => { name: 'Rize',
|
161
|
-
phone_code: 464,
|
162
|
-
metropolitan_municipality_since: nil },
|
163
|
-
54 => { name: 'Sakarya',
|
164
|
-
phone_code: 264,
|
165
|
-
metropolitan_municipality_since: 2000 },
|
166
|
-
55 => { name: 'Samsun',
|
167
|
-
phone_code: 362,
|
168
|
-
metropolitan_municipality_since: 1993 },
|
169
|
-
56 => { name: 'Siirt',
|
170
|
-
phone_code: 484,
|
171
|
-
metropolitan_municipality_since: nil },
|
172
|
-
57 => { name: 'Sinop',
|
173
|
-
phone_code: 368,
|
174
|
-
metropolitan_municipality_since: nil },
|
175
|
-
58 => { name: 'Sivas',
|
176
|
-
phone_code: 346,
|
177
|
-
metropolitan_municipality_since: nil },
|
178
|
-
59 => { name: 'Tekirdağ',
|
179
|
-
phone_code: 282,
|
180
|
-
metropolitan_municipality_since: 2012 },
|
181
|
-
60 => { name: 'Tokat',
|
182
|
-
phone_code: 356,
|
183
|
-
metropolitan_municipality_since: nil },
|
184
|
-
61 => { name: 'Trabzon',
|
185
|
-
phone_code: 462,
|
186
|
-
metropolitan_municipality_since: 2012 },
|
187
|
-
62 => { name: 'Tunceli',
|
188
|
-
phone_code: 428,
|
189
|
-
metropolitan_municipality_since: nil },
|
190
|
-
63 => { name: 'Şanlıurfa',
|
191
|
-
phone_code: 414,
|
192
|
-
metropolitan_municipality_since: 2012 },
|
193
|
-
64 => { name: 'Uşak',
|
194
|
-
phone_code: 276,
|
195
|
-
metropolitan_municipality_since: nil },
|
196
|
-
65 => { name: 'Van',
|
197
|
-
phone_code: 432,
|
198
|
-
metropolitan_municipality_since: 2012 },
|
199
|
-
66 => { name: 'Yozgat',
|
200
|
-
phone_code: 354,
|
201
|
-
metropolitan_municipality_since: nil },
|
202
|
-
67 => { name: 'Zonguldak',
|
203
|
-
phone_code: 372,
|
204
|
-
metropolitan_municipality_since: nil },
|
205
|
-
68 => { name: 'Aksaray',
|
206
|
-
phone_code: 382,
|
207
|
-
metropolitan_municipality_since: nil },
|
208
|
-
69 => { name: 'Bayburt',
|
209
|
-
phone_code: 458,
|
210
|
-
metropolitan_municipality_since: nil },
|
211
|
-
70 => { name: 'Karaman',
|
212
|
-
phone_code: 338,
|
213
|
-
metropolitan_municipality_since: nil },
|
214
|
-
71 => { name: 'Kırıkkale',
|
215
|
-
phone_code: 318,
|
216
|
-
metropolitan_municipality_since: nil },
|
217
|
-
72 => { name: 'Batman',
|
218
|
-
phone_code: 488,
|
219
|
-
metropolitan_municipality_since: nil },
|
220
|
-
73 => { name: 'Şırnak',
|
221
|
-
phone_code: 486,
|
222
|
-
metropolitan_municipality_since: nil },
|
223
|
-
74 => { name: 'Bartın',
|
224
|
-
phone_code: 378,
|
225
|
-
metropolitan_municipality_since: nil },
|
226
|
-
75 => { name: 'Ardahan',
|
227
|
-
phone_code: 478,
|
228
|
-
metropolitan_municipality_since: nil },
|
229
|
-
76 => { name: 'Iğdır',
|
230
|
-
phone_code: 476,
|
231
|
-
metropolitan_municipality_since: nil },
|
232
|
-
77 => { name: 'Yalova',
|
233
|
-
phone_code: 226,
|
234
|
-
metropolitan_municipality_since: nil },
|
235
|
-
78 => { name: 'Karabük',
|
236
|
-
phone_code: 370,
|
237
|
-
metropolitan_municipality_since: nil },
|
238
|
-
79 => { name: 'Kilis',
|
239
|
-
phone_code: 348,
|
240
|
-
metropolitan_municipality_since: nil },
|
241
|
-
80 => { name: 'Osmaniye',
|
242
|
-
phone_code: 328,
|
243
|
-
metropolitan_municipality_since: nil },
|
244
|
-
81 => { name: 'Düzce',
|
245
|
-
phone_code: 380,
|
246
|
-
metropolitan_municipality_since: nil }
|
247
|
-
}.freeze
|