This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Set RAILS_ENV to cucumber, run cucumber and re-set RAILS ENV' | |
task :cuke do | |
# save old env | |
old_env = RAILS_ENV || ENV['RAILS_ENV'] || 'test' | |
# set to cucumber env | |
RAILS_ENV = ENV['RAILS_ENV'] = 'cucumber' | |
# run cucumber | |
Rake::Task['cucumber'].invoke |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ssh-eternal is a poor-man's clone of ssh-forever | |
# (http://github.com/mattwynne/ssh-forever) | |
# | |
# It's purpose is to run this the first time you connect to a | |
# remote computer with ssh. This script will then copy your public | |
# key to the remote computers ~/.ssh/authorized_keys file to | |
# allow subsequent logins to be done without having to remember | |
# the remote machine's password every time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# execute by calling | |
# rake db:import:from_csv | |
# RAILS_ENV=production db:import:from_csv to use the production environment | |
require 'ruport' | |
namespace :db do | |
namespace :import do | |
desc 'import stuff into the database' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim color file | |
" Converted from Textmate theme Cobalt using Coloration v0.2.3 (http://github.com/sickill/coloration) | |
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This javascript file is intened to make redmine_backlogs | |
// look and behave just a bit more like Pivotal Tracker to | |
// help ease the transition | |
$(function(){ | |
// make backlogs less hideous | |
apply_styles(); | |
// refresh browser every half hour to prevent js memory bloat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>haml</string> | |
<string>sass</string> | |
</array> | |
<key>foldingStartMarker</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>feature</string> | |
</array> | |
<key>firstLineMatch</key> | |
<string>기능|機能|功能|フィーチャ|خاصية|תכונה|Функціонал|Функционалност|Функционал|Особина|Могућност|Özellik|Właściwość|Tính năng|Savybė|Požiadavka|Požadavek|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Fīča|Funzionalità|Funktionalität|Funkcionalnost|Funkcionalitāte|Funcționalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Feature|Egenskap|Egenskab|Crikey|Característica|Arwedd(.*)</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ExpectedBehavior | |
module ActsAsArchival | |
module ActMethods | |
def acts_as_archival | |
unless included_modules.include? InstanceMethods | |
include InstanceMethods | |
before_save :raise_if_not_archival |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Loads ActionMailer settings from config/email.yml | |
# and turns deliveries on only if configuration block is found | |
config_file = Rails.root.join('config','email.yml') | |
if File.file?(config_file) | |
mailconfig = YAML::load_file(config_file) | |
if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env) | |
# enable deliveries | |
ActionMailer::Base.perform_deliveries = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/ballots_controller.rb | |
def create | |
@ballot = Ballot.new(params[:ballot]) | |
if @ballot.save | |
redirect_to @ballot, :notice => 'Successful' | |
else | |
session[:error_messages] = @ballot.errors.full_messages | |
redirect_to edit_ballot_path(@ballot, :params => params), :notice => 'Ruh Roh!' | |
end | |
end |