Skip to content

Instantly share code, notes, and snippets.

module DeprecateAssertions
def self.methods_to_replace
[
:assert,
:assert_block,
:assert_equal,
:assert_no_match,
:assert_not_equal,
:assert_nothing_raised,
#!/bin/bash
## Short introduction ##
# It is supposed that you have MySQL and lot of files to backup. Done via mk-parallel-dump (maatkit).
# Files (as well as DB dumps) are keept versioned, so you can revert to any state during last 20 days. Done via rdiff-backup.
# Afterwards, files (with versioning metainfo) are transfered to FTP server. Done via duplicity.
# Required software:
# 1. maatkit (mk-parallel-dump)
# 2. rdiff-backup
(function() {
this.JST || (this.JST = {});
this.JST["templates/request_dialog/dialog"] = (function() {
this.HandlebarsTemplates || (this.HandlebarsTemplates = {});
this.HandlebarsTemplates["request_dialog/dialog"] = Handlebars.template(function(Handlebars, depth0, helpers, partials, data) {
helpers = helpers || Handlebars.helpers;
var foundHelper, self = this;
return "= form_tag :url => requests_path, :html => { :remote => true } do\n .error_messages\n";
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake
index f26e18b..d925d29 100644
--- a/activerecord/lib/active_record/railties/databases.rake
+++ b/activerecord/lib/active_record/railties/databases.rake
@@ -399,9 +399,11 @@ db_namespace = namespace :db do
abcs = ActiveRecord::Base.configurations
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql")
case abcs[Rails.env]['adapter']
- when /mysql/, 'oci', 'oracle'
+ when 'oci', 'oracle'
namespace :structure do
desc 'Dump the database structure to an SQL file'
task :dump => :environment do
abcs = ActiveRecord::Base.configurations
case abcs[Rails.env]['adapter']
when /mysql/, 'oci', 'oracle'
ActiveRecord::Base.establish_connection(abcs[Rails.env])
File.open("#{Rails.root}/db/#{Rails.env}_structure.sql", "w+") { |f| f << ActiveRecord::Base.connection.structure_dump }
when /postgresql/
ENV['PGHOST'] = abcs[Rails.env]['host'] if abcs[Rails.env]['host']
(function() {
var AdminVacationSorter;
AdminVacationSorter = (function() {
function AdminVacationSorter(parent_selector, children_selector) {
var options;
this.parent_selector = parent_selector;
this.children_selector = children_selector;
options = {
AdminVacationSorter = function(selector) {
var selector = selector;
var sortable = null;
var options = {
axis: 'y',
containment: 'parent',
cursor: 'move',
update: update_handler,
helper: ui_helper
};
root@tankbusta:~# cat /etc/logrotate.d/apache2
/var/log/apache2/*.log
/var/www/*/logs/*-access.log
/var/www/*/logs/*-error.log
/var/www/*/www/*/log/production.log
/var/www/*/www/*/log/development.log {
daily
missingok
rotate 10
compress
~/Projects/tmp/rails/activerecord git:(master*) (ruby-1.9.3-p0@rails32)» ruby -Itest test/cases/relations_test.rb -n test_except
Using sqlite3 with Identity Map off
Run options: -n test_except --seed 29142
# Running tests:
F
Finished tests in 0.250804s, 3.9872 tests/s, 15.9487 assertions/s.
@e1senh0rn
e1senh0rn / web_mail_viewer.rb
Created February 15, 2012 16:31
Simple web mail viewer
require 'base64'
class WebMailViewer < Sinatra::Base
configure(:integration, :development, :test) do
enable :logging
end
before do
if ActionMailer::Base.delivery_method != :file