Skip to content

Instantly share code, notes, and snippets.

View zapnap's full-sized avatar
🐐

nap zapnap

🐐
View GitHub Profile
zaxxon:resque-status nap$ rake test
(in /Users/nap/dev/resque-status)
All dependencies seem to be installed.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"lib:lib:test" "/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/test_helper.rb" "test/test_resque-job_with_status.rb" "test/test_resque-status.rb"
/opt/local/bin/redis-server
Starting redis for testing at localhost:9736...
/opt/local/bin/redis-server
Starting redis for testing at localhost:9736...
Loaded suite /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
# unable to save / update a record (without validations) when dm after save callback is used
# what's strange(r) is that the call to update! returns true here...
require 'dm-core'
class Project
include DataMapper::Resource
property :id, Serial
property :name, String
def count(*args)
query = args.last.kind_of?(Hash) ? args.pop : {}
property_name = args.first
if property_name
assert_kind_of 'property', property_by_name(property_name), Property
end
aggregate(query.merge(:fields => [ property_name ? property_name.count : :all.count ]))
end
# datamapper 0.9.11
# bleh!
irb(main):005:0> Project.all(:fields => [:name, :owner], :unique => true).length
=> 416
Thu, 04 Jun 2009 23:23:10 GMT ~ debug ~ (0.000037) SELECT `name`, `owner` FROM `projects` GROUP BY `name`, `owner` ORDER BY `id`
irb(main):006:0> Project.count(:fields => [:name, :owner], :unique => true)
=> 911
Thu, 04 Jun 2009 23:23:03 GMT ~ debug ~ (0.000037) SELECT COUNT(*) FROM `projects`
Dan Pickett, http://en.oreilly.com/rails2009/profile/46469
Brian Cardarella, http://en.oreilly.com/rails2009/profile/45790
Nick Plante, http://en.oreilly.com/rails2009/profile/2753
$rake twitter:update --trace
(in /Users/rafael/Desktop/retweet)
** Invoke twitter:update (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute twitter:update
rake aborted!
stack level too deep
/Library/Ruby/Gems/1.8/gems/mash-0.0.3/lib/mash.rb:192:in `convert_value'
/Library/Ruby/Gems/1.8/gems/extlib-0.9.11/lib/extlib/mash.rb:43:in `regular_writer'
njero - http://neverlet.be
sutto - http://blog.ninjahideout.com
zapnap - http://blog.zerosum.org
tpope - http://tpope.net
reinh - http://reinh.com
bryanl - http://smartic.us
linoj - http://www.vaporbase.com
technicalpickles - http://technicalpickles.com
MaD15 - http://enlightsolutions.com/
qrush - http://litanyagainstfear.com/
config.gem 'RedCloth', :version => '3.0.4', :lib => 'redcloth'
config.gem 'BlueCloth', :lib => 'bluecloth'
config.gem 'faker'
config.gem 'notahat-machinist', :lib => 'machinist',
:source => 'http://gems.github.com'
config.gem 'rubyzip', :lib => 'zip/zipfilesystem'
config.gem 'liquid'
config.gem 'will_paginate'
config.gem 'mocha'
config.gem 'coderay'
1) Failure:
test_should_swap_with_bottom_when_next_to_bottom_and_moving_to_bottom(PageExtensionsTest)
[/Users/nap/dev/episodic/vendor/extensions/reorder/test/unit/page_extensions_test.rb:60:in `test_should_swap_with_bottom_when_next_to_bottom_and_moving_to_bottom'
/Users/nap/dev/episodic/vendor/radiant/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
/Users/nap/dev/episodic/vendor/radiant/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'
/Users/nap/dev/episodic/vendor/radiant/vendor/plugins/dataset/lib/dataset/extensions/test_unit.rb:17:in `run']:
<[[5, "Page Y"], [6, "Page Z"]]> expected but was
<[[5, "Page Z"], [6, "Page Y"]]>.
2) Failure:
$('ul.menu li a.album').click(function() {
$('.page').hide();
$('#pt35mm').removeClass('hidden');
$('#pt35mm')[0].sspLoadAlbum($(this).attr('id'));
return false;
});