Skip to content

Instantly share code, notes, and snippets.

var responseMap = {};
responseMap["/"] = function (req, res) {
// if (req.method === "GET")
sys.puts("getting");
var body = JSON.stringify({blah: "blah"});
sys.puts(sys.inspect(body));
res.writeHead(200, { "Content-Type": "text/json", "Content-Length:": body.length});
res.end(body);
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Whatever::Application
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.postgresql.postgres</string>
<key>ProgramArguments</key>
<array>
ADAPTER=sqlite3 spec spec/one_to_one_spec.rb
Profiling enabled.
...F....F....F........F.
Top 10 slowest examples:
0.0558030 Person.has(1, :profile); Person.accepts_nested_attributes_for(:profile, :allow_destroy => true) should allow to delete an existing profile via Person#profile_attributes
0.0469530 Person.has(1, :profile); Person.accepts_nested_attributes_for(:profile) should allow to update an existing profile via Person#profile_attributes
0.0460890 Person.has(1, :profile); Person.accepts_nested_attributes_for(:profile, :reject_if => lambda { |attrs| true }) should not allow to delete an existing profile via Person#profile_attributes
1)
NoMethodError in 'BusinessAccount should have an owner that is a creditor'
undefined method `unpack' for 4b4a24ef7d209c4ca6000002:Mongo::ObjectID
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-core-0.10.3/lib/dm-core/types/object.rb:18:in `load'
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-core-0.10.3/lib/dm-core/model.rb:511:in `load'
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-core-0.10.3/lib/dm-core/model.rb:503:in `each'
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-core-0.10.3/lib/dm-core/model.rb:503:in `load'
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-core-0.10.3/lib/dm-core/model.rb:482:in `map'
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-core-0.10.3/lib/dm-core/model.rb:482:in `load'
/Users/lancelotcarlson/.rvm/gems/ruby/1.8.7/gems/dm-mongo-adapter-0.1.0/lib/mongo_adapter/model.rb:33:in `load'
irb(main):001:0> class User;include DataMapper::Mongo::Resource;end
=> User
irb(main):006:0> User.property :id, DataMapper::Mongo::Types::ObjectID
=> #<DataMapper::Property @model=User @name=:id>
irb(main):003:0> User.property :stuff, DataMapper::Mongo::Types::Array
=> #<DataMapper::Property @model=User @name=:stuff>
irb(main):004:0> User.class_eval "def foo; puts Array.new;end"
=> nil
irb(main):007:0> User.new.foo
#<DataMapper::Mongo::Types::Array:0xb73383dc>
User#new_record? is deprecated, use User#new? instead (/Users/lancelotcarlson/Projects/ruby/devise/test/rails_app/vendor/plugins/devise/lib/devise/models/confirmable.rb:55:in `confirmed?')
BEFORE 1
User#new_record? is deprecated, use User#new? instead (/Users/lancelotcarlson/Projects/ruby/devise/test/rails_app/vendor/plugins/devise/lib/devise/models/confirmable.rb:55:in `confirmed?')
#<User @id=1 @username=nil @email="user@test.com" @encrypted_password="ef32cf976007d3a6958927d9dfa28c4309c67d26" @password_salt="xWrPOZNsXU9ncVLaTFbk" @confirmation_token=nil @confirmed_at=Wed, 06 Jan 2010 19:00:08 -0500 @confirmation_sent_at=nil @reset_password_token=nil @remember_token=nil @remember_created_at=nil @sign_in_count=1 @current_sign_in_at=Wed, 06 Jan 2010 19:00:08 -0500 @last_sign_in_at=Wed, 06 Jan 2010 19:00:08 -0500 @current_sign_in_ip="127.0.0.1" @last_sign_in_ip="127.0.0.1" @created_at=Thu, 07 Jan 2010 00:00:08 +0000 @updated_at=nil>
AFTER 1
.User#new_record? is deprecated, use User#new? instead (/Users/lancelot
AFTER AUTH
nil
1
#<User @id=1 @username=nil @email="user@test.com" @encrypted_password="8c06ae7e618234c5670dfd1ca23638381016e601" @password_salt="lsbDFj_mYDMcZnFz8Akt" @confirmation_token=nil @confirmed_at=Wed, 06 Jan 2010 18:09:28 -0500 @confirmation_sent_at=nil @reset_password_token=nil @remember_token=nil @remember_created_at=nil @sign_in_count=1 @current_sign_in_at=Wed, 06 Jan 2010 18:09:28 -0500 @last_sign_in_at=Wed, 06 Jan 2010 18:09:28 -0500 @current_sign_in_ip="127.0.0.1" @last_sign_in_ip="127.0.0.1" @created_at=Wed, 06 Jan 2010 23:09:28 +0000 @updated_at=nil>
.User#new_record? is deprecated, use User#new? instead (/Users/lancelotcarlson/Projects/ruby/devise/test/rails_app/vendor/plugins/devise/lib/devise/models/confirmable.rb:55:in `confirmed?')
User#new_record? is deprecated, use User#new? instead (/Users/lancelotcarlson/Projects/ruby/devise/test/rails_app/vendor/plugins/devise/lib/devise/models/confirmable.rb:55:in `confirmed?')
AFTER AUTH
1
2
#<User @id=1 @username=nil @email="user@test.com" @encr
1) Error:
test_add_all_modules(ActiveRecordTest):
NameError: uninitialized constant ActiveRecordTest::Devisable
activesupport (2.3.5) lib/active_support/dependencies.rb:105:in `const_missing'
/test/models_test.rb:96:in `test_add_all_modules'
activesupport (2.3.5) lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
activesupport (2.3.5) lib/active_support/testing/setup_and_teardown.rb:62:in `run'
2) Error:
1) Error:
test_add_all_modules(ActiveRecordTest):
NameError: uninitialized constant ActiveRecordTest::Devisable
activesupport (2.3.5) lib/active_support/dependencies.rb:105:in `const_missing'
/test/models_test.rb:96:in `test_add_all_modules'
activesupport (2.3.5) lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
activesupport (2.3.5) lib/active_support/testing/setup_and_teardown.rb:62:in `run'
2) Error: