From 22061804d36dd113ed16ba6d682933640eaa6d03 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 25 Apr 2016 14:51:19 -0400 Subject: [PATCH] [bitbar] Default OBA color to black --- bitbar/onebusaway.30s.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbar/onebusaway.30s.rb b/bitbar/onebusaway.30s.rb index 5c27944..4edf5eb 100755 --- a/bitbar/onebusaway.30s.rb +++ b/bitbar/onebusaway.30s.rb @@ -20,7 +20,7 @@ doc = REXML::Document.new(html) status = doc.elements['//td[contains(@class, "arrivalsStatusEntry")]'] minutes = status.elements['.//span'].text -color = COLOR_MAP[status.attributes['class'].split(/\s+/).last.to_sym] +color = COLOR_MAP.fetch(status.attributes['class'].split(/\s+/).last.to_sym, :black) times = doc.elements.to_a('//div[@class="arrivalsTimePanel"]') puts "#{minutes} | color=#{color}"