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/bash | |
heroku auth:login | |
heroku apps:create -s cedar $1 | |
heroku sharing:add [email protected] | |
heroku sharing:add [email protected] | |
heroku sharing:add [email protected] | |
heroku addons:add shared-database:5mb | |
heroku addons:add loggly:mole | |
heroku addons:add pgbackups:auto-month |
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
module ActsAsParanoid | |
def acts_as_paranoid | |
default_scope where(:deleted_at => nil) | |
include InstanceMethods | |
end | |
module InstanceMethods | |
def destroy |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.1' | |
gem 'rack', '1.3.3' | |
gem 'jquery-rails' | |
gem 'pg', '0.11.0' | |
gem 'silent-postgres', '0.0.8' | |
gem 'thin', '1.2.11' | |
gem 'devise', '1.4.7' | |
gem 'haml', '3.1.3' |
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
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 22 | 17 | 3 | 2 | 0 | 6 | | |
| Helpers | 3 | 2 | 0 | 0 | 0 | 0 | | |
| Models | 25 | 15 | 2 | 1 | 0 | 13 | | |
| Libraries | 0 | 0 | 0 | 0 | 0 | 0 | | |
| Model specs | 48 | 40 | 0 | 0 | 0 | 0 | | |
| Controller specs | 49 | 37 | 0 | 0 | 0 | 0 | | |
| Mailer specs | 51 | 40 | 0 | 1 | 0 | 38 | |
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
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 100 | 85 | 4 | 10 | 2 | 6 | | |
| Helpers | 4 | 4 | 0 | 0 | 0 | 0 | | |
| Models | 78 | 58 | 4 | 8 | 2 | 5 | | |
| Libraries | 0 | 0 | 0 | 0 | 0 | 0 | | |
| Model specs | 129 | 113 | 0 | 0 | 0 | 0 | | |
| Controller specs | 121 | 108 | 0 | 1 | 0 | 106 | | |
| Helper specs | 15 | 4 | 0 | 0 | 0 | 0 | |
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
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 112 | 89 | 9 | 12 | 1 | 5 | | |
| Helpers | 28 | 23 | 0 | 4 | 0 | 3 | | |
| Models | 189 | 153 | 8 | 25 | 3 | 4 | | |
| Libraries | 0 | 0 | 0 | 0 | 0 | 0 | | |
| Model specs | 438 | 380 | 0 | 0 | 0 | 0 | | |
| Controller specs | 857 | 755 | 0 | 10 | 0 | 73 | | |
| Helper specs | 68 | 62 | 0 | 0 | 0 | 0 | |
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
def index | |
if !params[:year].blank? and !params[:month].blank? and !params[:day].blank? | |
@date = Date.parse("#{params[:year]}-#{params[:month]}-#{params[:day]}") | |
else | |
@date = Date.today | |
end | |
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
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 37 | 30 | 4 | 4 | 1 | 5 | | |
| Helpers | 3 | 2 | 0 | 0 | 0 | 0 | | |
| Models | 38 | 31 | 3 | 2 | 0 | 13 | | |
| Libraries | 0 | 0 | 0 | 0 | 0 | 0 | | |
| Model specs | 169 | 158 | 0 | 0 | 0 | 0 | | |
| Controller specs | 105 | 90 | 0 | 1 | 0 | 88 | | |
| Helper specs | 0 | 0 | 0 | 0 | 0 | 0 | |
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
ree-1.8.7-2010.02 :002 > bb.paid_amount | |
=> #<Dinheiro:0x105e72e48 @quantia=10000> | |
ree-1.8.7-2010.02 :003 > bb.paid_amount.nil? | |
=> false | |
ree-1.8.7-2010.02 :004 > bb.paid_amount = nil | |
=> nil | |
ree-1.8.7-2010.02 :005 > bb.paid_amount.nil? | |
=> false | |
ree-1.8.7-2010.02 :014 > bb.paid_amount | |
=> #<Dinheiro:0x105e72e48 @quantia=10000> |
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
module FactoryGirl | |
class Sequence | |
def reset | |
@value = 1 | |
end | |
end | |
module Syntax | |
module Vintage | |
module Factory | |
def self.reset_sequences |