mits 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c7040077920463c9aed2c68049ba8b4e39b0b3d
4
- data.tar.gz: 36e76253b0259646f5dce33adf48bbca7d7dfee7
3
+ metadata.gz: 36eb66918dca7b9b83758d8d5241098cfea66434
4
+ data.tar.gz: 290eb4d8a52c8c57662a9c96481cf1d557368c09
5
5
  SHA512:
6
- metadata.gz: 852bbf0669e289b05c63041e7ba2e3380aa2e49423489d6b36c4941461e51cca29947c085fc2ad42bbd1884fd4fececdc1c67b15dd96a4832924181d36bc0eb7
7
- data.tar.gz: d804dfc67cdb6dfbe147cb6105cfa69ca1df2efd3f0df66710dbea73f9890da1215a9c866211b5fad95bdcb925141f884cad017eb0bfc75c478d8ea5fd424b82
6
+ metadata.gz: 97ec1f49534f9e71869a2fb195f6af3d1759fd69ac19ab4906bcc1dbe7dc34ed4ac858d7223cc7f40b69c6bffefc0548ad2875bd0bda870e999ebc981205325b
7
+ data.tar.gz: 5c34f69334d3afa5e64e799ef5e03d01804910696a3cf7e8a3dfc54dc5b9bc3c1de32bbed69a02c667d566a64a40d701ed0fae89922a33ecc0eecb39c8d1d707
@@ -18,6 +18,7 @@ module MITS
18
18
  private
19
19
 
20
20
  def rooms(tag, type)
21
+ tags = [tags] unless tags.is_a? Array
21
22
  room = tag.find { |t| t[:RoomType] == type }
22
23
  room[:Count] if room
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module MITS
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -203,9 +203,6 @@
203
203
  :DisplayedUnitsAvailable: '0'
204
204
  :TotalRoomCount: '2'
205
205
  :Room:
206
- - :Count: '1'
207
- :Comment: Comment
208
- :RoomType: Bedroom
209
206
  - :Count: '1.00'
210
207
  :Comment: max
211
208
  :RoomType: Bathroom
@@ -210,6 +210,13 @@ module MITS
210
210
  expect(first.rent).to eq 779..979
211
211
  expect(first.sqft).to eq 600..615
212
212
  end
213
+
214
+ it 'handles missing rooms' do
215
+ second = subject[1]
216
+ expect(second).to be_a Floorplan
217
+ expect(second.bathrooms).to eq 1.0
218
+ expect(second.bedrooms).to be_nil
219
+ end
213
220
  end
214
221
  end
215
222
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Callan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-23 00:00:00.000000000 Z
11
+ date: 2015-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_objects