statement 1.0.13 → 1.0.14

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.
@@ -29,7 +29,7 @@ module Statement
29
29
  end
30
30
 
31
31
  def self.member_methods
32
- [:capuano, :cold_fusion, :conaway, :susandavis, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold, :swalwell, :fischer]
32
+ [:capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold, :swalwell, :fischer]
33
33
  end
34
34
 
35
35
  def self.committee_methods
@@ -38,7 +38,7 @@ module Statement
38
38
 
39
39
  def self.member_scrapers
40
40
  year = Date.today.year
41
- results = [freshman_senators, capuano, cold_fusion(year, 0), conaway, susandavis, klobuchar, lujan, palazzo(page=1), billnelson(year=year),
41
+ results = [freshman_senators, capuano, cold_fusion(year, 0), conaway, chabot, susandavis, klobuchar, lujan, palazzo(page=1), billnelson(year=year),
42
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, fischer].flatten
44
44
  results = results.compact
@@ -264,7 +264,7 @@ module Statement
264
264
  domains = ['crenshaw.house.gov', 'www.ronjohnson.senate.gov/public/','www.hoeven.senate.gov/public/','www.moran.senate.gov/public/','www.risch.senate.gov/public/']
265
265
  domains.each do |domain|
266
266
  if domain == 'crenshaw.house.gov' or domain == 'www.risch.senate.gov/public/'
267
- url = "http://"+domain + "index.cfm/pressreleases?YearDisplay=#{year}&MonthDisplay=#{month}&page=1"
267
+ url = "http://"+domain + "/index.cfm/pressreleases?YearDisplay=#{year}&MonthDisplay=#{month}&page=1"
268
268
  elsif domain == 'www.hoeven.senate.gov/public/' or domain == 'www.moran.senate.gov/public/'
269
269
  url = "http://"+domain + "index.cfm/news-releases?YearDisplay=#{year}&MonthDisplay=#{month}&page=1"
270
270
  else
@@ -274,7 +274,7 @@ module Statement
274
274
  return if doc.nil?
275
275
  doc.xpath("//tr")[2..-1].each do |row|
276
276
  date_text, title = row.children.map{|c| c.text.strip}.reject{|c| c.empty?}
277
- next if date_text == 'Date' or date_text.size > 8
277
+ next if date_text == 'Date' or date_text.size > 10
278
278
  date = Date.parse(date_text)
279
279
  results << { :source => url, :url => row.children[2].children.first['href'], :title => title, :date => date, :domain => domain }
280
280
  end
@@ -294,6 +294,17 @@ module Statement
294
294
  results
295
295
  end
296
296
 
297
+ def self.chabot(year=Date.today.year)
298
+ results = []
299
+ base_url = "http://chabot.house.gov/news/"
300
+ url = base_url + "documentquery.aspx?DocumentTypeID=2508&Year=#{year}"
301
+ doc = open_html(url)
302
+ return if doc.nil?
303
+ doc.xpath("//li")[38..43].each do |row|
304
+ results << { :source => url, :url => base_url + row.children[1]['href'], :title => row.children[1].children.text.strip, :date => Date.parse(row.children[3].text.strip), :domain => "chabot.house.gov" }
305
+ end
306
+ end
307
+
297
308
  def self.susandavis
298
309
  results = []
299
310
  base_url = "http://www.house.gov/susandavis/"
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.0.13"
2
+ VERSION = "1.0.14"
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.13
4
+ version: 1.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -214,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  segments:
216
216
  - 0
217
- hash: 74930460700658003
217
+ hash: 2448210835225084051
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: 74930460700658003
226
+ hash: 2448210835225084051
227
227
  requirements: []
228
228
  rubyforge_project:
229
229
  rubygems_version: 1.8.25