- Edit the
PRODUCTION_APP
andSTAGING_APP
variables at the top of the file. - Set the heroku remotes by running
rake:set_remotes
- Once you're ready to deploy, you can run
rake deploy:production
orrake deploy:staging
This file contains 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
class Alert < ActiveRecord::Base | |
belongs_to :alertable, :polymorphic => true | |
end | |
class Region < ActiveRecord::Base | |
has_many :alerts, :as => :alertable | |
end | |
This file contains 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
require "rake" | |
shared_context "rake" do | |
let(:rake) { Rake::Application.new } | |
let(:task_name) { self.class.top_level_description } | |
let(:task_path) { "lib/tasks/#{task_name.split(":").first}" } | |
subject { rake[task_name] } | |
def loaded_files_excluding_current_rake_file | |
$".reject {|file| file == Rails.root.join("#{task_path}.rake").to_s } |
This file contains 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
# run in non-daemonized mode (so you can monitor it) with `god -c /path/to/mysql.god -D` | |
# run normally with `god -c /path/to/mysql.god` | |
# Settings for email notifications (optional) | |
God::Contacts::Email.defaults do |d| | |
d.from_email = 'god@my-app.com' | |
d.from_name = 'God' | |
d.delivery_method = :smtp # this can also be :sendmail | |
d.server_host = 'smtp.myapp.com' | |
d.server_port = 25 |
This file contains 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
gulp = require 'gulp' | |
gutil = require 'gulp-util' | |
# contrib modules | |
streamee = require 'streamee' | |
concat = require 'gulp-concat' | |
coffee = require 'gulp-coffee' | |
uglify = require 'gulp-uglify' | |
sass = require 'gulp-sass' |
This file contains 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
# Don't forget to turn on the rewrite engine | |
RewriteEngine on | |
# Maintenance Redirection (lets images and styles through) | |
RewriteCond %{REQUEST_URI} !maintenance.html | |
RewriteCond %{REQUEST_FILENAME} !(styles|images).+$ | |
RewriteRule (.*) /maintenance.html [R,L] |
This file contains 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/sh | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
TARGET=$1 | |
: ${TARGET:="master"} | |
echo "\033[33m=> git checkout ${TARGET}\033[0m" | |
git checkout ${TARGET} | |
echo "\033[33m=> git pull origin ${TARGET}\033[0m" |
This file contains 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
gem 'taps' | |
gem 'sqlite3' # dependency of taps |
This file contains 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
// FIXES FOR WYSIWYG EDITOR | |
li.tinymce { | |
overflow: auto; | |
> div { | |
float: left; | |
width: 76%; | |
} | |
} |
This file contains 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
describe 'it should regenerate the guid if one already exists' do | |
FactoryGirl.create(:user, guid: '123456') | |
SecureRandom.stub(:hex).and_return('123456', '456789') | |
user = User.new(email: 'john@email.com', total_budget: 250.00) | |
user.save | |
expect(user.reload.guid).to eq(6) | |
end |
NewerOlder