statement 0.7.4 → 0.7.5

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.
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "0.7.4"
2
+ VERSION = "0.7.5"
3
3
  end
data/lib/statement.rb CHANGED
@@ -30,7 +30,7 @@ module Statement
30
30
  end
31
31
 
32
32
  def self.date_from_rss_item(link)
33
- if !link.xpath('pubDate').text.blank?
33
+ if !link.xpath('pubDate').text.empty?
34
34
  Date.parse(link.xpath('pubDate').text)
35
35
  elsif !link.xpath('pubdate').empty?
36
36
  Date.parse(link.xpath('pubdate').text)
@@ -46,6 +46,7 @@ module Statement
46
46
  links.map do |link|
47
47
  abs_link = absolute_link(url, link.xpath('link').text)
48
48
  abs_link = "http://www.burr.senate.gov/public/"+ link.xpath('link').text if url == 'http://www.burr.senate.gov/public/index.cfm?FuseAction=RSS.Feed'
49
+ abs_link = link.xpath('link').text[37..-1] if url == "http://www.johanns.senate.gov/public/?a=RSS.Feed"
49
50
  { :source => url, :url => abs_link, :title => link.xpath('title').text, :date => date_from_rss_item(link), :domain => URI.parse(url).host }
50
51
  end
51
52
  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: 0.7.4
4
+ version: 0.7.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  segments:
131
131
  - 0
132
- hash: -711240942217617156
132
+ hash: -672742253743525613
133
133
  required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  none: false
135
135
  requirements:
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  segments:
140
140
  - 0
141
- hash: -711240942217617156
141
+ hash: -672742253743525613
142
142
  requirements: []
143
143
  rubyforge_project:
144
144
  rubygems_version: 1.8.24