statement 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ module Statement
29
29
  end
30
30
 
31
31
  def self.member_methods
32
- [:capuano, :cold_fusion, :conaway, :susandavis, :faleomavaega, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold]
32
+ [:capuano, :cold_fusion, :conaway, :susandavis, :faleomavaega, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold, :swalwell]
33
33
  end
34
34
 
35
35
  def self.committee_methods
@@ -39,7 +39,7 @@ module Statement
39
39
  def self.member_scrapers
40
40
  year = Date.today.year
41
41
  results = [freshman_senators, capuano, cold_fusion(year, 0), conaway, susandavis, faleomavaega, klobuchar, lujan, palazzo(page=1), billnelson(year=year),
42
- document_query(page=1), document_query(page=2), farenthold(year), donnelly(year=year), crapo, coburn, boxer(start=1), mccain(year=year),
42
+ document_query(page=1), document_query(page=2), farenthold(year), swalwell(page=1), donnelly(year=year), crapo, coburn, boxer(start=1), mccain(year=year),
43
43
  vitter(year=year), inhofe(year=year), reid].flatten
44
44
  Utils.remove_generic_urls!(results)
45
45
  end
@@ -47,7 +47,7 @@ module Statement
47
47
  def self.backfill_from_scrapers
48
48
  results = [cold_fusion(2012, 0), cold_fusion(2011, 0), cold_fusion(2010, 0), billnelson(year=2012), document_query(page=3),
49
49
  document_query(page=4), coburn(year=2012), coburn(year=2011), coburn(year=2010), boxer(start=11), boxer(start=21),
50
- boxer(start=31), boxer(start=41), mccain(year=2012), mccain(year=2011), vitter(year=2012), vitter(year=2011),
50
+ boxer(start=31), boxer(start=41), mccain(year=2012), mccain(year=2011), vitter(year=2012), vitter(year=2011), swalwell(page=2), swalwell(page=3)
51
51
  ].flatten
52
52
  Utils.remove_generic_urls!(results)
53
53
  end
@@ -227,6 +227,17 @@ module Statement
227
227
 
228
228
  ## special cases for members without RSS feeds
229
229
 
230
+ def self.swalwell(page=1)
231
+ results = []
232
+ url = "http://swalwell.house.gov/category/press-releases/page/#{page}/"
233
+ doc = open_html(url)
234
+ return if doc.nil?
235
+ doc.xpath("//h3")[0..4].each do |row|
236
+ results << { :source => url, :url => row.children[0]['href'], :title => row.children[0].text, :date => nil, :domain => 'swalwell.house.gov'}
237
+ end
238
+ results
239
+ end
240
+
230
241
  def self.capuano
231
242
  results = []
232
243
  base_url = "http://www.house.gov/capuano/news/"
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statement
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-16 00:00:00.000000000 Z
12
+ date: 2013-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -214,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  segments:
216
216
  - 0
217
- hash: -1372506109744034724
217
+ hash: 3380739865513857400
218
218
  required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  none: false
220
220
  requirements:
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  segments:
225
225
  - 0
226
- hash: -1372506109744034724
226
+ hash: 3380739865513857400
227
227
  requirements: []
228
228
  rubyforge_project:
229
229
  rubygems_version: 1.8.25