statement 1.8.3 → 1.8.4

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: e375abfba0bb23af1f88d5e173d733be721812d0
4
- data.tar.gz: 940caf3ae981d72dcd52ca74f0e1d74956366246
3
+ metadata.gz: caf83aca4541f8bdfef2f9256fd44b54b26b8d08
4
+ data.tar.gz: d5fe5928f56b30f0d158ad4d6913c2edad187df6
5
5
  SHA512:
6
- metadata.gz: 40162f16dbc4add1c4cc8fdfe6b701f5716e657d8378495c64cf76779e581b75164a020569f171b9e0bde16b0792ca1e63e3baa7c69baf655a172d05ed43068e
7
- data.tar.gz: 5e6f07db5351d92918e98078e9aaab580f5ada68d96dc4857ea3801e798a0f99f13f88853af1fea07496c4037498a5f13f7ee14e3eef1aa743aa59ed66daefa2
6
+ metadata.gz: 68f37cf991dbef6bad0e3876172c536d2e4b2bf93ae1878151ba88717338b2321ceb062a0e6899ae1a8e82fa9f129f4e54a995b04a21957fd5444b82b44eda91
7
+ data.tar.gz: 84ebb02522231bcef565e232aeca3d97e1753e75003bfbfbd19647f3a9ccf038f0f53f92ce318189fabffb3b7075ff158d5d21bab50a58648293394afad931ee
data/README.md CHANGED
@@ -54,6 +54,8 @@ puts results.first
54
54
  {:source=>"http://blumenauer.house.gov/index.php?option=com_bca-rss-syndicator&feed_id=1", :url=>"http://blumenauer.house.gov/index.php?option=com_content&amp;view=article&amp;id=2203:blumenauer-qwe-need-a-national-system-that-speaks-to-the-transportation-challenges-of-todayq&amp;catid=66:2013-press-releases", :title=>"Blumenauer: &quot;We need a national system that speaks to the transportation challenges of ...", :date=>#<Date: 2013-04-24 ((2456407j,0s,0n),+0s,2299161j)>, :domain=>"blumenauer.house.gov"}
55
55
  ```
56
56
 
57
+ Statement will try to parse a date if an RSS feed contains a `PubDate` element; if not it will return `nil`.
58
+
57
59
  If you have a batch of RSS URLs, you can pass them to Feed's `batch` class method, which will use Typhoeus to fetch them in parallel and returns a two-element array of results and failed urls:
58
60
 
59
61
  ```ruby
@@ -41,6 +41,8 @@ module Statement
41
41
  Date.parse(link.xpath('pubDate').text)
42
42
  elsif !link.xpath('pubdate').empty?
43
43
  Date.parse(link.xpath('pubdate').text)
44
+ elsif link.xpath('link').text.include?("mikulski.senate.gov") and link.xpath('link').text.include?("-2014")
45
+ Date.parse(link.xpath('link').text.split('/').last.split('-', -1).first(3).join('/').split('.cfm').first)
44
46
  else
45
47
  nil
46
48
  end
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.8.3"
2
+ VERSION = "1.8.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statement
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Willis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-13 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler