Skip to content

Instantly share code, notes, and snippets.

# bundler state
/.bundle
/vendor/bundle/
# minimal Rails specific artifacts
db/*.sqlite3
/log/*
tmp/*
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc6'
gem 'sqlite3'
group :assets do
gem 'sass-rails', " ~> 3.1.0.rc"
gem 'coffee-rails', "~> 3.1.0.rc"
gem 'uglifier'
end
gem 'jquery-rails'
RVM_PROMPT="\e[1;30m(\e[m\e[0;32m\$(rvm-prompt v p g)\e[m\e[1;30m)\e[m"
DIRECTORY="\e[1;30m(\e[m\e[1;34m\w\e[m\e[1;30m)\e[m"
PROMPT_SYM="९\e[0;37m "
# show branch and dirty status,
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "⚡"
@stratequip
stratequip / warden.rb
Created August 24, 2011 14:15 — forked from stanislaw/warden.rb
Testing Warden/Devise with Steak
# Create a file `spec/acceptance/support/warden.rb' with the following
# contents:
Spec::Runner.configure do |config|
config.include Warden::Test::Helpers, :type => :acceptance
config.after(:each, :type => :acceptance) { Warden.test_reset! }
end
# Or, if you're using RSpec 2 / Rails 3, the contents should be the following
# instead:
spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "db:test:prepare" : :noop
patterns = [:requests, :models, :controllers, :views, :helpers, :mailers, :lib, :routing]
namespace :spec do
desc "Run the code examples not in spec/acceptance"
RSpec::Core::RakeTask.new("no_acceptance" => spec_prereq) do |t|
t.pattern = patterns.map { |sub| "./spec/#{sub}/**/*_spec.rb" }
end
end