turkish_cities 0.5.0 → 0.7.0

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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +34 -0
  3. data/.github/workflows/ruby.yml +39 -0
  4. data/.hound.yml +1 -1
  5. data/.rubocop.yml +4 -1
  6. data/CHANGELOG.md +26 -0
  7. data/Gemfile.lock +38 -46
  8. data/README.md +301 -30
  9. data/Rakefile +11 -0
  10. data/{config → lib/config}/locales/en.yml +3 -0
  11. data/{config → lib/config}/locales/tr.yml +3 -0
  12. data/lib/turkish_cities/data/cities.yaml +243 -0
  13. data/lib/turkish_cities/data/districts/adana.yaml +1 -1
  14. data/lib/turkish_cities/data/districts/adiyaman.yaml +184 -176
  15. data/lib/turkish_cities/data/districts/afyon.yaml +295 -189
  16. data/lib/turkish_cities/data/districts/agri.yaml +28 -28
  17. data/lib/turkish_cities/data/districts/aksaray.yaml +90 -61
  18. data/lib/turkish_cities/data/districts/amasya.yaml +17 -6
  19. data/lib/turkish_cities/data/districts/ankara.yaml +22 -22
  20. data/lib/turkish_cities/data/districts/antalya.yaml +3 -3
  21. data/lib/turkish_cities/data/districts/ardahan.yaml +10 -7
  22. data/lib/turkish_cities/data/districts/artvin.yaml +0 -60
  23. data/lib/turkish_cities/data/districts/bartin.yaml +23 -19
  24. data/lib/turkish_cities/data/districts/batman.yaml +45 -28
  25. data/lib/turkish_cities/data/districts/bayburt.yaml +12 -6
  26. data/lib/turkish_cities/data/districts/bilecik.yaml +18 -14
  27. data/lib/turkish_cities/data/districts/bingol.yaml +29 -35
  28. data/lib/turkish_cities/data/districts/bitlis.yaml +56 -43
  29. data/lib/turkish_cities/data/districts/bolu.yaml +34 -58
  30. data/lib/turkish_cities/data/districts/burdur.yaml +22 -16
  31. data/lib/turkish_cities/data/districts/bursa.yaml +3 -2
  32. data/lib/turkish_cities/data/districts/canakkale.yaml +46 -47
  33. data/lib/turkish_cities/data/districts/cankiri.yaml +23 -18
  34. data/lib/turkish_cities/data/districts/corum.yaml +25 -15
  35. data/lib/turkish_cities/data/districts/denizli.yaml +1 -1
  36. data/lib/turkish_cities/data/districts/diyarbakir.yaml +6 -6
  37. data/lib/turkish_cities/data/districts/duzce.yaml +83 -74
  38. data/lib/turkish_cities/data/districts/edirne.yaml +37 -23
  39. data/lib/turkish_cities/data/districts/elazig.yaml +74 -54
  40. data/lib/turkish_cities/data/districts/erzincan.yaml +47 -38
  41. data/lib/turkish_cities/data/districts/erzurum.yaml +1 -1
  42. data/lib/turkish_cities/data/districts/giresun.yaml +125 -57
  43. data/lib/turkish_cities/data/districts/gumushane.yaml +61 -81
  44. data/lib/turkish_cities/data/districts/hakkari.yaml +22 -15
  45. data/lib/turkish_cities/data/districts/hatay.yaml +1 -1
  46. data/lib/turkish_cities/data/districts/igdir.yaml +20 -11
  47. data/lib/turkish_cities/data/districts/isparta.yaml +67 -40
  48. data/lib/turkish_cities/data/districts/istanbul.yaml +12 -12
  49. data/lib/turkish_cities/data/districts/izmir.yaml +12 -12
  50. data/lib/turkish_cities/data/districts/kahramanmaras.yaml +3 -2
  51. data/lib/turkish_cities/data/districts/karabuk.yaml +15 -28
  52. data/lib/turkish_cities/data/districts/karaman.yaml +36 -31
  53. data/lib/turkish_cities/data/districts/kars.yaml +5 -4
  54. data/lib/turkish_cities/data/districts/kastamonu.yaml +3 -29
  55. data/lib/turkish_cities/data/districts/kayseri.yaml +8 -8
  56. data/lib/turkish_cities/data/districts/kilis.yaml +3 -2
  57. data/lib/turkish_cities/data/districts/kirikkale.yaml +17 -13
  58. data/lib/turkish_cities/data/districts/kirklareli.yaml +63 -45
  59. data/lib/turkish_cities/data/districts/kirsehir.yaml +25 -16
  60. data/lib/turkish_cities/data/districts/kocaeli.yaml +1 -1
  61. data/lib/turkish_cities/data/districts/konya.yaml +7 -8
  62. data/lib/turkish_cities/data/districts/kutahya.yaml +104 -72
  63. data/lib/turkish_cities/data/districts/malatya.yaml +1 -1
  64. data/lib/turkish_cities/data/districts/manisa.yaml +2 -2
  65. data/lib/turkish_cities/data/districts/mersin.yaml +4 -4
  66. data/lib/turkish_cities/data/districts/mus.yaml +118 -74
  67. data/lib/turkish_cities/data/districts/nevsehir.yaml +51 -43
  68. data/lib/turkish_cities/data/districts/nigde.yaml +135 -76
  69. data/lib/turkish_cities/data/districts/ordu.yaml +3 -3
  70. data/lib/turkish_cities/data/districts/osmaniye.yaml +53 -32
  71. data/lib/turkish_cities/data/districts/rize.yaml +68 -46
  72. data/lib/turkish_cities/data/districts/sakarya.yaml +2 -2
  73. data/lib/turkish_cities/data/districts/samsun.yaml +3 -3
  74. data/lib/turkish_cities/data/districts/sanliurfa.yaml +7 -7
  75. data/lib/turkish_cities/data/districts/siirt.yaml +27 -13
  76. data/lib/turkish_cities/data/districts/sinop.yaml +1 -5
  77. data/lib/turkish_cities/data/districts/sirnak.yaml +78 -40
  78. data/lib/turkish_cities/data/districts/sivas.yaml +49 -52
  79. data/lib/turkish_cities/data/districts/tekirdag.yaml +7 -2
  80. data/lib/turkish_cities/data/districts/tokat.yaml +201 -138
  81. data/lib/turkish_cities/data/districts/trabzon.yaml +1 -0
  82. data/lib/turkish_cities/data/districts/tunceli.yaml +13 -9
  83. data/lib/turkish_cities/data/districts/usak.yaml +40 -24
  84. data/lib/turkish_cities/data/districts/van.yaml +6 -4
  85. data/lib/turkish_cities/data/districts/yalova.yaml +45 -21
  86. data/lib/turkish_cities/data/districts/yozgat.yaml +147 -80
  87. data/lib/turkish_cities/data/districts/zonguldak.yaml +127 -90
  88. data/lib/turkish_cities/data/neighborhoods_parser.rb +3 -3
  89. data/lib/turkish_cities/elevation.rb +42 -0
  90. data/lib/turkish_cities/helpers/decomposer_helper.rb +28 -0
  91. data/lib/turkish_cities/population.rb +60 -0
  92. data/lib/turkish_cities/version.rb +1 -1
  93. data/lib/turkish_cities.rb +12 -1
  94. data/turkish_cities.gemspec +4 -3
  95. metadata +31 -13
  96. data/.travis.yml +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bae35e49b4b510ec357661984e1fe58147fb814c0d3fa05884b267d1dc73c3e8
