swiss-village-directory 0.2.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +38 -0
- data/.rubocop.yml +6 -1
- data/.rubocop_todo.yml +28 -0
- data/.ruby-version +1 -0
- data/README.md +10 -1
- data/bin/check +6 -0
- data/bin/setup +2 -5
- data/data/PLZO_CSV_WGS84.csv +4139 -4169
- data/lib/swiss_village_directory/repository.rb +21 -3
- data/lib/swiss_village_directory/version.rb +1 -1
- data/swiss-village-directory.gemspec +9 -7
- metadata +36 -21
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4eb08f26e48149668f5d9efed1e5fba238efad0b58f1834b7e429e857ad16bad
|
4
|
+
data.tar.gz: d71dc31a7054edeb3436c358844ea139e39ddc6443a5ebb7612771319b19e0dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc89ac09112b5830d09a3b53d527292a87d55e376a72ba08347c363e5413f5d49aaf187b4f909f4661f90622c4ed680f85b4871e470df8897e8bd1a8644b941e
|
7
|
+
data.tar.gz: 69c0291682b558a2777c4754f283d41c1d69a0a1555b4eb8208280c27c692a3638e2b4c694c4b87f0bae95cfa4f6ce65e18ed603a4d9402479f4f9cf9143d531
|
@@ -0,0 +1,38 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "master" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "master" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
lint:
|
14
|
+
runs-on: ubuntu-22.04
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v3
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: '2.7'
|
21
|
+
bundler-cache: true
|
22
|
+
- name: Run rubocop
|
23
|
+
run: bundle exec rubocop
|
24
|
+
|
25
|
+
test:
|
26
|
+
runs-on: ubuntu-22.04
|
27
|
+
strategy:
|
28
|
+
matrix:
|
29
|
+
ruby-version: ['2.7', '3.0', '3.1']
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v3
|
32
|
+
- name: Set up Ruby
|
33
|
+
uses: ruby/setup-ruby@v1
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2019-09-11 22:21:07 +0200 using RuboCop version 0.74.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
Metrics/AbcSize:
|
11
|
+
Max: 20
|
12
|
+
|
13
|
+
# Offense count: 1
|
14
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
15
|
+
# ExcludedMethods: refine
|
16
|
+
Metrics/BlockLength:
|
17
|
+
Exclude:
|
18
|
+
- spec/swiss_village_directory/repository_spec.rb
|
19
|
+
|
20
|
+
# Offense count: 1
|
21
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
22
|
+
Metrics/MethodLength:
|
23
|
+
Max: 19
|
24
|
+
|
25
|
+
# Offense count: 1
|
26
|
+
# Configuration parameters: CountKeywordArgs.
|
27
|
+
Metrics/ParameterLists:
|
28
|
+
Max: 7
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.8
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/renuo/swiss-village-directory.svg?branch=master)](https://travis-ci.org/renuo/swiss-village-directory)
|
2
|
+
|
1
3
|
# Swiss Village Directory
|
2
4
|
|
3
5
|
This gem provides a data set of all swiss villages taken out of the
|
4
6
|
"Ortschaftenverzeichnis" ([ch.swisstopo-vd.ortschaftenverzeichnis_plz][4])
|
5
|
-
The data set made available through a ruby object called `Village` contains
|
7
|
+
The data set made available through a ruby object called `Village` contains
|
8
|
+
the following fields.
|
6
9
|
|
7
10
|
* Village name
|
8
11
|
* Zip code
|
@@ -32,6 +35,12 @@ Or install it yourself as:
|
|
32
35
|
|
33
36
|
## Usage
|
34
37
|
|
38
|
+
Require the library
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
require 'swiss_village_directory'
|
42
|
+
```
|
43
|
+
|
35
44
|
Find by attributes:
|
36
45
|
|
37
46
|
```ruby
|
data/bin/check
ADDED