turkish_cities 0.4.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +34 -0
  3. data/.github/dependabot.yml +20 -0
  4. data/.github/workflows/ruby.yml +39 -0
  5. data/.hound.yml +1 -1
  6. data/.rubocop.yml +3 -1
  7. data/CHANGELOG.md +22 -0
  8. data/Gemfile.lock +43 -51
  9. data/README.md +237 -33
  10. data/Rakefile +11 -0
  11. data/config/locales/en.yml +19 -0
  12. data/config/locales/tr.yml +19 -0
  13. data/lib/turkish_cities/city.rb +1 -3
  14. data/lib/turkish_cities/data/cities.yaml +81 -0
  15. data/lib/turkish_cities/data/districts/adana.yaml +1 -1
  16. data/lib/turkish_cities/data/districts/adiyaman.yaml +184 -176
  17. data/lib/turkish_cities/data/districts/afyon.yaml +295 -189
  18. data/lib/turkish_cities/data/districts/agri.yaml +28 -28
  19. data/lib/turkish_cities/data/districts/aksaray.yaml +90 -61
  20. data/lib/turkish_cities/data/districts/amasya.yaml +17 -6
  21. data/lib/turkish_cities/data/districts/ankara.yaml +22 -22
  22. data/lib/turkish_cities/data/districts/antalya.yaml +3 -3
  23. data/lib/turkish_cities/data/districts/ardahan.yaml +10 -7
  24. data/lib/turkish_cities/data/districts/artvin.yaml +0 -60
  25. data/lib/turkish_cities/data/districts/bartin.yaml +23 -19
  26. data/lib/turkish_cities/data/districts/batman.yaml +45 -28
  27. data/lib/turkish_cities/data/districts/bayburt.yaml +12 -6
  28. data/lib/turkish_cities/data/districts/bilecik.yaml +18 -14
  29. data/lib/turkish_cities/data/districts/bingol.yaml +29 -35
  30. data/lib/turkish_cities/data/districts/bitlis.yaml +56 -43
  31. data/lib/turkish_cities/data/districts/bolu.yaml +34 -58
  32. data/lib/turkish_cities/data/districts/burdur.yaml +22 -16
  33. data/lib/turkish_cities/data/districts/bursa.yaml +3 -2
  34. data/lib/turkish_cities/data/districts/canakkale.yaml +46 -47
  35. data/lib/turkish_cities/data/districts/cankiri.yaml +23 -18
  36. data/lib/turkish_cities/data/districts/corum.yaml +25 -15
  37. data/lib/turkish_cities/data/districts/denizli.yaml +1 -1
  38. data/lib/turkish_cities/data/districts/diyarbakir.yaml +6 -6
  39. data/lib/turkish_cities/data/districts/duzce.yaml +83 -74
  40. data/lib/turkish_cities/data/districts/edirne.yaml +37 -23
  41. data/lib/turkish_cities/data/districts/elazig.yaml +74 -54
  42. data/lib/turkish_cities/data/districts/erzincan.yaml +47 -38
  43. data/lib/turkish_cities/data/districts/erzurum.yaml +1 -1
  44. data/lib/turkish_cities/data/districts/giresun.yaml +125 -57
  45. data/lib/turkish_cities/data/districts/gumushane.yaml +61 -81
  46. data/lib/turkish_cities/data/districts/hakkari.yaml +22 -15
  47. data/lib/turkish_cities/data/districts/hatay.yaml +1 -1
  48. data/lib/turkish_cities/data/districts/igdir.yaml +20 -11
  49. data/lib/turkish_cities/data/districts/isparta.yaml +67 -40
  50. data/lib/turkish_cities/data/districts/istanbul.yaml +12 -12
  51. data/lib/turkish_cities/data/districts/izmir.yaml +12 -12
  52. data/lib/turkish_cities/data/districts/kahramanmaras.yaml +3 -2
  53. data/lib/turkish_cities/data/districts/karabuk.yaml +15 -28
  54. data/lib/turkish_cities/data/districts/karaman.yaml +36 -31
  55. data/lib/turkish_cities/data/districts/kars.yaml +5 -4
  56. data/lib/turkish_cities/data/districts/kastamonu.yaml +3 -29
  57. data/lib/turkish_cities/data/districts/kayseri.yaml +8 -8
  58. data/lib/turkish_cities/data/districts/kilis.yaml +3 -2
  59. data/lib/turkish_cities/data/districts/kirikkale.yaml +17 -13
  60. data/lib/turkish_cities/data/districts/kirklareli.yaml +63 -45
  61. data/lib/turkish_cities/data/districts/kirsehir.yaml +25 -16
  62. data/lib/turkish_cities/data/districts/kocaeli.yaml +1 -1
  63. data/lib/turkish_cities/data/districts/konya.yaml +7 -8
  64. data/lib/turkish_cities/data/districts/kutahya.yaml +104 -72
  65. data/lib/turkish_cities/data/districts/malatya.yaml +1 -1
  66. data/lib/turkish_cities/data/districts/manisa.yaml +2 -2
  67. data/lib/turkish_cities/data/districts/mersin.yaml +4 -4
  68. data/lib/turkish_cities/data/districts/mus.yaml +118 -74
  69. data/lib/turkish_cities/data/districts/nevsehir.yaml +51 -43
  70. data/lib/turkish_cities/data/districts/nigde.yaml +135 -76
  71. data/lib/turkish_cities/data/districts/ordu.yaml +3 -3
  72. data/lib/turkish_cities/data/districts/osmaniye.yaml +53 -32
  73. data/lib/turkish_cities/data/districts/rize.yaml +68 -46
  74. data/lib/turkish_cities/data/districts/sakarya.yaml +2 -2
  75. data/lib/turkish_cities/data/districts/samsun.yaml +3 -3
  76. data/lib/turkish_cities/data/districts/sanliurfa.yaml +7 -7
  77. data/lib/turkish_cities/data/districts/siirt.yaml +27 -13
  78. data/lib/turkish_cities/data/districts/sinop.yaml +1 -5
  79. data/lib/turkish_cities/data/districts/sirnak.yaml +78 -40
  80. data/lib/turkish_cities/data/districts/sivas.yaml +49 -52
  81. data/lib/turkish_cities/data/districts/tekirdag.yaml +7 -2
  82. data/lib/turkish_cities/data/districts/tokat.yaml +201 -138
  83. data/lib/turkish_cities/data/districts/trabzon.yaml +1 -0
  84. data/lib/turkish_cities/data/districts/tunceli.yaml +13 -9
  85. data/lib/turkish_cities/data/districts/usak.yaml +40 -24
  86. data/lib/turkish_cities/data/districts/van.yaml +6 -4
  87. data/lib/turkish_cities/data/districts/yalova.yaml +45 -21
  88. data/lib/turkish_cities/data/districts/yozgat.yaml +147 -80
  89. data/lib/turkish_cities/data/districts/zonguldak.yaml +127 -90
  90. data/lib/turkish_cities/data/neighborhoods_parser.rb +4 -4
  91. data/lib/turkish_cities/distance.rb +7 -4
  92. data/lib/turkish_cities/helpers/decomposer_helper.rb +21 -7
  93. data/lib/turkish_cities/population.rb +66 -0
  94. data/lib/turkish_cities/version.rb +1 -1
  95. data/lib/turkish_cities.rb +23 -2
  96. data/turkish_cities.gemspec +4 -4
  97. metadata +34 -14
  98. data/.travis.yml +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14e3cb00362c30c66924e86fb009a79dd9ef16b086166ec0eb1be136653e7cc7
