Skip to content

Instantly share code, notes, and snippets.

View mjfreshyfresh's full-sized avatar

MJ mjfreshyfresh

View GitHub Profile
s = S.new
s.each do |x|
puts x
end
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",
# File config/initializers/site_config.rb
REPORT_RECIPIENT = 'jenn@scg.com'
REPORT_ADMIN = 'michael@scg.com'
# 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
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
rake db:data:dump
example data found in db/data.yml
---
campaigns:
columns:
- id
- client_id
- name
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>
>>
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
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)
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 = [