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
s = S.new | |
s.each do |x| | |
puts x | |
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
namespace :data do | |
desc "load in some basic data [caution: will nuke and replcace categories, categorizations and inventory items]" | |
task :bootstrap => :environment do | |
# clean out existing: | |
[Category, Categorization, InventoryItem].each{|m| m.find(:all).each{|i| i.destroy}} | |
InventoryItem.create! :name => "Compass" | |
c = Category.create! :name => "Basic Apparel" | |
["Men’s Heavyweight Cotton T", | |
"Men’s Heavyweight Polo", |
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
# File config/initializers/site_config.rb | |
REPORT_RECIPIENT = 'jenn@scg.com' | |
REPORT_ADMIN = 'michael@scg.com' |
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
# Install from a git repo | |
script/plugin install git://github.com/mislav/will_paginate.git | |
# Install from a url | |
script/plugin install http://topfunky.net/svn/plugins/calendar_helper |
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
macbook$ rake -T | |
rake data:bootstrap # load in some basic data [caution: will nuke and replcace cate... | |
rake db:create:all # Create all the local databases defined in config/database.yml | |
rake db:drop # Drops the database for the current RAILS_ENV | |
... | |
rake ts:run # Stop if running, then start a Sphinx searchd daemon using Thi... | |
rake ts:start # Start a Sphinx searchd daemon using Thinking Sphinx's settings | |
rake ts:stop # Stop Sphinx using Thinking Sphinx's settings |
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
rake db:data:dump | |
example data found in db/data.yml | |
--- | |
campaigns: | |
columns: | |
- id | |
- client_id | |
- name |
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
macbook$ ./script/console | |
Loading development environment (Rails 2.1.1) | |
>> a = Album.find(:first) | |
=> #<Album id: 1, artist_id: 1, producer_id: 1, title: "LIGHT YOUR FIRE ", audioformat_id: 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
NOTE: Put in ~/.irbrc | |
--- | |
:update_sources: true | |
:bulk_threshold: 1000 | |
:sources: | |
- http://gems.rubyforge.org/ | |
- http://gems.github.com | |
- http://gems.github.com | |
gem: --no-ri --no-rdoc |
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
rake rack_hoptoad:spec --trace | |
(in /home/deploy/junk/rack_hoptoad) | |
** Invoke rack_hoptoad:spec (first_time) | |
** Invoke rack_hoptoad:clobber_spec (first_time) | |
** Execute rack_hoptoad:clobber_spec | |
rm -r coverage | |
** Execute rack_hoptoad:spec | |
Rack::HoptoadNotifier | |
- yields a configuration object to the block when created (PENDING: TODO) |
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
ENV['SAILS_ENV'] = 'mj_dev' | |
require 'spec' | |
require File.expand_path(File.dirname(__FILE__)) + '/../../config/boot.rb' | |
describe 'Rivalry' do | |
it "should instantiate a rivalry from two rivals" do | |
puts "run test" | |
rivals = [ |
OlderNewer