chiketto 0.2.0 → 0.3.0

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: 131a170fb06a5ed5d165c9991303144803a26ea8
4
- data.tar.gz: 493b872900bbdeaa3cdb543882d21d5aaae0506d
3
+ metadata.gz: a8cb265433f878c1e6fc45a09bcce53bf0d351eb
4
+ data.tar.gz: 96565f16f1e8fb81feadfa080b999a1df750d1d5
5
5
  SHA512:
6
- metadata.gz: 22065b1be117ebaf4a42be8e96c00a64f23108ca8d5cdce71e0ae90f41a060f5946955d4413d5070562fbe864462f5f9a9f935c0c1d6be15dfbe7a1f8c9d3bee
7
- data.tar.gz: 039b535a604e1f8f36e3bba78073adaeca13ca4160e025b4dc8732650580012adca92ccc917dfe4046dd54a336ed43eaf4f17b466d743748455e426ded6fb519
6
+ metadata.gz: a39155cbf2e0d066464e95a540a020845d0ae29dd64bea4777d44849729cd0b982aac649025e836a6a5eccbc4601e2716a3c647af80cef01673050c058f109bd
7
+ data.tar.gz: d5d4ad738a85eef6767802c251898813abc1800459dc10093b66b875454ffa98798a21ca4097ad44d5f769f3db2ee098abff13af95e496c1e558448456cfb425
@@ -13,11 +13,5 @@ module Chiketto
13
13
  def profile
14
14
  AttendeeProfile.new @profile.to_h
15
15
  end
16
-
17
- def addresses
18
- @addresses.to_h.inject({}) do |hash, (key, address)|
19
- hash.merge(key.to_sym => Address.new(address.to_h))
20
- end
21
- end
22
16
  end
23
17
  end
@@ -14,5 +14,11 @@ module Chiketto
14
14
  :gender,
15
15
  :birth_date,
16
16
  :cell_phone
17
+
18
+ def addresses
19
+ @addresses.to_h.inject({}) do |hash, (key, address)|
20
+ hash.merge(key.to_sym => Address.new(address.to_h))
21
+ end
22
+ end
17
23
  end
18
24
  end
@@ -1,3 +1,3 @@
1
1
  module Chiketto
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -17,5 +17,12 @@ class AttendeeProfileTest < MiniTest::Test
17
17
  assert_respond_to attendee_profile, :gender
18
18
  assert_respond_to attendee_profile, :birth_date
19
19
  assert_respond_to attendee_profile, :cell_phone
20
+ assert_respond_to attendee_profile, :addresses
21
+ end
22
+
23
+ def test_addresses_returns_an_addresses_array
24
+ attendee = Chiketto::AttendeeProfile.new addresses: { home: {} }
25
+ assert_kind_of Hash, attendee.addresses
26
+ assert_kind_of Chiketto::Address, attendee.addresses.values.first
20
27
  end
21
28
  end
@@ -9,7 +9,6 @@ class AttendeeTest < MiniTest::Test
9
9
  assert_respond_to attendee, :profile
10
10
  assert_respond_to attendee, :event_id
11
11
  assert_respond_to attendee, :order_id
12
- assert_respond_to attendee, :addresses
13
12
  assert_respond_to attendee, :assigned_number
14
13
  end
15
14
 
@@ -25,12 +24,6 @@ class AttendeeTest < MiniTest::Test
25
24
  assert_kind_of Chiketto::AttendeeProfile, attendee.profile
26
25
  end
27
26
 
28
- def test_addresses_returns_an_addresses_array
29
- attendee = Chiketto::Attendee.new addresses: { home: {} }
30
- assert_kind_of Hash, attendee.addresses
31
- assert_kind_of Chiketto::Address, attendee.addresses.values.first
32
- end
33
-
34
27
  def test_assigned_number_is_handled
35
28
  attendee = Chiketto::Attendee.new assigned_number: 1
36
29
  assert_equal attendee.assigned_number, 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chiketto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Radford
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-19 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler