Skip to content

Instantly share code, notes, and snippets.

View felipecsl's full-sized avatar
⚒️
Building

Felipe Lima felipecsl

⚒️
Building
View GitHub Profile
@felipecsl
felipecsl / after_commit_with_transactional_fixtures.rb
Created November 3, 2011 22:13 — forked from outoftime/after_commit_with_transactional_fixtures.rb
Patch ActiveRecord to fire after_commit callbacks at the appropriate time during tests with transactional fixtures.
module ActiveRecord
module ConnectionAdapters
module DatabaseStatements
#
# Run the normal transaction method; when it's done, check to see if there
# is exactly one open transaction. If so, that's the transactional
# fixtures transaction; from the model's standpoint, the completed
# transaction is the real deal. Send commit callbacks to models.
#
# If the transaction block raises a Rollback, we need to know, so we don't
@felipecsl
felipecsl / install-redis.sh
Created September 17, 2020 20:25 — forked from jpickwell/install-redis.sh
Installing Redis 6.0.0 on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=6.0.8