Skip to content

Instantly share code, notes, and snippets.

View wedy's full-sized avatar
:octocat:
eating mie goreng

Wedy Chainy wedy

:octocat:
eating mie goreng
  • Sydney
View GitHub Profile
@wedy
wedy / app.rb
Last active September 9, 2015 14:18 — forked from troelskn/app.rb
Gollum protected by HTTP Basic
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash, :can_write)
before { authenticate! }
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end
helpers do