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 Toolbox | |
module_function | |
def log(message, priority = :warn) | |
Logger.send(:priority, message) | |
end | |
def format_cc(number) | |
number.scan(/\d{4}/).join('-') | |
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
# /apps/Procfile | |
app1: cd app1 && foreman start | |
app2: cd app2 && foreman start | |
redis: redis-server | |
# /apps/app1/Procfile | |
web: rails s -p 3001 | |
poller: ./script/server/poller start -a -q 'high medium low' | |
# /apps/app2/Procfile |
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
stack: bamboo-mri-1.9.2 | |
addons: | |
- newrelic:bronze | |
- logging:expanded | |
- pgbackups:basic | |
- releases:basic |
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 MigrationManifest | |
@@manifest = [] | |
def self.table(name, options = {}, &block) | |
@@manifest << [:table, name, options, block] | |
end | |
def self.column(table, name, data_type, options = {}) | |
@@manifest << [:column, table, name, data_type, options] | |
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
Options: | |
[--singleton] # Supply to create a singleton controller | |
-c, --resource-controller=NAME # Resource controller to be invoked | |
# Default: controller | |
-o, --orm=NAME # Orm to be invoked | |
# Default: active_record | |
-a, [--actions=ACTION ACTION] # Actions for the resource controller | |
[--force-plural] # Forces the use of a plural ModelName | |
# ... |
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
Options: | |
[--helper] # Indicates when to generate helper | |
# Default: true | |
-t, [--test-framework=NAME] # Test framework to be invoked | |
# Default: test_unit | |
-e, [--template-engine=NAME] # Template engine to be invoked | |
# Default: erb |
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
TestUnit options: | |
-r, [--fixture-replacement=NAME] # Fixture replacement to be invoked | |
[--fixture] # Indicates when to generate fixture | |
# Default: true | |
ActiveRecord options: | |
[--parent=PARENT] # The parent class for the generated model | |
-t, [--test-framework=NAME] # Test framework to be invoked | |
# Default: test_unit | |
[--migration] # Indicates when to generate migration |
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
Installed Generators | |
Plugins (vendor/plugins): ... | |
Rubygems: ... | |
Builtin: controller, helper, integration_test, mailer, metal, migration, model, observer, performance_test, plugin, resource, scaffold, session_migration |
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
Rails: | |
controller | |
generator | |
helper | |
integration_test | |
mailer | |
metal | |
migration | |
model |
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
[rails2] > ./script/generate mailer Notifications | |
exists app/models/ | |
create app/views/notifications | |
exists test/unit/ | |
create test/fixtures/notifications | |
create app/models/notifications.rb | |
create test/unit/notifications_test.rb | |
create app/views/notifications/reset.erb | |
create test/fixtures/notifications/reset |