forked from frontEndParty/frontendparty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.rb
31 lines (27 loc) · 884 Bytes
/
app.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'sinatra'
require "sinatra/reloader"
require 'chronic'
class FrontEndParty < Sinatra::Base
configure :development do
register Sinatra::Reloader
end
def next_meeting custom_date
if custom_date
next_meeting = Chronic.parse custom_date
else
current_month = Time.now.strftime "%B"
unless next_meeting = Chronic.parse("fifth Thursday in #{current_month}")
next_meeting = Chronic.parse "fourth Thursday in #{current_month}"
end
end
end
def submission_form_url
# joe's
"https://docs.google.com/a/joeellis.la/spreadsheet/viewform?formkey=dC1SQlBHdU5yS2xKODR0bjR5QTFENHc6MQ"
# shwery's
# "https://docs.google.com/forms/d/1xz8g9apBkmW5g8v-E8nmD_Hjriv3e31urZc2zU4VWxY/viewform"
end
get "/" do
erb :index, :locals => {:next_meeting => next_meeting("October 24th 2013").strftime("%B %e, %Y") }
end
end