Skip to content

Instantly share code, notes, and snippets.

View spastorino's full-sized avatar

Santiago Pastorino spastorino

View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
users = %w(wyeworks spastorino joseicosta smartinez87 nartub)
tweets = users.map { |user_name| Twitter::Search.new.from(user_name) }.
inject([]) { |tweets, search| tweets + search.fetch(5).results }.
sort { |t1, t2| Date.parse(t2.created_at) <=> Date.parse(t1.created_at) }[0..4]
Pending Cases:
test_response_cache_control_from_rackish_app at ./test/dispatch/response_test.rb, line 190
test_response_cache_control_from_railsish_app at ./test/dispatch/response_test.rb, line 171
test_response_charset_and_content_type_from_rackish_app at ./test/dispatch/response_test.rb, line 226
test_response_charset_and_content_type_from_railsish_app at ./test/dispatch/response_test.rb, line 208
test_file_stream at ./test/controller/send_file_test.rb, line 54
santiago@debian:~/Documentos/WyeWorks/Proys/rails/actionmailer$ rake test
(in /home/santiago/Documentos/WyeWorks/Proys/rails/actionmailer)
/home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/core_ext/time/conversions.rb:64: warning: method redefined; discarding old to_date
/home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/core_ext/time/conversions.rb:81: warning: method redefined; discarding old to_datetime
(eval):1: warning: method redefined; discarding old template
/home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/core_ext/string/output_safety.rb:40: warning: discarding old concat
/home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb:168: warning: instance variable @_view_paths not initialized
/home/santiago/Documentos/WyeWorks/Proys/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb:168: warning: instance variable @default_ur
@spastorino
spastorino / gist:278638
Created January 16, 2010 04:23
Missings do on rdoc
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 6ecd506..67eb3f2 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1746,10 +1746,10 @@ module ActiveRecord #:nodoc:
# class Article < ActiveRecord::Base
# def self.find_with_scope
# with_scope(:find => { :conditions => "blog_id = 1", :limit => 1 }, :create => { :blog_id => 1 }) do
- # with_scope(:find => { :limit => 10 })
+ # with_scope(:find => { :limit => 10 }) do