4
- data.tar.gz: e0107fac60f4c94f319a3a7abe9dc0a3d2dcde7be97636ae289755d64a017efa
3
+ metadata.gz: 960c3988d72a7f5e012c1e576340e354715433b247664f41c9fce072a4f9eaae
4
+ data.tar.gz: 602da0c9a6929f9b65a450d67a6342efb9ccc39128ce5a0d828f43b947eeb9ad
5
5
  SHA512:
6
- metadata.gz: dcbef3333549bcf28f20597ae6b43948fc6555c1e407baaa358bc2da1f13b0a60afbd86e1211b2dfccbe9fd1ca7690bbedd1499db47d553b3d59a44d26b8d995
7
- data.tar.gz: bd4196417c877097d240d7d44005debf81d0171c20b1b290cbdbe5b81053dc154dbacf092a20413cda142cecfb83d6eaa8c0f52391d3311961b6b83e0f20b6e3
6
+ metadata.gz: 58d77fb5329d83b9aca19163da82e87f699508f4bdd4ba1f62320d2ba01cfad6a30b0f8bd8360b83204d8d17d88641051c5efbc3d98a71e91baa211679eb866e
7
+ data.tar.gz: b57f42d6b6b3f926534a2b015913a346ae72a9c7b4623abfe80dbab7f3577f0daff8f8d986843a9f4131bd71d0037152426f9fce3472b19e9e9a615e9e91a758
@@ -0,0 +1,34 @@
1
+ # Use the latest 2.1 version of CircleCI pipeline process engine.
2
+ # See: https://circleci.com/docs/2.0/configuration-reference
3
+ version: 2.1
4
+
5
+ # Define a job to be invoked later in a workflow.
6
+ # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
7
+ orbs:
8
+ ruby: circleci/ruby@1.0.4
9
+
10
+ jobs:
11
+ test:
12
+ # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
13
+ # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
14
+ docker:
15
+ - image: cimg/ruby:2.7
16
+ # Add steps to the job
17
+ # See: https://circleci.com/docs/2.0/configuration-reference/#steps
18
+ steps:
19
+ - checkout
20
+ - ruby/install-deps
21
+ - run:
22
+ name: Run rubocop
23
+ command: bundle exec rubocop
24
+ - run:
25
+ name: Run tests
26
+ command: bundle exec rake
27
+
28
+ # Invoke jobs via workflows
29
+ # See: https://circleci.com/docs/2.0/configuration-reference/#workflows
30
+ workflows:
31
+ version: 2
32
+ deploy:
33
+ jobs:
34
+ - test
@@ -0,0 +1,39 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['2.6', '2.7']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby-version }}
33
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
+ - name: RuboCop
35
+ run: bundle exec rubocop
36
+ - name: Run tests
37
+ run: bundle exec rspec
38
+ - uses: actions/checkout@master
39
+ - uses: codecov/codecov-action@v2
data/.hound.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  rubocop:
2
- version: 1.5.2
2
+ version: 1.22.1
3
3
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ AllCops:
3
3
  Exclude:
