This file contains hidden or 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
Switched to branch 'v0.9' | |
[jc@macbookpro ~/Gems/bundler(v0.9)]# rake | |
(in /Users/jc/Gems/bundler) | |
/Users/jc/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/pathname.rb:263: warning: `*' interpreted as argument prefix | |
running `gem install builder rake --no-rdoc --no-ri` | |
/Users/jc/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/fileutils.rb:1298:in `unlink': No such file or directory - /Users/jc/Gems/bundler/tmp/gems/remote1 (Errno::ENOENT) | |
from /Users/jc/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/fileutils.rb:1298:in `remove_file' | |
from /Users/jc/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/fileutils.rb:1303:in `platform_support' | |
from /Users/jc/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/fileutils.rb:1297:in `remove_file' | |
from /Users/jc/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/fileutils.rb:1286:in `remove' |
This file contains hidden or 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
# Edit this Gemfile to bundle your application's dependencies. | |
source 'http://gemcutter.org' | |
# setup gem options | |
gem_opts = {} | |
if ENV["USE_LOCAL_GEMS"].to_s == "true" || ENV["USE_LOCAL_GEMS"].to_s == "1" | |
gem_opts[:mongoid] = {:path => "~/Gems/mongoid"} | |
gem_opts[:jammit] = {:path => "~/Gems/jammit"} | |
gem_opts[:devise] = {:path => "~/Gems/devise"} | |
gem_opts[:rails_app_config] = {:path => "~/Gems/rails_app_config"} |
This file contains hidden or 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
[jc@macbookpro ~/Sites/bundler-site(master)]# gem install -r ultraviolet --include-dependencies | |
INFO: `gem install -y` is now default and will be removed | |
INFO: use --ignore-dependencies to install only the gems you list | |
Building native extensions. This could take a while... | |
ERROR: Error installing ultraviolet: | |
ERROR: Failed to build gem native extension. | |
/Users/jc/.rvm/rubies/ruby-1.8.7-p249/bin/ruby extconf.rb | |
checking for main() in -lonig... no | |
creating Makefile |
This file contains hidden or 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
# add this to your Sitefile | |
desc "an autobuild that doesnt suck" | |
task :watchr => [:rebuild] do | |
watch_script = %% | |
def rebuild | |
puts system("webby rebuild") | |
puts "DONE REBUILDING!" | |
end | |
watch("lib/") { rebuild } |
This file contains hidden or 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
[jc@macbookpro ~/Gems/mongoid(master)]# gem list | |
*** LOCAL GEMS *** | |
abstract (1.0.0) | |
activemodel (3.0.0.beta3) | |
activesupport (3.0.0.beta3) | |
arel (0.3.3) | |
bson (0.20.1, 0.20) | |
bson_ext (0.20.1) |
This file contains hidden or 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
# put this on top of config/initializers/devise.rb | |
module Mongoid::Document::ClassMethods | |
def self.class_attribute(*attrs) | |
mattr_accessor(attrs.first) | |
end | |
end | |
# continue on with devise.rb.... |
This file contains hidden or 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
Feature: something something | |
In order to ... | |
something something | |
Scenario: spec helper | |
Given a directory named "spec" | |
And a file named "example.haml" with: | |
""" | |
%p | |
%textarea |
This file contains hidden or 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
context "when :allow_destroy is enabled" do | |
before do | |
@person = Person.new | |
@person.favorites.build(:title => "Ice Cream") | |
@person.favorites.build(:title => "Jello") | |
@attributes = { | |
"0" => { "title" => "Jello", "_destroy" => "true" } | |
} | |
@person.favorites_attributes = @attributes | |
end |
This file contains hidden or 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
require 'rubygems' | |
require 'mongoid' | |
Mongoid.configure do |config| | |
config.master = Mongo::Connection.new.db("mongoid_key_test") | |
end | |
Mongoid.master.collection("users").drop | |
class User |
This file contains hidden or 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 run_request(method, url, headers={}, data=false, limit=10, raw=false) | |
@cookies ||= {} | |
@default_headers ||= {} | |
http_retry_delay = 5 | |
http_retry_count = 5 | |
raise ArgumentError, 'HTTP redirect too deep' if limit == 0 | |
http = Net::HTTP.new(url.host, url.port) | |
if url.scheme == "https" |