Skip to content

Instantly share code, notes, and snippets.

View supaspoida's full-sized avatar

Lar Van Der Jagt supaspoida

View GitHub Profile
@supaspoida
supaspoida / gist:908159
Created April 7, 2011 16:38
bundle rails 3.0.6 stack overflow
Users/dev/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:340:in `block in initialize'
/Users/dev/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:333:in `each'
/Users/dev/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:333:in `initialize'
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/remote_specification.rb:52:in `new'
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/remote_specification.rb:52:in `method_missing'
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:101:in `block in __dependencies'
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:98:in `each'
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:98:in `__dependencies'
/Users/dev/.rvm/gems/ruby-1.9.2-p180@loosecubes/gems/bundler-1.0.11/lib/bundler/resolver.rb:68:in `activ
@supaspoida
supaspoida / resque_helper.rb
Created December 2, 2010 15:10
enable resque jobs in integration tests
module ResqueHelper
def with_resque
Resque.module_eval do
def self.enqueue(task, *args)
task.perform(*args)
end
end
yield
Resque.module_eval do
def self.enqueue(task, *args)
#!/usr/bin/env ruby
require 'fileutils'
def fail!(msg = "Failure!")
puts(msg)
exit(1)
end
REPOSITORY_URL = 'git://github.com/mxcl/homebrew.git'
PACKAGE_URL = 'http://github.com/mxcl/homebrew/tarball/master'
# Typical way of handling the email in the controller
class UsersController < ApplicationController
def create
@user = User.new params[:user]
UserMailer.deliver_welcome(@user) if @user.save
end
end
Having some trouble using merb-parts to render a mailing list signup form. Tried with both Haml & Erb and can get the expected results.
Here is the source for the part I'm using:
class ContactFormPart < Merb::PartController
def new
@contact = Contact.new
@redirect_to = params[:redirect_to]
render
require 'test/unit'
class HelloWorldTest < Test::Unit::TestCase
def test_hello_world
object = HelloWorld.new
assert_equal "hello world", object.hello_world
end
end
- !ruby/object:Show
date: 12/31/2008
venue:
name: The Note
locale: West Chester, PA
sets:
one:
- Crutch
- Dead Clowns
- One Rabbit Race ->
=============================
Setlist Format Template
=============================
- !ruby/object:Importer::Show
date:
venue:
locale:
name:
sets:
~/repos/harvest$ irb
>> require 'harvest'
=> true
@harvest = Harvest(:email => "[email protected]",
:password => "123456",
:sub_domain => "tomatoist",
:headers => {"User-Agent" => "Tomatoist", 'Content-Type' => 'application/xml' })
@harvest.timesheet.new(:hours => 3, :notes => 'workdammit', :project_id => 388131, :task_id => 319119, :spent_at => Date.today).save
cd ~/Library/Application\ Support/Firefox
git init
git add .
git commit -m "Saving FF3 Profile."
git checkout -b ff3.5
open /Applications/Firefox3.5
(close Firefox3.5)
git commit -m "Saving FF3.5 Profile."
git checkout master
open /Applications/Firefox