lib/tmin/server.rb in tmin-0.2.4 vs lib/tmin/server.rb in tmin-0.2.5

- old
+ new

@@ -295,32 +295,36 @@ # Redirect to the shortened URL get '/:code' do @url = Firefly::Url.first(:code => params[:code]) - + #The string saved by tminus app. string = @url.url + #Time builds an array from the tminus string that stores the time, countdown name, and all other information about the countdown @time = [] @time = array_builder(string) + + #The color is indicated within the 6 spot of the array @color = @time[6].to_i + + #font_color sends the color number and in return gets what color the font is. @font_color = font_builder(@color) + #Indicates if the alert is set within the string @alert = alert_on(@time[2].to_i) + + #Date gets passed to the javascript in the redirect.haml that indicates the countdown date. Insert adds 20 to complete the year. @date = @time[4].to_s.insert(6, '20') #Array containing the number relating to the image number of default backgorunds. @num = (1..39).to_a - # @expired = date_expired(@date) - # @parsed_time = Date.parse(@time[4]).strftime("%FT%T") - - if @url.nil? status 404 "Sorry, that code is unknown." else @@ -436,16 +440,9 @@ return 'No' end end - - def date_expired(time) - - # expired = DateTime.parse(time) < DateTime.now - return expired - - end end end