rwanda 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/CHANGELOG.md +6 -1
- data/README.md +40 -13
- data/lib/rwanda/version.rb +1 -1
- data/rwanda.gemspec +3 -1
- data/spec/spec_helper.rb +3 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a00b6d65c44a7f85e5a71b0dddb5841bbf92659
|
4
|
+
data.tar.gz: c9b1891159f33205c1f522834549ac970db920b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 423d6dc096c803a290c1e485a88d4ec086d93de02c843a119432b755f661bd288a8cd34061b6f104ba53b2efa210a38bf10f9f02ac0607f5a69910d76f99d472
|
7
|
+
data.tar.gz: 829894ae447be99a0c6123e955db6c071866333ae7a9cd5043ce582cb2f78009ba4d0c99aee3cf53ac7214ba4b0f8a1b54d27e0e8e90a9cc5e6bef4782d5aa57
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.7.2
|
4
|
+
|
5
|
+
* Add Coveralls and Travis CI
|
6
|
+
* Remove pretence at support for 1.9.3 (gem depends on to_h for Struct)
|
7
|
+
|
3
8
|
## 0.7.1
|
4
9
|
|
5
|
-
|
10
|
+
* Fix error in Location calling exist? instead of valid? and update tests
|
6
11
|
|
7
12
|
## 0.7.0
|
8
13
|
|
data/README.md
CHANGED
@@ -27,23 +27,50 @@ Then you can try it on the command line:
|
|
27
27
|
## Status
|
28
28
|
|
29
29
|
[![Gem Version](https://badge.fury.io/rb/rwanda.svg)](http://badge.fury.io/rb/rwanda)
|
30
|
+
[![Coverage Status](https://coveralls.io/repos/repent/rwanda/badge.svg)](https://coveralls.io/r/repent/rwanda)
|
31
|
+
[![Build Status](https://travis-ci.org/repent/rwanda.svg?branch=master)](https://travis-ci.org/repent/rwanda)
|
32
|
+
[![Code Climate](https://codeclimate.com/github/repent/rwanda/badges/gpa.svg)](https://codeclimate.com/github/repent/rwanda)
|
30
33
|
|
31
34
|
## Usage
|
32
35
|
|
33
36
|
```ruby
|
34
|
-
rw
|
35
|
-
|
36
|
-
rw.
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
[2] pry(main)> rw=Rwanda.instance
|
38
|
+
=> #<Rwanda:0x007f00ea48cf28 ... >
|
39
|
+
[3] pry(main)> rw.where_is? 'Gasabo'
|
40
|
+
Rwanda has 1 district, 0 sectors, 1 cell, and 8 villages called Gasabo:
|
41
|
+
Gasabo is a village in Kimaranzara Cell, Rilima Sector, Bugesera District, Eastern Province
|
42
|
+
Gasabo is a village in Butiruka Cell, Remera Sector, Gatsibo District, Eastern Province
|
43
|
+
Gasabo is a village in Kiyovu Cell, Ndego Sector, Kayonza District, Eastern Province
|
44
|
+
Gasabo is a village in Nkondo Cell, Rwinkwavu Sector, Kayonza District, Eastern Province
|
45
|
+
Gasabo is a village in Kazizi Cell, Nyamugari Sector, Kirehe District, Eastern Province
|
46
|
+
Gasabo is a district in Kigali City
|
47
|
+
Gasabo is a cell in Rutunga Sector, Gasabo District, Kigali City
|
48
|
+
Gasabo is a village in Nyanza Cell, Gatenga Sector, Kicukiro District, Kigali City
|
49
|
+
Gasabo is a village in Kabeza Cell, Kanombe Sector, Kicukiro District, Kigali City
|
50
|
+
Gasabo is a village in Kabuguru II Cell, Rwezamenyo Sector, Nyarugenge District, Kigali City
|
51
|
+
=> nil
|
52
|
+
[4] pry(main)> rw.provinces
|
53
|
+
=> ["Eastern Province", "Kigali City", "Northern Province", "Southern Province", "Western Province"]
|
54
|
+
[5] pry(main)> rw.sectors_of 'Gasabo'
|
55
|
+
=> ["Bumbogo", "Gatsata", "Gikomero", "Gisozi", "Jabana", "Jali", "Kacyiru", "Kimihurura", "Kimironko", "Kinyinya", "Ndera", "Nduba", "Remera", "Rusororo", "Rutunga"]
|
56
|
+
[6] pry(main)> rw.district_of 'Giheke'
|
57
|
+
=> "Rusizi"
|
58
|
+
[7] pry(main)> rw.sector_like 'Rukuma'
|
59
|
+
RuntimeError: can't modify frozen #<Class:#<Rwanda:0x007f00ea48cf28>>
|
60
|
+
from /home/slack/vendor/bundle/gems/rwanda-0.7.1/lib/rwanda.rb:87:in `sectors'
|
61
|
+
[8] pry(main)> rw.is_district? 'Karongi'
|
62
|
+
=> true
|
63
|
+
[9] pry(main)> rw.is_sector? 'Gashari'
|
64
|
+
=> true
|
65
|
+
[10] pry(main)> rw.is_cell? 'Musasa'
|
66
|
+
=> true
|
67
|
+
[11] pry(main)> rw.is_village? 'Kaduha'
|
68
|
+
=> true
|
69
|
+
[12] pry(main)> # Rwanda#exist?(district, sector, cell, village)
|
70
|
+
[13] pry(main)> rw.exist?('Karongi','Bwishyura','Kiniha','Nyarurembo')
|
71
|
+
=> true
|
72
|
+
[14] pry(main)> rw.exist?('Karongi','Bwishyura','Nyarurembo')
|
73
|
+
=> false
|
47
74
|
```
|
48
75
|
|
49
76
|
Geographic information kindly provided by [MINALOC](http://www.minaloc.gov.rw/). There are some minor spelling differences between this data and other sources available at sector level (I have not had any other source to compare with at cell and village level). In particular the following sectors seem to have alternative spellings:
|
data/lib/rwanda/version.rb
CHANGED
data/rwanda.gemspec
CHANGED
@@ -18,11 +18,13 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>=
|
21
|
+
spec.required_ruby_version = '>= 2.0.0'
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.7"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
spec.add_development_dependency "rspec"
|
26
26
|
spec.add_development_dependency "pry", "~> 0.10.1"
|
27
|
+
spec.add_development_dependency "coveralls"
|
28
|
+
|
27
29
|
spec.add_runtime_dependency "fuzzy_match", "~> 2.1.0"
|
28
30
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rwanda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Hetherington
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.10.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: fuzzy_match
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +102,7 @@ extensions: []
|
|
88
102
|
extra_rdoc_files: []
|
89
103
|
files:
|
90
104
|
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
91
106
|
- CHANGELOG.md
|
92
107
|
- Gemfile
|
93
108
|
- LICENSE.txt
|
@@ -117,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
132
|
requirements:
|
118
133
|
- - ">="
|
119
134
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
135
|
+
version: 2.0.0
|
121
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
137
|
requirements:
|
123
138
|
- - ">="
|