rwanda 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de04553007e96f17ba5c64c47121ec6f1ba9f70d
4
- data.tar.gz: 10bff714e5cd301c7321add3af0f28e34097f713
3
+ metadata.gz: cc2e39aa1b1ecaf3e4945541484aae6904dcef10
4
+ data.tar.gz: 7ed1c0c1605622284fe7212cca706e86614e172e
5
5
  SHA512:
6
- metadata.gz: e6eb6509e493a026f1b98b978ea599eafd2440d2b7b1d76b861f244468a7e33e55d13643ddce21d3a7b04af86771c40547ee2589e69d52d248e432e3b9bc3db8
7
- data.tar.gz: 97fee3c176396e3ec7fcf3a3f7de1b85012c3ad634cac34ce7354d18ffc18bb8d50a36e381d6cfa65513e1bb4d401f855954d391b7e7a3d56f1ecb5a0a661a09
6
+ metadata.gz: cee6c4d0ff7a980c1c97e7edea05126e1dff2f4e81449712bf67b1e1ee127bed5bd76dcd9bc22b850d675c30bc6713c9c33bc98670c282362fa4f4fb1e1e3759
7
+ data.tar.gz: 8ba1a67d2ce1fefe139f9ccbae3284fde789832f57c4ea20ceb610ce539f598509b8914313a7c69243bc0adfe8f1fd6b0ad8cd1887f28b6f54ce18bcd0d2cf67
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.1
4
+
5
+ * Fix error in Location calling exist? instead of valid? and update tests
6
+
3
7
  ## 0.7.0
4
8
 
5
9
  * Add .valid? because the Rails interface needs to accept an empty location as being "like" an .exist?ing one
@@ -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.exists? *divisions
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
@@ -1,3 +1,3 @@
1
1
  class Rwanda
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -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.0
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-02 00:00:00.000000000 Z
11
+ date: 2015-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler