Skip to content

Instantly share code, notes, and snippets.

View EtienneDepaulis's full-sized avatar
🏠
Working from home

Etienne Depaulis EtienneDepaulis

🏠
Working from home
View GitHub Profile
@mtparet
mtparet / test_validation.rb
Created February 2, 2018 17:25
Polymorphic relation validation
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@EtienneDepaulis
EtienneDepaulis / Gemfile
Created April 23, 2013 08:25
Intégration de Paymill dans une appli Rails + Twitter Bootstrap
gem "paymill"
@thbar
thbar / database.yml
Created January 22, 2013 08:09
Little sh script to enable git config for branch-specific databases with Rails.
<%
# http://mislav.uniqpath.com/rails/branching-the-database-along-with-your-code/
branch = `git symbolic-ref HEAD 2>/dev/null`.chomp.sub('refs/heads/', '')
suffix = `git config --bool branch.#{branch}.database`.chomp == 'true' ? "_#{branch}" : ""
%>
common: &common
adapter: mysql2
encoding: utf8
pool: 5
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@wrburgess
wrburgess / gist:2086949
Created March 19, 2012 00:20
Setting up New Relic for Sinatra on Heroku #newrelic #sinatra #heroku
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")