confidence 0.5.1 → 0.5.2

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.
@@ -1,7 +1,7 @@
1
1
  require 'httparty'
2
2
 
3
3
  module Confidence
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
 
6
6
  class Vote
7
7
  def self.fetch(attrs={})
@@ -34,6 +34,10 @@ module Confidence
34
34
  @doc['Context']['Para']
35
35
  end
36
36
 
37
+ def sponsor
38
+ @doc['Sponsor']
39
+ end
40
+
37
41
  def participants
38
42
  @doc['Participant'].map {|p| Participant.new(p) }
39
43
  end
@@ -19,6 +19,7 @@ VOTE_DATA = Crack::XML.parse(
19
19
  assert_respond_to @vote, :number
20
20
  assert_respond_to @vote, :decision
21
21
  assert_respond_to @vote, :context
22
+ assert_respond_to @vote, :sponsor
22
23
  assert_respond_to @vote, :doc
23
24
  end
24
25
 
@@ -51,6 +52,10 @@ VOTE_DATA = Crack::XML.parse(
51
52
  assert_equal 271, @vote.participants.size
52
53
  assert_kind_of Participant, @vote.participants.first
53
54
  end
55
+
56
+ test "vote sponsor" do
57
+ assert_equal "Mr. Day (Minister of International Trade and Minister for the Asia-Pacific Gateway)", @vote.sponsor
58
+ end
54
59
 
55
60
  test "vote bill" do
56
61
  assert_equal 'C-2', @vote.bill.number
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 1
9
- version: 0.5.1
8
+ - 2
9
+ version: 0.5.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - chebuctonian
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-22 00:00:00 -04:00
18
+ date: 2010-03-23 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency