fec_results 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -80,10 +80,10 @@ module FecResults
80
80
 
81
81
  def state_electoral_and_popular_vote_summary_2008(options={})
82
82
  results = []
83
- t = RemoteTable.new(FecResults::SUMMARY_URLS[year.to_s], :sheet => 'Table 2. Pres Elec & Pop Vote', :skip => 2)
83
+ t = RemoteTable.new(FecResults::SUMMARY_URLS[year.to_s], :sheet => 'Table 2. Electoral & Pop Vote', :skip => 4, :headers => false)
84
84
  t.entries.each do |row|
85
85
  break if row[0] == 'Total:'
86
- results << OpenStruct.new(:state => row['STATE'], :democratic_electoral_votes => row['Electoral Vote Kerry (D)'].to_i, :republican_electoral_votes => row['Electoral Vote Bush (R)'].to_i, :democratic_popular_votes => row['Popular Vote Kerry (D)'].to_i, :republican_popular_votes => row['Popular Vote Bush (R)'].to_i, :other_popular_votes => row['Popular Vote All Others'].to_i, :total_votes => row['Popular Vote Total Vote'].to_i)
86
+ results << OpenStruct.new(:state => row[0], :democratic_electoral_votes => row[1].to_i, :republican_electoral_votes => row[2].to_i, :democratic_popular_votes => row[3].to_i, :republican_popular_votes => row[4].to_i, :other_popular_votes => row[5].to_i, :total_votes => row[6].to_i)
87
87
  end
88
88
  results
89
89
  end
@@ -1,3 +1,3 @@
1
1
  module FecResults
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fec_results
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  segments:
112
112
  - 0
113
- hash: 2584814456849542775
113
+ hash: 363605388240789509
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  none: false
116
116
  requirements:
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: 2584814456849542775
122
+ hash: 363605388240789509
123
123
  requirements: []
124
124
  rubyforge_project:
125
125
  rubygems_version: 1.8.25