hulse 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/hulse/senate_vote.rb +1 -0
- data/lib/hulse/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e3f583aa3f033ea1521592d7fa1e9ef68595c90
|
4
|
+
data.tar.gz: 25837d1ae234c7a1d3b665c6d9a145304264aecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
=>
|
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
|
data/lib/hulse/senate_vote.rb
CHANGED
@@ -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
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.
|
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-
|
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.
|
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
|