4
- data.tar.gz: a1b61fbd9f3319d5973acf35b029bb315460b83d0d8ebcfb15d30405eab0e6cb
3
+ metadata.gz: e226b8c384ed7a4da21f58275b42aed79fdeaf86eb2d7bd2010ddfbcdc68235c
4
+ data.tar.gz: ceaa74bb9cb4f1b8b8644d078b029d1acfb74968fad3b239caeac326e03a6848
5
5
  SHA512:
6
- metadata.gz: 4a0d5834616ddfe7cf080efd3182d599f7901a1d139f831aa85a7ff81d66498bb2ad8a2e118e9c935fadf679cb86f249ae6210f986a38408a1d21c8e5e313b17
7
- data.tar.gz: ea17bd392eb05c6bfa1413cc0754d749a2dc53874d5944bc37603c98cf2f65c9de9c9c9a68d208bcbde738c73f59e9b09740f23d5899526ff7a8080e15732197
6
+ metadata.gz: 65baf5e107ef85c6f216702e4a5411f7675b5d091770ba9b4aa0c7836297edcc8684b119f3d6e16cd65792a4b7b85364c0384ff69faa6c6358dd8dd2261ed4b5
7
+ data.tar.gz: bbb68a76d9acf156000e12ea300bc038b833bd9f76ff2f8fa9870f3373bb08bfb94ce2f97f2c1488fe28b87aca419871967b093359a237779fbcd9a3670c8045
@@ -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,20 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: monthly
7
+ time: "09:00"
8
+ open-pull-requests-limit: 10
9
+ ignore:
10
+ - dependency-name: rubocop
11
+ versions:
12
+ - 1.8.1
13
+ - 1.9.1
14
+ - dependency-name: bundler
15
+ versions:
16
+ - 2.2.6
17
+ - 2.2.7
18
+ - dependency-name: i18n
19
+ versions:
20
+ - 1.8.7
@@ -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: 0.83.0
2
+ version: 1.22.1
3
3
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -3,13 +3,15 @@ AllCops:
3
3
  Exclude:
