national-rail 0.3.1 → 0.3.2

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.
@@ -52,7 +52,9 @@ module NationalRail
52
52
  def parse_details(page, date)
53
53
  details = {}
54
54
  description = (page.doc/"table#journeyLegDetails tbody tr.lastRow td[@colspan=6] div").last.inner_text.gsub(/\s+/, " ").strip
55
- origins, destinations = (/from (.*) to (.*)/.match(description)[1,2]).map{ |s| s.split(",").map(&:strip) }
55
+ company = (/(.*) service from .* to .*/.match(description)[1]).strip
56
+ details[:company] = company
57
+ origins, destinations = (/.* service from (.*) to (.*)/.match(description)[1,2]).map{ |s| s.split(",").map(&:strip) }
56
58
  details[:origins], details[:destinations] = origins, destinations
57
59
  parser = TimeParser.new(date)
58
60
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - James Mead
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-05 00:00:00 +00:00
17
+ date: 2010-11-07 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency