From ce024aa0625b00af894d7c3729a5f6da9fb06518 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Fri, 6 Mar 2015 16:04:07 +0000 Subject: [PATCH] Tweak ID's. --- tubestatus.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubestatus.rb b/tubestatus.rb index 92dec26..5335494 100644 --- a/tubestatus.rb +++ b/tubestatus.rb @@ -23,7 +23,7 @@ class Tubestatus < Sinatra::Base # Parse the XML into the appropriate structure for our app. data = feed_data["LineStatus"].map do |line| - { :id => line["Line"].first["Name"].downcase.gsub(/ (and)?/, ""), + { :id => line["Line"].first["Name"].downcase.gsub(/[^a-z]+/, "-"), :name => line["Line"].first["Name"], :status => line["Status"].first["Description"].downcase, :messages => line["StatusDetails"].empty? ? [] : [line["StatusDetails"]] }