Created
April 16, 2012 16:35
-
-
Save forforf/2399831 to your computer and use it in GitHub Desktop.
Barebones Sinatra App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post '/' do | |
session = login(params[:username], params[:password]) | |
get_courses(session, params[:username]) | |
erb :index | |
end | |
def login(username, password) | |
#login = Savon::Client.new($LOGIN_WSDL) | |
#login.http.auth.ssl.verify_mode = :none | |
#session = login.request(:login) do | |
# soap.body = { :id => username, :pw => password } | |
#end | |
#session.to_hash | |
session = {:jamming => :with_Bob} | |
end | |
def get_courses(session, username) | |
@courses = ["Reggae", "Marley's Philosophy"] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helped me figure out my problem. Thanks a lot!