rwanda 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rwanda/location.rb +1 -1
- data/lib/rwanda/version.rb +1 -1
- data/spec/location_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc2e39aa1b1ecaf3e4945541484aae6904dcef10
|
4
|
+
data.tar.gz: 7ed1c0c1605622284fe7212cca706e86614e172e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee6c4d0ff7a980c1c97e7edea05126e1dff2f4e81449712bf67b1e1ee127bed5bd76dcd9bc22b850d675c30bc6713c9c33bc98670c282362fa4f4fb1e1e3759
|
7
|
+
data.tar.gz: 8ba1a67d2ce1fefe139f9ccbae3284fde789832f57c4ea20ceb610ce539f598509b8914313a7c69243bc0adfe8f1fd6b0ad8cd1887f28b6f54ce18bcd0d2cf67
|
data/CHANGELOG.md
CHANGED
data/lib/rwanda/location.rb
CHANGED
@@ -6,7 +6,7 @@ class Location < Struct.new(:district, :sector, :cell, :village)
|
|
6
6
|
def n_divisions; divisions.count; end
|
7
7
|
|
8
8
|
def valid? # is it valid?
|
9
|
-
Rwanda.instance.
|
9
|
+
Rwanda.instance.valid? *divisions
|
10
10
|
end
|
11
11
|
def validate! # get rid of invalid data
|
12
12
|
# NOT WORKING BECAUSE CP! DOESN'T WORK
|
data/lib/rwanda/version.rb
CHANGED
data/spec/location_spec.rb
CHANGED
@@ -7,6 +7,7 @@ describe Location do
|
|
7
7
|
village = Location.new 'Karongi','Bwishyura','Kiniha','Nyarurembo'
|
8
8
|
none = Location.new
|
9
9
|
invalid = Location.new 'Karongi', 'Kiniha', 'Bwishyura', 'Nyarurembo'
|
10
|
+
null = Location.new nil, nil, nil, nil
|
10
11
|
|
11
12
|
describe '.top, .bottom, upto, downto' do
|
12
13
|
it 'can list the divisions up or down to a certain level' do
|
@@ -31,6 +32,7 @@ describe Location do
|
|
31
32
|
describe 'valid? and validate!' do
|
32
33
|
it 'can tell if a location is valid, and clean invalid information' do
|
33
34
|
expect(cell.valid?).to eq true
|
35
|
+
expect(null.valid?).to eq true
|
34
36
|
expect(invalid.valid?).to eq false
|
35
37
|
|
36
38
|
fixed = invalid.validate!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Hetherington
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|