national-rail 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -140,7 +140,7 @@ module NationalRail
140
140
 
141
141
  (times_page.doc/"table#outboundJourneyTable > tbody > tr").reject { |tr| %w(status changes).include?(tr.attributes["class"].value) }.each do |tr|
142
142
 
143
- if (tr.attributes["class"] == "day-heading")
143
+ if (tr.attributes["class"].value == "day-heading")
144
144
  date = Date.parse((tr/"th > p > span").first.inner_text.strip)
145
145
  next
146
146
  end
@@ -151,7 +151,7 @@ module NationalRail
151
151
  anchor = (tr/"a[@id^=journeyOption]").first
152
152
  next unless anchor
153
153
 
154
- link = times_page.links.detect { |l| l.attributes["id"] == anchor["id"] }
154
+ link = times_page.links.detect { |l| l.attributes["id"] == anchor.attributes["id"].value }
155
155
 
156
156
  summary_rows << SummaryRow.new(@agent, date, departure_time, number_of_changes, link)
157
157
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 7
9
- version: 0.3.7
8
+ - 8
9
+ version: 0.3.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - James Mead