statement 1.9.7 → 1.9.8

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: 4bab0f034ce3f8e3245478d1c26916eecb2568b7
4
- data.tar.gz: 8ed4d8b75a9f5a3405d559ae85ace176208565a5
3
+ metadata.gz: 87d85f7b50d23a90cbdaa02909c6361ec6408afe
4
+ data.tar.gz: 2d30a1e96a897bc211d62c9ed115f8f4eb9495e6
5
5
  SHA512:
6
- metadata.gz: b0c19646e544c3f32f246ac0e310ff1cfdcefa3bdac4e4671becde92f50530a89b352b2287c52fd69dd8713af164ad1b1ed98d988d79d0da23ef09139be7c5ac
7
- data.tar.gz: 57be2d0b8cf7b80d7608896969222f12476dee7050c82d9388f1acbab53c8ce03bc16ccca008fd27e9eae0e50384f5a65103b9e7d5b55114760d5f21da8f7a70
6
+ metadata.gz: 73695668ceca19e07c15001a397a6d67c163faa97fe9023ecae61a3a3200ca507d7b9e9afe5a219c6dc4297d933ef3839502ee823f4aa6efd34cf13e758ff222
7
+ data.tar.gz: ee18e827c2fac4a6b11e13ca2f7c8b6eff5bed5d4b253710906ee8a834f3f4f5fe13fd03bf6a208530279963767e14a6f0de468440d7ede105004c81a0fbb259
@@ -284,10 +284,11 @@ module Statement
284
284
  results
285
285
  end
286
286
 
287
- def self.cold_fusion(year=Date.today.year, month=nil)
287
+ def self.cold_fusion(year=Date.today.year, month=nil, skip_domains=[])
288
288
  results = []
289
289
  year = Date.today.year if not year
290
- domains = ['www.ronjohnson.senate.gov','www.risch.senate.gov', 'www.lee.senate.gov', 'www.barrasso.senate.gov']
290
+ domains = ['www.ronjohnson.senate.gov','www.risch.senate.gov', 'www.lee.senate.gov', 'www.barrasso.senate.gov', 'www.heitkamp.senate.gov']
291
+ domains = domains - skip_domains if skip_domains
291
292
  domains.each do |domain|
292
293
  if domain == 'www.risch.senate.gov'
293
294
  if not month
@@ -310,7 +311,7 @@ module Statement
310
311
  end
311
312
  doc = Statement::Scraper.open_html(url)
312
313
  return if doc.nil?
313
- if domain == 'www.lee.senate.gov' or domain == 'www.barrasso.senate.gov'
314
+ if domain == 'www.lee.senate.gov' or domain == 'www.barrasso.senate.gov' or domain == "www.heitkamp.senate.gov"
314
315
  rows = doc.xpath("//tr")[1..-1]
315
316
  else
316
317
  rows = doc.xpath("//tr")[2..-1]
@@ -319,7 +320,7 @@ module Statement
319
320
  date_text, title = row.children.map{|c| c.text.strip}.reject{|c| c.empty?}
320
321
  next if date_text == 'Date' or date_text.size > 10
321
322
  date = Date.parse(date_text)
322
- results << { :source => url, :url => row.children[3].children.first['href'], :title => title, :date => date, :domain => domain }
323
+ scraped << { :source => url, :url => row.children[3].children.first['href'], :title => title, :date => date, :domain => domain }
323
324
  end
324
325
  end
325
326
  results.flatten
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.9.7"
2
+ VERSION = "1.9.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.9.7
4
+ version: 1.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Willis