Skip to content

Instantly share code, notes, and snippets.

require 'lib/sinatra'
module Sinatra
module Desc
@descriptions = []
class << self
attr_accessor :desc, :descriptions
end
def self.route_added(verb, path)
# Author: Cyril Rohr
require 'rubygems'
require 'rest_client' # sudo gem install rest-client
require 'rack/cache' # sudo gem install rack-cache
module RestClient
# this is a quick hack to show how you can use rack-cache as a powerful client cache.
class CacheableResource < Resource
attr_reader :cache
CACHE_DEFAULT_OPTIONS = {}.freeze
@psyche
psyche / bloat.rb
Created February 1, 2009 21:40 — forked from nakajima/bloat.rb
# Measure the amount bloat you're adding by requiring libraries.
#
# Usage:
#
# Bloat.measure do
# require 'rubygems'
# require 'activesupport'
# end
#
# A report will be printed that tells you how many methods were
## NOTE
The error refers to the first line of the second multi-line pre-scenario comments
## sessions.feature file
Users want to know that nobody can masquerade as them. We want to extend trust
only to visitors who present the appropriate credentials. Everyone wants this
identity verification to be as secure and convenient as possible.
Feature: Logging in