Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'sinatra/base'
- require 'erb'
- class CIJoe
- class Server < Sinatra::Base
- [...]
- def self.project_path=(project_path)
- # next line does something screwy
- user, pass = Config.cijoe(project_path).user.to_s, Config.cijoe(project_path).pass.to_s
- if user != '' && pass != ''
- use Rack::Auth::Basic do |username, password|
- [ username, password ] == [ user, pass ]
- end
- puts "Using HTTP basic auth"
- end
- set :project_path, Proc.new{project_path}
- end
- [...]
- end
- end
Add Comment
Please, Sign In to add comment