lib/fandango.rb in fandango-0.2.0 vs lib/fandango.rb in fandango-0.2.1
- old
+ new
@@ -20,10 +20,11 @@
end
private
def fetch_and_parse(postal_code)
- feed = Feedzirra::Feed.fetch_and_parse("http://www.fandango.com/rss/moviesnearme_#{postal_code}.rss")
+ cleaned_postal_code = postal_code.to_s.gsub(' ', '')
+ feed = Feedzirra::Feed.fetch_and_parse("http://www.fandango.com/rss/moviesnearme_#{cleaned_postal_code}.rss")
raise BadResponse.new(feed) unless feed.respond_to?(:entries)
feed
end
end