Skip to content

Instantly share code, notes, and snippets.

;;; gist.el --- Emacs integration for gist.github.com
;; Author: Christian Neukirchen <purl.org/net/chneukirchen>
;; Maintainer: Chris Wanstrath <chris@ozmm.org>
;; Contributors:
;; Will Farrington <wcfarrington@gmail.com>
;; Michael Ivey
;; Phil Hagelberg
;; Dan McKinley
;; Version: 0.5
Logging implemented for:
- campaign/step_2 on offer update
- campaign/step_4 on offer update
- campaign/step_5 on campaign create, invoice address
- offer/confirmation on campaign status change
- vetting/accept on campaign review
- vetting/approve
- vetting/reject
def self.find(*args)
ret = nil
if args.first.is_a? Symbol
if args.first == :all
ret = Array.new
if args[1].is_a? Hash
Company.all.each do |a|
tests = Array.new
args[1][:conditions].each do |atr, cond|
if a.read_attribute(atr) != cond
# spec/support/auth_helper.rb
module AuthHelper
def admin_login
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials('username', 'password')
end
end
# spec/support/auth_helper.rb
module AuthHelper
def admin_login
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials('username', 'password')
end
end
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
[[ -s ".rvmrc" ]] && source .rvmrc # cope the terminator's window splitting problem
module ApplicationHelper
def current_category
@category || @kitchen && @kitchen.category || Category.roots.first
end
end
+ def destroy
+ url = edit_admin_kitchen_path(params[:kitchen_id])
+ destroy! { url }
+ end
require 'omniauth/openid'
require 'openid/store/filesystem'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, '7v0ECcPvUHZtkqM8tiWpug', 'W874PN5kksX8or5fzWs77pKQfY51EY7qyPkaCeXbo'
end