statement 1.8.12 → 1.8.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11887e38c50024d57f34d8cad45c37e5a8174d2c
4
- data.tar.gz: 01aeae2a2b01f08f608f18012b9b44ebaf5cccdb
3
+ metadata.gz: d0359fa04917033abb72637f7ccafaeb546c2ed2
4
+ data.tar.gz: e42c5524eda7069f724d8b13cf31e2719e943f30
5
5
  SHA512:
6
- metadata.gz: c54a70ca1a3cb4e5443066399e58eaa050a0c279058f4661159408bbb0b04fd1be925af381c0e11fbb4ee9a7e2227d643571429e63cc021a1328f911eeae79e6
7
- data.tar.gz: be6be104d5c6d0887f47c9187c05695626eebb3c18f8fb1d601651c7fb682b4d209d528bd4926d5d5c739205a23345724d8de483fac048894d821c8e8f33d766
6
+ metadata.gz: 7ec9a58e1dcd44699921070b4c06c4f872fa8cb3715b4bedffa4db72f69653328179187b966cbe7f72e00b621ab47e434cc1592883197d7ca14e758e640b882f
7
+ data.tar.gz: 38890a5cf6fb5b17a369a03a4456310f4e63acd6d78871d59082224748df3bbf438d6ca7eb13e49d0813860ddd2c6bde8a1b28149f3062cc2fa39823518df2bc
@@ -29,7 +29,7 @@ module Statement
29
29
  end
30
30
 
31
31
  def self.member_methods
32
- [:crenshaw, :capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :vitter, :donnelly, :inhofe, :palazzo, :roe, :document_query, :swalwell, :fischer, :clark, :edwards, :culberson_chabot_grisham, :barton, :wolf_sherman_mccaul, :welch, :sessions, :gabbard, :ellison, :costa, :farr, :mcclintock, :mcnerney, :olson]
32
+ [:crenshaw, :capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :vitter, :inhofe, :palazzo, :roe, :document_query, :swalwell, :fischer, :clark, :edwards, :culberson_chabot_grisham, :barton, :wolf_sherman_mccaul, :welch, :sessions, :gabbard, :ellison, :costa, :farr, :mcclintock, :mcnerney, :olson]
33
33
  end
34
34
 
35
35
  def self.committee_methods
@@ -39,8 +39,8 @@ module Statement
39
39
  def self.member_scrapers
40
40
  year = Date.today.year
41
41
  results = [crenshaw, capuano, cold_fusion(year, nil), conaway, chabot, susandavis, klobuchar(year), palazzo(page=1), roe(page=1), billnelson(year=year),
42
- document_query(page=1), document_query(page=2), swalwell(page=1), donnelly(year=year), crapo, coburn, boxer(start=1),
43
- vitter(year=year), inhofe(year=year), fischer, clark(year=year), edwards, culberson_chabot_grisham(page=1), barton, wolf_sherman_mccaul, welch,
42
+ document_query(page=1), document_query(page=2), swalwell(page=1), crapo, coburn, boxer(start=1),
43
+ vitter(year=year), inhofe(year=2014), fischer, clark(year=year), edwards, culberson_chabot_grisham(page=1), barton, wolf_sherman_mccaul, welch,
44
44
  sessions(year=year), gabbard, pryor, ellison(page=0), costa, farr, mcclintock, olson, mcnerney].flatten
45
45
  results = results.compact
46
46
  Utils.remove_generic_urls!(results)
@@ -459,6 +459,7 @@ module Statement
459
459
  results
460
460
  end
461
461
 
462
+ # deprecated
462
463
  def self.donnelly(year=Date.today.year)
463
464
  results = []
464
465
  url = "http://www.donnelly.senate.gov/newsroom/"
@@ -478,9 +479,11 @@ module Statement
478
479
  domain = "www.inhofe.senate.gov"
479
480
  doc = open_html(url)
480
481
  return if doc.nil?
481
- doc.xpath("//tr")[1..-1].each do |row|
482
- next if row.text.strip.size < 30
483
- results << { :source => url, :url => row.children[3].children[0]['href'].strip, :title => row.children[3].text, :date => Date.strptime(row.children[1].text, "%m/%d/%y"), :domain => domain}
482
+ if doc.xpath("//tr")[1..-1]
483
+ doc.xpath("//tr")[1..-1].each do |row|
484
+ next if row.text.strip.size < 30
485
+ results << { :source => url, :url => row.children[3].children[0]['href'].strip, :title => row.children[3].text, :date => Date.strptime(row.children[1].text, "%m/%d/%y"), :domain => domain}
486
+ end
484
487
  end
485
488
  results
486
489
  end
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.8.12"
2
+ VERSION = "1.8.13"
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.8.12
4
+ version: 1.8.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Willis