Sha256: 1bd0729e7cadcd9cc0e838a7ffdcd6eb748b615955bce79d228a941ec44255f0
Contents?: true
Size: 664 Bytes
Versions: 2
Compression:
Stored size: 664 Bytes
Contents
require 'sinatra' require 'bcrypt' class ApplicationController < Sinatra::Base if settings.methods(false).include?(:maintenance) if settings.maintenance define_singleton_method(:maintenance) do |&block| get '*', &block post '*', &block put '*', &block patch '*', &block delete '*', &block options '*', &block link '*', &block unlink '*', &block end else define_singleton_method(:maintenance) {|&block| get "/#{BCrypt::Password.create(?1)}", &block} end else define_singleton_method(:maintenance) {|&block| get "/#{BCrypt::Password.create(?1)}", &block} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eucalypt-0.5.1 | lib/eucalypt/core/helpers/maintenance.rb |
eucalypt-0.5.0 | lib/eucalypt/core/helpers/maintenance.rb |