turkish_cities 0.1.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +5 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +22 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. data/.github/pull_request_template.md +38 -0
  6. data/.gitignore +2 -0
  7. data/.hound.yml +3 -0
  8. data/.rspec +1 -0
  9. data/.rubocop.yml +16 -0
  10. data/.travis.yml +21 -0
  11. data/CHANGELOG.md +73 -0
  12. data/CODE_OF_CONDUCT.md +76 -0
  13. data/CONTRIBUTING.md +38 -0
  14. data/Gemfile +3 -0
  15. data/Gemfile.lock +78 -0
  16. data/LICENSE.txt +7 -0
  17. data/README.md +338 -0
  18. data/lib/turkish_cities.rb +34 -2
  19. data/lib/turkish_cities/city.rb +58 -20
  20. data/lib/turkish_cities/data/cities.yaml +861 -0
  21. data/lib/turkish_cities/data/districts/adana.yaml +1043 -0
  22. data/lib/turkish_cities/data/districts/adiyaman.yaml +1243 -0
  23. data/lib/turkish_cities/data/districts/afyon.yaml +1253 -0
  24. data/lib/turkish_cities/data/districts/agri.yaml +1038 -0
  25. data/lib/turkish_cities/data/districts/aksaray.yaml +491 -0
  26. data/lib/turkish_cities/data/districts/amasya.yaml +753 -0
  27. data/lib/turkish_cities/data/districts/ankara.yaml +1712 -0
  28. data/lib/turkish_cities/data/districts/antalya.yaml +1114 -0
  29. data/lib/turkish_cities/data/districts/ardahan.yaml +396 -0
  30. data/lib/turkish_cities/data/districts/artvin.yaml +1956 -0
  31. data/lib/turkish_cities/data/districts/aydin.yaml +761 -0
  32. data/lib/turkish_cities/data/districts/balikesir.yaml +1338 -0
  33. data/lib/turkish_cities/data/districts/bartin.yaml +1065 -0
  34. data/lib/turkish_cities/data/districts/batman.yaml +790 -0
  35. data/lib/turkish_cities/data/districts/bayburt.yaml +263 -0
  36. data/lib/turkish_cities/data/districts/bilecik.yaml +425 -0
  37. data/lib/turkish_cities/data/districts/bingol.yaml +1159 -0
  38. data/lib/turkish_cities/data/districts/bitlis.yaml +818 -0
  39. data/lib/turkish_cities/data/districts/bolu.yaml +1730 -0
  40. data/lib/turkish_cities/data/districts/burdur.yaml +592 -0
  41. data/lib/turkish_cities/data/districts/bursa.yaml +1266 -0
  42. data/lib/turkish_cities/data/districts/canakkale.yaml +1035 -0
  43. data/lib/turkish_cities/data/districts/cankiri.yaml +719 -0
  44. data/lib/turkish_cities/data/districts/corum.yaml +1576 -0
  45. data/lib/turkish_cities/data/districts/denizli.yaml +724 -0
  46. data/lib/turkish_cities/data/districts/diyarbakir.yaml +1132 -0
  47. data/lib/turkish_cities/data/districts/duzce.yaml +756 -0
  48. data/lib/turkish_cities/data/districts/edirne.yaml +457 -0
  49. data/lib/turkish_cities/data/districts/elazig.yaml +1560 -0
  50. data/lib/turkish_cities/data/districts/erzincan.yaml +1086 -0
  51. data/lib/turkish_cities/data/districts/erzurum.yaml +1278 -0
  52. data/lib/turkish_cities/data/districts/eskisehir.yaml +673 -0
  53. data/lib/turkish_cities/data/districts/gaziantep.yaml +872 -0
  54. data/lib/turkish_cities/data/districts/giresun.yaml +2753 -0
  55. data/lib/turkish_cities/data/districts/gumushane.yaml +1185 -0
  56. data/lib/turkish_cities/data/districts/hakkari.yaml +478 -0
  57. data/lib/turkish_cities/data/districts/hatay.yaml +680 -0
  58. data/lib/turkish_cities/data/districts/igdir.yaml +272 -0
  59. data/lib/turkish_cities/data/districts/isparta.yaml +676 -0
  60. data/lib/turkish_cities/data/districts/istanbul.yaml +1812 -0
  61. data/lib/turkish_cities/data/districts/izmir.yaml +1657 -0
  62. data/lib/turkish_cities/data/districts/kahramanmaras.yaml +776 -0
  63. data/lib/turkish_cities/data/districts/karabuk.yaml +1171 -0
  64. data/lib/turkish_cities/data/districts/karaman.yaml +477 -0
  65. data/lib/turkish_cities/data/districts/kars.yaml +572 -0
  66. data/lib/turkish_cities/data/districts/kastamonu.yaml +4485 -0
  67. data/lib/turkish_cities/data/districts/kayseri.yaml +852 -0
  68. data/lib/turkish_cities/data/districts/kilis.yaml +328 -0
  69. data/lib/turkish_cities/data/districts/kirikkale.yaml +423 -0
  70. data/lib/turkish_cities/data/districts/kirklareli.yaml +384 -0
  71. data/lib/turkish_cities/data/districts/kirsehir.yaml +475 -0
  72. data/lib/turkish_cities/data/districts/kocaeli.yaml +597 -0
  73. data/lib/turkish_cities/data/districts/konya.yaml +1418 -0
  74. data/lib/turkish_cities/data/districts/kutahya.yaml +1042 -0
  75. data/lib/turkish_cities/data/districts/malatya.yaml +828 -0
  76. data/lib/turkish_cities/data/districts/manisa.yaml +1318 -0
  77. data/lib/turkish_cities/data/districts/mardin.yaml +762 -0
  78. data/lib/turkish_cities/data/districts/mersin.yaml +1013 -0
  79. data/lib/turkish_cities/data/districts/mugla.yaml +622 -0
  80. data/lib/turkish_cities/data/districts/mus.yaml +749 -0
  81. data/lib/turkish_cities/data/districts/nevsehir.yaml +481 -0
  82. data/lib/turkish_cities/data/districts/nigde.yaml +437 -0
  83. data/lib/turkish_cities/data/districts/ordu.yaml +857 -0
  84. data/lib/turkish_cities/data/districts/osmaniye.yaml +655 -0
  85. data/lib/turkish_cities/data/districts/rize.yaml +1447 -0
  86. data/lib/turkish_cities/data/districts/sakarya.yaml +744 -0
  87. data/lib/turkish_cities/data/districts/samsun.yaml +1363 -0
  88. data/lib/turkish_cities/data/districts/sanliurfa.yaml +1505 -0
  89. data/lib/turkish_cities/data/districts/siirt.yaml +579 -0
  90. data/lib/turkish_cities/data/districts/sinop.yaml +2061 -0
  91. data/lib/turkish_cities/data/districts/sirnak.yaml +404 -0
  92. data/lib/turkish_cities/data/districts/sivas.yaml +2476 -0
  93. data/lib/turkish_cities/data/districts/tekirdag.yaml +436 -0
  94. data/lib/turkish_cities/data/districts/tokat.yaml +1553 -0
  95. data/lib/turkish_cities/data/districts/trabzon.yaml +794 -0
  96. data/lib/turkish_cities/data/districts/tunceli.yaml +1074 -0
  97. data/lib/turkish_cities/data/districts/usak.yaml +735 -0
  98. data/lib/turkish_cities/data/districts/van.yaml +754 -0
  99. data/lib/turkish_cities/data/districts/yalova.yaml +151 -0
  100. data/lib/turkish_cities/data/districts/yozgat.yaml +939 -0
  101. data/lib/turkish_cities/data/districts/zonguldak.yaml +1599 -0
  102. data/lib/turkish_cities/data/neighborhoods_parser.rb +52 -0
  103. data/lib/turkish_cities/distance.rb +104 -0
  104. data/lib/turkish_cities/district.rb +53 -0
  105. data/lib/turkish_cities/helpers/decomposer_helper.rb +104 -0
  106. data/lib/turkish_cities/postcode.rb +25 -0
  107. data/lib/turkish_cities/version.rb +5 -0
  108. data/public/assets/img/TurkishCities_darkblue-on-yellow_800X800@3x-8.png +0 -0
  109. data/public/assets/img/TurkishCities_darkblue-on-yellow_914X343@3x-8.png +0 -0
  110. data/public/assets/img/TurkishCities_darkblue-on-yellow_horizontal_914X343@3x-8.png +0 -0
  111. data/public/assets/img/TurkishCities_yellow-on-darkblue_800X800@3x-8.png +0 -0
  112. data/public/assets/img/TurkishCities_yellow-on-darkblue_914X343@3x-8.png +0 -0
  113. data/public/assets/img/TurkishCities_yellow-on-darkblue_horizontal_914X343@3x-8.png +0 -0
  114. data/turkish_cities.gemspec +34 -0
  115. metadata +202 -11
  116. data/lib/turkish_cities/data/city_list.rb +0 -247
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'csv'
4
+ require 'yaml'
5
+
6
+ require_relative '../helpers/decomposer_helper'
7
+
8
+ module NeighborhoodsParser
9
+ include DecomposerHelper
10
+
11
+ district_hash = Hash.new { |h, k| h[k] = Hash.new(&h.default_proc) }
12
+ mahalle_array = []
13
+ last_city = 'Adana'
14
+ last_district = ''
15
+ last_subdistrict = ''
16
+ last_postcode = 1720
17
+
18
+ # rubocop:disable Metrics/BlockLength
19
+ CSV.parse(File.read('ptt_list.csv'), headers: true).each do |row|
20
+ data_array = row['il;ilçe;semt_bucak_belde;Mahalle;PK'].split(';')
21
+
22
+ if data_array[0].downcase(:turkic).strip.capitalize(:turkic) != last_city ||
23
+ data_array[4].to_i != last_postcode
24
+ district_hash[last_district][last_subdistrict]['postcode'] = last_postcode
25
+ district_hash[last_district][last_subdistrict]['neighborhoods'] = mahalle_array
26
+ mahalle_array = []
27
+ if data_array[0].downcase(:turkic).strip.capitalize(:turkic) != last_city
28
+ file_name = create_file_path(last_city)
29
+ File.write("#{file_name}.yaml", district_hash.to_yaml)
30
+ district_hash = Hash.new { |h, k| h[k] = Hash.new(&h.default_proc) }
31
+ end
32
+ end
33
+
34
+ mahalle = []
35
+ data_array[3].downcase(:turkic).strip.split(' ').each do |word|
36
+ if word[0] == '('
37
+ word[1] = word[1].capitalize!(:turkic) unless word[1].to_i.to_s == word[1]
38
+ else
39
+ word.capitalize!(:turkic)
40
+ end
41
+ mahalle << word
42
+ end
43
+
44
+ mahalle_array << mahalle.join(' ')
45
+
46
+ last_city = data_array[0].downcase(:turkic).strip.capitalize(:turkic)
47
+ last_district = data_array[1].downcase(:turkic).strip.capitalize(:turkic)
48
+ last_subdistrict = data_array[2].downcase(:turkic).strip.capitalize(:turkic)
49
+ last_postcode = data_array[4].to_i
50
+ end
51
+ # rubocop:enable Metrics/BlockLength
52
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'i18n'
4
+ require 'yaml'
5
+
6
+ require_relative '../turkish_cities/helpers/decomposer_helper'
7
+
8
+ class Distance
9
+ include DecomposerHelper
10
+
11
+ file_path = File.join(File.dirname(__FILE__), 'data/cities.yaml')
12
+ CITY_LIST = YAML.load_file(file_path)
13
+ RADIUS_OF_EARTH = 6371 # Earth radius in km is 6371
14
+
15
+ def initialize(from, to, travel_method)
16
+ @from = from
17
+ @to = to
18
+ @travel_method = travel_method
19
+ end
20
+
21
+ def distance_between
22
+ case @travel_method
23
+ when 'land'
24
+ distance_between_land
25
+ when 'sea'
26
+ distance_between_sea
27
+ when 'air'
28
+ distance_between_air
29
+ else
30
+ unsupported_travel_method(@travel_method)
31
+ end
32
+ end
33
+
34
+ private
35
+
36
+ def distance_between_land
37
+ # TODO
38
+ end
39
+
40
+ def distance_between_sea
41
+ # TODO
42
+ end
43
+
44
+ def distance_between_air
45
+ city_array = find_city_attributes
46
+ case city_array
47
+ when String
48
+ city_array
49
+ when Array
50
+ results = []
51
+ results[0] = calculate_flight_distance(city_array).round(2)
52
+ results[1] = distance_time_estimation(results[0]).to_i
53
+ results[2] = description_text('Air', city_array, results)
54
+ results
55
+ end
56
+ end
57
+
58
+ def find_city_attributes
59
+ from_city = to_city = nil
60
+
61
+ CITY_LIST.each do |city|
62
+ from_city = city if convert_chars(@from) == convert_chars(city['name'])
63
+ to_city = city if convert_chars(@to) == convert_chars(city['name'])
64
+ end
65
+
66
+ from_city.nil? || to_city.nil? ? cities_not_found_error(@from, @to) : [from_city, to_city]
67
+ end
68
+
69
+ def degree_to_radian(degree)
70
+ degree * Math::PI / 180
71
+ end
72
+
73
+ # rubocop:disable Metrics/AbcSize
74
+ def calculate_flight_distance(city_array)
75
+ lat_diff = degree_to_radian(city_array[1]['latitude'] - city_array[0]['latitude'])
76
+ lng_diff = degree_to_radian(city_array[1]['longitude'] - city_array[0]['longitude'])
77
+
78
+ from_lat = degree_to_radian(city_array[0]['latitude'])
79
+ to_lat = degree_to_radian(city_array[1]['latitude'])
80
+
81
+ cosines_var = (Math.sin(lat_diff / 2)**2) + ((Math.sin(lng_diff / 2)**2) * (Math.cos(from_lat) * Math.cos(to_lat)))
82
+ result = 2 * Math.atan2(Math.sqrt(cosines_var), Math.sqrt(1 - cosines_var))
83
+ RADIUS_OF_EARTH * result
84
+ end
85
+ # rubocop:enable Metrics/AbcSize
86
+
87
+ # Time estimation for air travel. For planes take-off and landing took nearly same amount.
88
+ # Longer the distance shorter the time. Flying out at high altitude makes less air resistance / more speed
89
+ def distance_time_estimation(air_distance)
90
+ case air_distance
91
+ when 0..400
92
+ (air_distance / 10) + 30
93
+ when 400..1000
94
+ (air_distance / 11.25) + 30
95
+ else
96
+ (air_distance / 12.5) + 25
97
+ end
98
+ end
99
+
100
+ def description_text(travel_method, city_array, result_set)
101
+ "#{travel_method} travel distance between #{city_array[0]['name']} and #{city_array[1]['name']} is " \
102
+ "#{result_set[0]} km. Estimated air travel would take #{result_set[1]} minutes."
103
+ end
104
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'i18n'
4
+ require 'yaml'
5
+
6
+ require_relative '../turkish_cities/helpers/decomposer_helper'
7
+
8
+ class District
9
+ include DecomposerHelper
10
+
11
+ def initialize(city_name, district_name)
12
+ @city_name = city_name
13
+ @district_name = district_name
14
+ @district_list = create_district_list(city_name)
15
+ end
16
+
17
+ def subdistricts
18
+ return district_not_found_error(@district_name, @city_name) if district_item.nil?
19
+
20
+ sort_alphabetically(district_item.keys)
21
+ end
22
+
23
+ def neighborhoods(subdistrict_name)
24
+ return district_not_found_error(@district_name, @city_name) if district_item.nil?
25
+
26
+ neighborhoods = create_neighborhoods(subdistrict_name)
27
+ neighborhoods.is_a?(Array) ? sort_alphabetically(neighborhoods) : neighborhoods
28
+ end
29
+
30
+ private
31
+
32
+ def create_neighborhoods(subdistrict_name)
33
+ return create_neighborhoods_without_subdistrict_name if subdistrict_name.nil?
34
+
35
+ if district_item[subdistrict_name].nil?
36
+ return subdistrict_not_found_error(subdistrict_name, @district_name, @city_name)
37
+ end
38
+
39
+ create_neighborhoods_with_subdistrict_name(subdistrict_name)
40
+ end
41
+
42
+ def create_neighborhoods_without_subdistrict_name
43
+ district_item.values.map { |subdistrict| subdistrict['neighborhoods'] }.flatten
44
+ end
45
+
46
+ def create_neighborhoods_with_subdistrict_name(subdistrict_name)
47
+ district_item[subdistrict_name]['neighborhoods']
48
+ end
49
+
50
+ def district_item
51
+ @district_list[@district_name]
52
+ end
53
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DecomposerHelper
4
+ def check_input_range(input, min, max)
5
+ return if input.to_i.between?(min, max)
6
+
7
+ raise RangeError, "Given value [#{input}] is outside bounds of #{min} to #{max}."
8
+ end
9
+
10
+ def city_not_found_error(input)
11
+ "Couldn't find city name with '#{input}'"
12
+ end
13
+
14
+ def cities_not_found_error(first, second)
15
+ "Couldn't find cities combination with '#{first}/#{second}'"
16
+ end
17
+
18
+ def convert_chars(string)
19
+ I18n.transliterate(string.downcase(:turkic))
20
+ end
21
+
22
+ def create_district_list(city_name)
23
+ file_name = create_file_path(city_name)
24
+ file_path = File.join(File.dirname(__FILE__), "../data/districts/#{file_name}.yaml")
25
+ begin
26
+ YAML.load_file(file_path)
27
+ rescue Errno::ENOENT => e
28
+ "Caught the exception: #{e}"
29
+ end
30
+ end
31
+
32
+ def create_file_path(city_name)
33
+ char_fallbacks = { 'ç' => 'c', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u' }
34
+ city_name.downcase(:turkic).encode('ASCII', 'UTF-8', fallback: char_fallbacks)
35
+ end
36
+
37
+ def district_not_found_error(district_input, city_input)
38
+ "Couldn't find district name with '#{district_input}' of '#{city_input}'"
39
+ end
40
+
41
+ def postcode_not_found_error(postcode_input)
42
+ "Couldn't find any subdistrict with postcode '#{postcode_input}'"
43
+ end
44
+
45
+ def prepare_city_list(city_list, options)
46
+ if options[:with]
47
+ city_list.map do |city|
48
+ result = {}
49
+ result[:name] = city['name']
50
+
51
+ add_plate_number_if_requested(result, city, options)
52
+ add_phone_code_if_requested(result, city, options)
53
+ add_metropolitan_municipality_if_requested(result, city, options)
54
+
55
+ result[:region] = city['region'] if options.dig(:with, :region) || options.dig(:with, :all)
56
+ result
57
+ end
58
+ else
59
+ city_list.map do |city|
60
+ city['name']
61
+ end
62
+ end
63
+ end
64
+
65
+ def sort_alphabetically(list, options = nil)
66
+ turkish_alphabet = ' -0123456789abcçdefgğhıijklmnoöprsştuüvyz'
67
+ list.sort_by do |item|
68
+ item_to_sort = if options.nil? || options[:with].nil?
69
+ item
70
+ else
71
+ item[:name]
72
+ end
73
+ item_to_sort.downcase(:turkic).chars.map { |char| turkish_alphabet.index(char) }
74
+ end
75
+ end
76
+
77
+ def subdistrict_not_found_error(subdistrict_input, district_input, city_input)
78
+ "Couldn't find subdistrict with '#{subdistrict_input}' of '#{district_input}'/'#{city_input}'"
79
+ end
80
+
81
+ private
82
+
83
+ def add_plate_number_if_requested(result, city, options = nil)
84
+ return unless options.dig(:with, :plate_number) || options.dig(:with, :all)
85
+
86
+ result[:plate_number] = city['plate_number']
87
+ end
88
+
89
+ def add_phone_code_if_requested(result, city, options = nil)
90
+ return unless options.dig(:with, :phone_code) || options.dig(:with, :all)
91
+
92
+ result[:phone_code] = city['phone_code']
93
+ end
94
+
95
+ def add_metropolitan_municipality_if_requested(result, city, options = nil)
96
+ return unless options.dig(:with, :metropolitan_municipality_since) || options.dig(:with, :all)
97
+
98
+ result[:metropolitan_municipality_since] = city['metropolitan_municipality_since']
99
+ end
100
+
101
+ def unsupported_travel_method(input)
102
+ "Travel method '#{input}' is unsupported"
103
+ end
104
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'i18n'
4
+ require 'yaml'
5
+
6
+ require_relative '../turkish_cities/helpers/decomposer_helper'
7
+
8
+ class Postcode
9
+ include DecomposerHelper
10
+
11
+ def find_by_postcode(postcode)
12
+ check_input_range(postcode, 1010, 81_952)
13
+
14
+ city_name = City.new.find_by_id(postcode.to_i / 1000)
15
+ city_file = create_district_list(city_name)
16
+
17
+ city_file.each do |district|
18
+ district_name = district[0]
19
+ district[1].each do |subdistrict|
20
+ return [city_name, district_name, subdistrict[0]] if subdistrict[1]['postcode'] == postcode.to_i
21
+ end
22
+ end
23
+ postcode_not_found_error(postcode)
24
+ end
25
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class TurkishCities
4
+ VERSION = '0.3.0'
5
+ end
@@ -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 = 'List and find Turkish cities via name, district name, post code, plate number. Calculate air travel distance between cities and get realistic estimates of travel time'
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.10.0'
27
+ s.add_development_dependency 'rubocop', '~> 1.3.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,29 +1,220 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turkish_cities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Semih Arslanoglu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-30 00:00:00.000000000 Z
12
- dependencies: []
13
- description: Simple ruby gem for listing turkish cities
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.10.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.10.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: 1.3.1
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 1.3.1
89
+ description: List and find Turkish cities via name, district name, post code, plate
90
+ number. Calculate air travel distance between cities and get realistic estimates
91
+ of travel time
14
92
  email: arslanoglusemih93@gmail.com
15
93
  executables: []
16
94
  extensions: []
17
95
  extra_rdoc_files: []
18
96
  files:
97
+ - ".codeclimate.yml"
98
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
99
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
100
+ - ".github/pull_request_template.md"
101
+ - ".gitignore"
102
+ - ".hound.yml"
103
+ - ".rspec"
104
+ - ".rubocop.yml"
105
+ - ".travis.yml"
106
+ - CHANGELOG.md
107
+ - CODE_OF_CONDUCT.md
108
+ - CONTRIBUTING.md
109
+ - Gemfile
110
+ - Gemfile.lock
111
+ - LICENSE.txt
112
+ - README.md
19
113
  - lib/turkish_cities.rb
20
114
  - lib/turkish_cities/city.rb
21
- - lib/turkish_cities/data/city_list.rb
115
+ - lib/turkish_cities/data/cities.yaml
116
+ - lib/turkish_cities/data/districts/adana.yaml
117
+ - lib/turkish_cities/data/districts/adiyaman.yaml
118
+ - lib/turkish_cities/data/districts/afyon.yaml
119
+ - lib/turkish_cities/data/districts/agri.yaml
120
+ - lib/turkish_cities/data/districts/aksaray.yaml
121
+ - lib/turkish_cities/data/districts/amasya.yaml
122
+ - lib/turkish_cities/data/districts/ankara.yaml
123
+ - lib/turkish_cities/data/districts/antalya.yaml
124
+ - lib/turkish_cities/data/districts/ardahan.yaml
125
+ - lib/turkish_cities/data/districts/artvin.yaml
126
+ - lib/turkish_cities/data/districts/aydin.yaml
127
+ - lib/turkish_cities/data/districts/balikesir.yaml
128
+ - lib/turkish_cities/data/districts/bartin.yaml
129
+ - lib/turkish_cities/data/districts/batman.yaml
130
+ - lib/turkish_cities/data/districts/bayburt.yaml
131
+ - lib/turkish_cities/data/districts/bilecik.yaml
132
+ - lib/turkish_cities/data/districts/bingol.yaml
133
+ - lib/turkish_cities/data/districts/bitlis.yaml
134
+ - lib/turkish_cities/data/districts/bolu.yaml
135
+ - lib/turkish_cities/data/districts/burdur.yaml
136
+ - lib/turkish_cities/data/districts/bursa.yaml
137
+ - lib/turkish_cities/data/districts/canakkale.yaml
138
+ - lib/turkish_cities/data/districts/cankiri.yaml
139
+ - lib/turkish_cities/data/districts/corum.yaml
140
+ - lib/turkish_cities/data/districts/denizli.yaml
141
+ - lib/turkish_cities/data/districts/diyarbakir.yaml
142
+ - lib/turkish_cities/data/districts/duzce.yaml
143
+ - lib/turkish_cities/data/districts/edirne.yaml
144
+ - lib/turkish_cities/data/districts/elazig.yaml
145
+ - lib/turkish_cities/data/districts/erzincan.yaml
146
+ - lib/turkish_cities/data/districts/erzurum.yaml
147
+ - lib/turkish_cities/data/districts/eskisehir.yaml
148
+ - lib/turkish_cities/data/districts/gaziantep.yaml
149
+ - lib/turkish_cities/data/districts/giresun.yaml
150
+ - lib/turkish_cities/data/districts/gumushane.yaml
151
+ - lib/turkish_cities/data/districts/hakkari.yaml
152
+ - lib/turkish_cities/data/districts/hatay.yaml
153
+ - lib/turkish_cities/data/districts/igdir.yaml
154
+ - lib/turkish_cities/data/districts/isparta.yaml
155
+ - lib/turkish_cities/data/districts/istanbul.yaml
156
+ - lib/turkish_cities/data/districts/izmir.yaml
157
+ - lib/turkish_cities/data/districts/kahramanmaras.yaml
158
+ - lib/turkish_cities/data/districts/karabuk.yaml
159
+ - lib/turkish_cities/data/districts/karaman.yaml
160
+ - lib/turkish_cities/data/districts/kars.yaml
161
+ - lib/turkish_cities/data/districts/kastamonu.yaml
162
+ - lib/turkish_cities/data/districts/kayseri.yaml
163
+ - lib/turkish_cities/data/districts/kilis.yaml
164
+ - lib/turkish_cities/data/districts/kirikkale.yaml
165
+ - lib/turkish_cities/data/districts/kirklareli.yaml
166
+ - lib/turkish_cities/data/districts/kirsehir.yaml
167
+ - lib/turkish_cities/data/districts/kocaeli.yaml
168
+ - lib/turkish_cities/data/districts/konya.yaml
169
+ - lib/turkish_cities/data/districts/kutahya.yaml
170
+ - lib/turkish_cities/data/districts/malatya.yaml
171
+ - lib/turkish_cities/data/districts/manisa.yaml
172
+ - lib/turkish_cities/data/districts/mardin.yaml
173
+ - lib/turkish_cities/data/districts/mersin.yaml
174
+ - lib/turkish_cities/data/districts/mugla.yaml
175
+ - lib/turkish_cities/data/districts/mus.yaml
176
+ - lib/turkish_cities/data/districts/nevsehir.yaml
177
+ - lib/turkish_cities/data/districts/nigde.yaml
178
+ - lib/turkish_cities/data/districts/ordu.yaml
179
+ - lib/turkish_cities/data/districts/osmaniye.yaml
180
+ - lib/turkish_cities/data/districts/rize.yaml
181
+ - lib/turkish_cities/data/districts/sakarya.yaml
182
+ - lib/turkish_cities/data/districts/samsun.yaml
183
+ - lib/turkish_cities/data/districts/sanliurfa.yaml
184
+ - lib/turkish_cities/data/districts/siirt.yaml
185
+ - lib/turkish_cities/data/districts/sinop.yaml
186
+ - lib/turkish_cities/data/districts/sirnak.yaml
187
+ - lib/turkish_cities/data/districts/sivas.yaml
188
+ - lib/turkish_cities/data/districts/tekirdag.yaml
189
+ - lib/turkish_cities/data/districts/tokat.yaml
190
+ - lib/turkish_cities/data/districts/trabzon.yaml
191
+ - lib/turkish_cities/data/districts/tunceli.yaml
192
+ - lib/turkish_cities/data/districts/usak.yaml
193
+ - lib/turkish_cities/data/districts/van.yaml
194
+ - lib/turkish_cities/data/districts/yalova.yaml
195
+ - lib/turkish_cities/data/districts/yozgat.yaml
196
+ - lib/turkish_cities/data/districts/zonguldak.yaml
197
+ - lib/turkish_cities/data/neighborhoods_parser.rb
198
+ - lib/turkish_cities/distance.rb
199
+ - lib/turkish_cities/district.rb
200
+ - lib/turkish_cities/helpers/decomposer_helper.rb
201
+ - lib/turkish_cities/postcode.rb
202
+ - lib/turkish_cities/version.rb
203
+ - public/assets/img/TurkishCities_darkblue-on-yellow_800X800@3x-8.png
204
+ - public/assets/img/TurkishCities_darkblue-on-yellow_914X343@3x-8.png
205
+ - public/assets/img/TurkishCities_darkblue-on-yellow_horizontal_914X343@3x-8.png
206
+ - public/assets/img/TurkishCities_yellow-on-darkblue_800X800@3x-8.png
207
+ - public/assets/img/TurkishCities_yellow-on-darkblue_914X343@3x-8.png
208
+ - public/assets/img/TurkishCities_yellow-on-darkblue_horizontal_914X343@3x-8.png
209
+ - turkish_cities.gemspec
22
210
  homepage: https://github.com/sarslanoglu/turkish_cities
23
211
  licenses:
24
212
  - MIT
25
- metadata: {}
26
- post_install_message:
213
+ metadata:
214
+ changelog_uri: https://github.com/sarslanoglu/turkish_cities/blob/master/CHANGELOG.md
215
+ source_code_uri: https://github.com/sarslanoglu/turkish_cities
216
+ bug_tracker_uri: https://github.com/sarslanoglu/turkish_cities/issues
217
+ post_install_message:
27
218
  rdoc_options: []
28
219
  require_paths:
29
220
  - lib
@@ -31,7 +222,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
31
222
  requirements:
32
223
  - - ">="
33
224
  - !ruby/object:Gem::Version
34
- version: '0'
225
+ version: 2.5.1
35
226
  required_rubygems_version: !ruby/object:Gem::Requirement
36
227
  requirements:
37
228
  - - ">="
@@ -39,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
230
  version: '0'
40
231
  requirements: []
41
232
  rubygems_version: 3.1.2
42
- signing_key:
233
+ signing_key:
43
234
  specification_version: 4
44
- summary: Discover The Potential
235
+ summary: List and find Turkish cities
45
236
  test_files: []