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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +34 -0
- data/.github/dependabot.yml +20 -0
- data/.github/workflows/ruby.yml +39 -0
- data/.hound.yml +1 -1
- data/.rubocop.yml +3 -1
- data/CHANGELOG.md +22 -0
- data/Gemfile.lock +43 -51
- data/README.md +237 -33
- data/Rakefile +11 -0
- data/config/locales/en.yml +19 -0
- data/config/locales/tr.yml +19 -0
- data/lib/turkish_cities/city.rb +1 -3
- data/lib/turkish_cities/data/cities.yaml +81 -0
- data/lib/turkish_cities/data/districts/adana.yaml +1 -1
- data/lib/turkish_cities/data/districts/adiyaman.yaml +184 -176
- data/lib/turkish_cities/data/districts/afyon.yaml +295 -189
- data/lib/turkish_cities/data/districts/agri.yaml +28 -28
- data/lib/turkish_cities/data/districts/aksaray.yaml +90 -61
- data/lib/turkish_cities/data/districts/amasya.yaml +17 -6
- data/lib/turkish_cities/data/districts/ankara.yaml +22 -22
- data/lib/turkish_cities/data/districts/antalya.yaml +3 -3
- data/lib/turkish_cities/data/districts/ardahan.yaml +10 -7
- data/lib/turkish_cities/data/districts/artvin.yaml +0 -60
- data/lib/turkish_cities/data/districts/bartin.yaml +23 -19
- data/lib/turkish_cities/data/districts/batman.yaml +45 -28
- data/lib/turkish_cities/data/districts/bayburt.yaml +12 -6
- data/lib/turkish_cities/data/districts/bilecik.yaml +18 -14
- data/lib/turkish_cities/data/districts/bingol.yaml +29 -35
- data/lib/turkish_cities/data/districts/bitlis.yaml +56 -43
- data/lib/turkish_cities/data/districts/bolu.yaml +34 -58
- data/lib/turkish_cities/data/districts/burdur.yaml +22 -16
- data/lib/turkish_cities/data/districts/bursa.yaml +3 -2
- data/lib/turkish_cities/data/districts/canakkale.yaml +46 -47
- data/lib/turkish_cities/data/districts/cankiri.yaml +23 -18
- data/lib/turkish_cities/data/districts/corum.yaml +25 -15
- data/lib/turkish_cities/data/districts/denizli.yaml +1 -1
- data/lib/turkish_cities/data/districts/diyarbakir.yaml +6 -6
- data/lib/turkish_cities/data/districts/duzce.yaml +83 -74
- data/lib/turkish_cities/data/districts/edirne.yaml +37 -23
- data/lib/turkish_cities/data/districts/elazig.yaml +74 -54
- data/lib/turkish_cities/data/districts/erzincan.yaml +47 -38
- data/lib/turkish_cities/data/districts/erzurum.yaml +1 -1
- data/lib/turkish_cities/data/districts/giresun.yaml +125 -57
- data/lib/turkish_cities/data/districts/gumushane.yaml +61 -81
- data/lib/turkish_cities/data/districts/hakkari.yaml +22 -15
- data/lib/turkish_cities/data/districts/hatay.yaml +1 -1
- data/lib/turkish_cities/data/districts/igdir.yaml +20 -11
- data/lib/turkish_cities/data/districts/isparta.yaml +67 -40
- data/lib/turkish_cities/data/districts/istanbul.yaml +12 -12
- data/lib/turkish_cities/data/districts/izmir.yaml +12 -12
- data/lib/turkish_cities/data/districts/kahramanmaras.yaml +3 -2
- data/lib/turkish_cities/data/districts/karabuk.yaml +15 -28
- data/lib/turkish_cities/data/districts/karaman.yaml +36 -31
- data/lib/turkish_cities/data/districts/kars.yaml +5 -4
- data/lib/turkish_cities/data/districts/kastamonu.yaml +3 -29
- data/lib/turkish_cities/data/districts/kayseri.yaml +8 -8
- data/lib/turkish_cities/data/districts/kilis.yaml +3 -2
- data/lib/turkish_cities/data/districts/kirikkale.yaml +17 -13
- data/lib/turkish_cities/data/districts/kirklareli.yaml +63 -45
- data/lib/turkish_cities/data/districts/kirsehir.yaml +25 -16
- data/lib/turkish_cities/data/districts/kocaeli.yaml +1 -1
- data/lib/turkish_cities/data/districts/konya.yaml +7 -8
- data/lib/turkish_cities/data/districts/kutahya.yaml +104 -72
- data/lib/turkish_cities/data/districts/malatya.yaml +1 -1
- data/lib/turkish_cities/data/districts/manisa.yaml +2 -2
- data/lib/turkish_cities/data/districts/mersin.yaml +4 -4
- data/lib/turkish_cities/data/districts/mus.yaml +118 -74
- data/lib/turkish_cities/data/districts/nevsehir.yaml +51 -43
- data/lib/turkish_cities/data/districts/nigde.yaml +135 -76
- data/lib/turkish_cities/data/districts/ordu.yaml +3 -3
- data/lib/turkish_cities/data/districts/osmaniye.yaml +53 -32
- data/lib/turkish_cities/data/districts/rize.yaml +68 -46
- data/lib/turkish_cities/data/districts/sakarya.yaml +2 -2
- data/lib/turkish_cities/data/districts/samsun.yaml +3 -3
- data/lib/turkish_cities/data/districts/sanliurfa.yaml +7 -7
- data/lib/turkish_cities/data/districts/siirt.yaml +27 -13
- data/lib/turkish_cities/data/districts/sinop.yaml +1 -5
- data/lib/turkish_cities/data/districts/sirnak.yaml +78 -40
- data/lib/turkish_cities/data/districts/sivas.yaml +49 -52
- data/lib/turkish_cities/data/districts/tekirdag.yaml +7 -2
- data/lib/turkish_cities/data/districts/tokat.yaml +201 -138
- data/lib/turkish_cities/data/districts/trabzon.yaml +1 -0
- data/lib/turkish_cities/data/districts/tunceli.yaml +13 -9
- data/lib/turkish_cities/data/districts/usak.yaml +40 -24
- data/lib/turkish_cities/data/districts/van.yaml +6 -4
- data/lib/turkish_cities/data/districts/yalova.yaml +45 -21
- data/lib/turkish_cities/data/districts/yozgat.yaml +147 -80
- data/lib/turkish_cities/data/districts/zonguldak.yaml +127 -90
- data/lib/turkish_cities/data/neighborhoods_parser.rb +4 -4
- data/lib/turkish_cities/distance.rb +7 -4
- data/lib/turkish_cities/helpers/decomposer_helper.rb +21 -7
- data/lib/turkish_cities/population.rb +66 -0
- data/lib/turkish_cities/version.rb +1 -1
- data/lib/turkish_cities.rb +23 -2
- data/turkish_cities.gemspec +4 -4
- metadata +34 -14
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e226b8c384ed7a4da21f58275b42aed79fdeaf86eb2d7bd2010ddfbcdc68235c
|
4
|
+
data.tar.gz: ceaa74bb9cb4f1b8b8644d078b029d1acfb74968fad3b239caeac326e03a6848
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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
|
-
|
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
|
+
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.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
23
|
-
|
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.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
rspec-
|
32
|
-
rspec-
|
33
|
-
|
34
|
-
|
35
|
-
|
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.
|
38
|
-
rspec-mocks (3.
|
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.
|
41
|
-
rspec-support (3.
|
42
|
-
rubocop (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 (>=
|
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.
|
44
|
+
rubocop-ast (>= 1.16.0, < 2.0)
|
49
45
|
ruby-progressbar (~> 1.7)
|
50
|
-
unicode-display_width (>= 1.4.0, <
|
51
|
-
rubocop-ast (1.
|
52
|
-
parser (>=
|
53
|
-
ruby-progressbar (1.
|
54
|
-
simplecov (0.
|
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
|
-
|
57
|
-
|
58
|
-
simplecov-html (0.
|
59
|
-
|
60
|
-
|
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
|
-
|
73
|
-
|
74
|
-
|
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
|