hulse 0.2 → 0.3

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: 15df258b833015587148bb55dc2ac84eed7b0847
4
- data.tar.gz: c5c0342fc6cd999ffc09ef37cfeba1ae12c859de
3
+ metadata.gz: 7e3f583aa3f033ea1521592d7fa1e9ef68595c90
4
+ data.tar.gz: 25837d1ae234c7a1d3b665c6d9a145304264aecb
5
5
  SHA512:
6
- metadata.gz: 61de40fec032187360350d9392bd57899f2decd9ef8b676fe74893aebb31610e1d10820f79061e477d71c59f2cc6a31b494f040dacdf128d740d7b69fbe57ce2
7
- data.tar.gz: 870095110842826ce38ad502fb6ac1d69f34837d7a6dbe5b77235609437f4b0aa4ab1a482d608244bbf00e4a23ee4561eab17b854b705ada8e58280f653a6a4f
6
+ metadata.gz: 0f594dcb5a9e8d88aab795965d1fe0ec5da794bebd6bbd3405d5240d93ddcc010c33c897ddc06f75601224535d6a8ec78e0eb16147a61053ab87cf990586318a
7
+ data.tar.gz: 06676904a50ce89268890b3a952a1f6f997dc3efaa910c1984ce5ba6ca94edee7dddaaa2c2841cdf4a6efe37515e0eaac957463b5b26738d420935ef7c4a1b4b
data/README.md CHANGED
@@ -43,7 +43,7 @@ For Senate votes, you can grab a year's SenateVote objects (with a limited set o
43
43
  ```ruby
44
44
  2.0.0p353 :006 > senate_2013 = SenateVote.summary(2013)
45
45
  2.0.0p353 :007 > senate_2013.first
46
- => #<Hulse::SenateVote:0x000001017f0d58 @congress=113, @session=1, @year=2013, @vote_number="00291", @vote_date=<Date: 2013-12-20 ((2456647j,0s,0n),+0s,2299161j)>, @issue="PN921", @question="On the Cloture Motion", @vote_result="Agreed to", @vote_count={:yeas=>"59", :nays=>"34"}, @vote_title="Motion to Invoke Cloture on the Nomination of Janet L. Yellen to be Chairman of the Board of Governors of the Federal Reserve System">
46
+ => <Hulse::SenateVote:0x000001017f0d58 @congress=113, @session=1, @year=2013, @vote_number="00291", @vote_date=<Date: 2013-12-20 ((2456647j,0s,0n),+0s,2299161j)>, @issue="PN921", @question="On the Cloture Motion", @vote_result="Agreed to", @vote_count={:yeas=>"59", :nays=>"34"}, @vote_title="Motion to Invoke Cloture on the Nomination of Janet L. Yellen to be Chairman of the Board of Governors of the Federal Reserve System">
47
47
  ```
48
48
 
49
49
  ## Authors
@@ -48,6 +48,7 @@ module Hulse
48
48
  congress, session = Hulse::Utils.convert_year_to_congress_and_session(year)
49
49
  url = "http://www.senate.gov/legislative/LIS/roll_call_lists/vote_menu_#{congress}_#{session}.xml"
50
50
  response = HTTParty.get(url)
51
+ return nil if response.code == 404
51
52
  votes = response.parsed_response['vote_summary']['votes']['vote']
52
53
  votes.map{|v| self.new(congress: congress, session: session, year: year, vote_number: v['vote_number'], vote_date: Date.strptime(v['vote_date']+"-#{year}", "%d-%b-%Y"), issue: v['issue'],
53
54
  question: v['question'], vote_result: v['result'], vote_count: v['vote_tally'].inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}, vote_title: v['title'])}
data/lib/hulse/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hulse
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hulse
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Willis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-01 00:00:00.000000000 Z
11
+ date: 2014-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.2.0
106
+ rubygems_version: 2.1.9
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Hulse is a Ruby gem for accessing House and Senate roll call votes from the