4
4
  - 'Gemfile'
5
5
  - 'turkish_cities.gemspec'
6
+ - 'vendor/bundle/**/*'
6
7
  NewCops: enable
7
8
  SuggestExtensions: false
8
9
  Layout/LineLength:
@@ -12,6 +13,8 @@ Metrics/AbcSize:
12
13
  Metrics/BlockLength:
13
14
  IgnoredMethods: ['describe', 'context']
14
15
  Metrics/MethodLength:
15
- Max: 15
16
+ Max: 20
17
+ Metrics/ModuleLength:
18
+ Max: 150
16
19
  Style/Documentation:
17
20
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 (2022-08-03)
4
+
5
+ ### New features
6
+
7
+ * [#14](https://github.com/sarslanoglu/turkish_cities/issues/14): Add city altitude data and ```find_by_elevation``` method
8
+
9
+ ### Bug fixes
10
+
11
+ * [#116](https://github.com/sarslanoglu/turkish_cities/issues/116): translation missing error on Rails apps
12
+
13
+ ## 0.6.1 (2022-07-18)
14
+
15
+ ### Bug fixes
16
+
17
+ * [#113](https://github.com/sarslanoglu/turkish_cities/issues/113): Fix no implicit conversion of Array into String error
18
+
19
+ ## 0.6.0 (2022-02-26)
20
+
21
+ ### New features
22
+
23
+ * [#12](https://github.com/sarslanoglu/turkish_cities/issues/12): Add city population data and ```find_by_population``` method
24
+
25
+ ### Changes
26
+
27
+ * [#103](https://github.com/sarslanoglu/turkish_cities/issues/103): Update city/district/subdistrict informations to 2022
28
+
3
29
  ## 0.5.0 (2021-06-06)
4
30
 
5
31
  ### New features
data/Gemfile.lock CHANGED
@@ -1,77 +1,69 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turkish_cities (0.5.0)
4
+ turkish_cities (0.7.0)
5
5
  i18n (>= 0.6.4, <= 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.4.2)
11
- concurrent-ruby (1.1.8)
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.4.4)
19
- docile (1.3.2)
20
- i18n (1.8.10)
11
+ codecov (0.6.0)
12
+ simplecov (>= 0.15, < 0.22)
13
+ concurrent-ruby (1.1.9)
14
+ diff-lcs (1.5.0)
15
+ docile (1.4.0)
16
+ i18n (1.10.0)
21
17
  concurrent-ruby (~> 1.0)
22
- json (2.3.0)
23
- parallel (1.20.1)
24
- parser (3.0.1.1)
18
+ parallel (1.22.1)
19
+ parser (3.1.2.0)
25
20
  ast (~> 2.4.1)
26
- rainbow (3.0.0)
27
- regexp_parser (2.1.1)
21
+ rainbow (3.1.1)
22
+ rake (13.0.6)
23
+ regexp_parser (2.3.0)
28
24
  rexml (3.2.5)
29
- rspec (3.10.0)
30
- rspec-core (~> 3.10.0)
31
- rspec-expectations (~> 3.10.0)
32
- rspec-mocks (~> 3.10.0)
33
- rspec-core (3.10.0)
34
- rspec-support (~> 3.10.0)
35
- rspec-expectations (3.10.0)
25
+ rspec (3.11.0)
26
+ rspec-core (~> 3.11.0)
27
+ rspec-expectations (~> 3.11.0)
28
+ rspec-mocks (~> 3.11.0)
29
+ rspec-core (3.11.0)
30
+ rspec-support (~> 3.11.0)
31
+ rspec-expectations (3.11.0)
36
32
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.10.0)
38
- rspec-mocks (3.10.0)
33
+ rspec-support (~> 3.11.0)
34
+ rspec-mocks (3.11.0)
39
35
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.10.0)
41
- rspec-support (3.10.0)
42
- rubocop (1.16.0)
36
+ rspec-support (~> 3.11.0)
37
+ rspec-support (3.11.0)
38
+ rubocop (1.27.0)
43
39
  parallel (~> 1.10)
44
- parser (>= 3.0.0.0)
40
+ parser (>= 3.1.0.0)
45
41
  rainbow (>= 2.2.2, < 4.0)
46
42
  regexp_parser (>= 1.8, < 3.0)
47
43
  rexml
48
- rubocop-ast (>= 1.7.0, < 2.0)
44
+ rubocop-ast (>= 1.16.0, < 2.0)
49
45
  ruby-progressbar (~> 1.7)
50
46
  unicode-display_width (>= 1.4.0, < 3.0)
51
- rubocop-ast (1.7.0)
52
- parser (>= 3.0.1.1)
47
+ rubocop-ast (1.17.0)
48
+ parser (>= 3.1.1.0)
53
49
  ruby-progressbar (1.11.0)
54
- simplecov (0.16.1)
50
+ simplecov (0.21.2)
55
51
  docile (~> 1.1)
56
- json (>= 1.8, < 3)
57
- simplecov-html (~> 0.10.0)
58
- simplecov-html (0.10.2)
59
- sync (0.5.0)
60
- term-ansicolor (1.7.1)
61
- tins (~> 1.0)
62
- thor (1.0.1)
63
- tins (1.25.0)
64
- sync
65
- unicode-display_width (2.0.0)
52
+ simplecov-html (~> 0.11)
53
+ simplecov_json_formatter (~> 0.1)
54
+ simplecov-html (0.12.3)
55
+ simplecov_json_formatter (0.1.4)
56
+ unicode-display_width (2.1.0)
66
57
 
67
58
  PLATFORMS
68
59
  ruby
69
60
 
70
61
  DEPENDENCIES
71
62
  bundler (~> 2.2.16)
72
- coveralls (~> 0.8.23)
73
- rspec (~> 3.10.0)
74
- rubocop (~> 1.16.0)
63
+ codecov (~> 0.6.0)
64
+ rake (~> 13.0.6)
65
+ rspec (~> 3.11.0)
66
+ rubocop (~> 1.27.0)
75
67
  turkish_cities!
76
68
 
77
69
  BUNDLED WITH