municipitaly 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -2
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +9 -1
- data/README.md +5 -0
- data/lib/municipitaly/data.rb +0 -1
- data/lib/municipitaly/province.rb +8 -0
- data/lib/municipitaly/search.rb +1 -1
- data/lib/municipitaly/version.rb +1 -1
- data/municipitaly.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 529e4690277bf3f529559e04fe2e1276c2bb39b3d7ccf27df37dbf93bed85e2f
|
4
|
+
data.tar.gz: c1f655da8655f244e376e6e422cda6b1bfde49a91a5e9f39d0379a382022fbcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f8dc76e6b6323d1cb03f117f140124a095e6db26eebed2afd397ed0e3e05270822d64bcb92107af5135d73cf44ce07b75e52d5b60d031753cdcb624bc0c09d
|
7
|
+
data.tar.gz: de0cbc36598e3216a54b7787a9a429ece40b9de44c7183c89d892071c2955e0527e9b0f0387021e2a59a86fbb95eb74fc22d6e384acd95cf9f76ca8104dfebb1
|
data/.travis.yml
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
---
|
2
|
-
|
2
|
+
os: linux
|
3
3
|
language: ruby
|
4
|
-
cache: bundler
|
5
4
|
rvm:
|
6
5
|
- 2.6.5
|
7
6
|
before_install: gem install bundler -v 2.1.4
|
7
|
+
before_script:
|
8
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
9
|
+
- chmod +x ./cc-test-reporter
|
10
|
+
- ./cc-test-reporter before-build
|
11
|
+
script:
|
12
|
+
- bundle exec rspec
|
13
|
+
after_script:
|
14
|
+
- ./cc-test-reporter after-build --debug --exit-code $TRAVIS_TEST_RESULT --prefix /home/travis/build/natydev/municipitaly --coverage-input-type simplecov
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.2.0] - 2020-02-24
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
-ISO 3166-2 code in province object `#iso3166_2` or alias `#iso3166`
|
13
|
+
|
8
14
|
|
9
15
|
## [0.1.0] - 2020-02-13
|
10
16
|
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
municipitaly (0.0
|
4
|
+
municipitaly (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.0)
|
10
10
|
diff-lcs (1.3)
|
11
|
+
docile (1.3.2)
|
11
12
|
jaro_winkler (1.5.4)
|
13
|
+
json (2.3.0)
|
12
14
|
parallel (1.19.1)
|
13
15
|
parser (2.6.5.0)
|
14
16
|
ast (~> 2.4.0)
|
@@ -35,6 +37,11 @@ GEM
|
|
35
37
|
ruby-progressbar (~> 1.7)
|
36
38
|
unicode-display_width (>= 1.4.0, < 1.7)
|
37
39
|
ruby-progressbar (1.10.1)
|
40
|
+
simplecov (0.17.1)
|
41
|
+
docile (~> 1.1)
|
42
|
+
json (>= 1.8, < 3)
|
43
|
+
simplecov-html (~> 0.10.0)
|
44
|
+
simplecov-html (0.10.2)
|
38
45
|
unicode-display_width (1.6.0)
|
39
46
|
|
40
47
|
PLATFORMS
|
@@ -46,6 +53,7 @@ DEPENDENCIES
|
|
46
53
|
rake (~> 13.0.1)
|
47
54
|
rspec (~> 3.9)
|
48
55
|
rubocop (~> 0.77)
|
56
|
+
simplecov (~> 0.17.1)
|
49
57
|
|
50
58
|
BUNDLED WITH
|
51
59
|
2.1.4
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
|
2
2
|
# 🇮🇹 Municipitaly
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/natydev/municipitaly.png?branch=master)](https://travis-ci.org/natydev/municipitaly)
|
5
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/07a4926100e3df1cdd72/test_coverage)](https://codeclimate.com/github/natydev/municipitaly/test_coverage)
|
6
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/07a4926100e3df1cdd72/maintainability)](https://codeclimate.com/github/natydev/municipitaly/maintainability)
|
7
|
+
[![Gem Version](https://badge.fury.io/rb/municipitaly.svg)](https://badge.fury.io/rb/municipitaly)
|
8
|
+
|
4
9
|
This gem provide various data about 🇮🇹 Italian subdivisions and municipalities. As well the entire updated list of provinces, regions and municipalities names, it provide useful codes (📯 postal code(s), 🌐 [ISTAT](https://www.istat.it/en/) codes, cadastrial code, population, ...).
|
5
10
|
|
6
11
|
## 💾 Installation
|
data/lib/municipitaly/data.rb
CHANGED
@@ -27,5 +27,13 @@ module Municipitaly
|
|
27
27
|
def municipalities
|
28
28
|
@municipalities ||= Search.municipalities_from_province_istat(istat)
|
29
29
|
end
|
30
|
+
|
31
|
+
# returns ISO 3166-2 code for current province.
|
32
|
+
def iso3166_2
|
33
|
+
"IT-#{acronym}"
|
34
|
+
end
|
35
|
+
|
36
|
+
alias_method :iso3166, :iso3166_2
|
37
|
+
|
30
38
|
end
|
31
39
|
end
|
data/lib/municipitaly/search.rb
CHANGED
@@ -118,7 +118,7 @@ module Municipitaly
|
|
118
118
|
|
119
119
|
# returns an array of +Municipitaly::Municipality+ objects from a
|
120
120
|
# <b>municipality name</b> term.
|
121
|
-
# Term can be a partial string and is case insensitive.
|
121
|
+
# Term can be a partial string and is case insensitive.
|
122
122
|
# The optional parameter +greedy+ [boolean] permit to serch exact term
|
123
123
|
# name (if false) or partial word (true by default).
|
124
124
|
#
|
data/lib/municipitaly/version.rb
CHANGED
data/municipitaly.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: municipitaly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NatyDev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.77'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.17.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.17.1
|
69
83
|
description: Codes (postal, istat, cadastrian, ...) about Italian subdivisions and
|
70
84
|
municipalities
|
71
85
|
email:
|