4
4
  - 'Gemfile'
5
5
  - 'turkish_cities.gemspec'
6
+ - 'vendor/bundle/**/*'
6
7
  NewCops: enable
8
+ SuggestExtensions: false
7
9
  Layout/LineLength:
8
10
  Max: 120
9
11
  Metrics/AbcSize:
10
12
  Max: 20
11
13
  Metrics/BlockLength:
12
- ExcludedMethods: ['describe', 'context']
14
+ IgnoredMethods: ['describe', 'context']
13
15
  Metrics/MethodLength:
14
16
  Max: 15
15
17
  Style/Documentation:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.1 (2022-07-18)
4
+
5
+ ### Bug fixes
6
+
7
+ * [#113](https://github.com/sarslanoglu/turkish_cities/issues/113): Fix no implicit conversion of Array into String error
8
+
9
+ ## 0.6.0 (2022-02-26)
10
+
11
+ ### New features
12
+
13
+ * [#12](https://github.com/sarslanoglu/turkish_cities/issues/12): Add city population data and ```find_by_population``` method
14
+
15
+ ### Changes
16
+
17
+ * [#103](https://github.com/sarslanoglu/turkish_cities/issues/103): Update city/district/subdistrict informations to 2022
18
+
19
+ ## 0.5.0 (2021-06-06)
20
+
21
+ ### New features
22
+
23
+ * [#68](https://github.com/sarslanoglu/turkish_cities/issues/68): Add localization for all method responses and errors
24
+
3
25
  ## 0.4.0 (2021-04-25)
4
26
 
5
27
  ### New features
data/Gemfile.lock CHANGED
@@ -1,77 +1,69 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turkish_cities (0.4.0)
4
+ turkish_cities (0.6.1)
5
5
  i18n (>= 0.6.4, <= 2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- ast (2.4.1)
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.4.4)
19
- docile (1.3.2)
20
- i18n (1.8.5)
10
+ ast (2.4.2)
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.0)
24
- parser (2.7.2.0)
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 (1.8.2)
28
- rexml (3.2.4)
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)
21
+ rainbow (3.1.1)
22
+ rake (13.0.6)
23
+ regexp_parser (2.3.0)
24
+ rexml (3.2.5)
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.3.1)
36
+ rspec-support (~> 3.11.0)
37
+ rspec-support (3.11.0)
38
+ rubocop (1.27.0)
43
39
  parallel (~> 1.10)
44
- parser (>= 2.7.1.5)
40
+ parser (>= 3.1.0.0)
45
41
  rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.8)
42
+ regexp_parser (>= 1.8, < 3.0)
47
43
  rexml
48
- rubocop-ast (>= 1.1.1)
44
+ rubocop-ast (>= 1.16.0, < 2.0)
49
45
  ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 2.0)
51
- rubocop-ast (1.1.1)
52
- parser (>= 2.7.1.5)
53
- ruby-progressbar (1.10.1)
54
- simplecov (0.16.1)
46
+ unicode-display_width (>= 1.4.0, < 3.0)
47
+ rubocop-ast (1.17.0)
48
+ parser (>= 3.1.1.0)
49
+ ruby-progressbar (1.11.0)
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 (1.7.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.3.1)
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