Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.462 kB
require 'sinatra'
require 'yaml'
require File.dirname(__FILE__) + '/lib/dras'
class DrasDemo < Sinatra::Base
def initialize(*args)
super(*args)
@config = YAML.load(File.read(File.dirname(__FILE__) + '/config/config.yml'))['dras']
@dras = DRAS.new @config
end
get '/' do
if @dras.last_check == "NEVER"
redirect '/check'
end
erb :home
end
get '/check' do
@dras.check do
redirect '/'
end
end
end
Jump to Line
Something went wrong with that request. Please try again.