Created
August 1, 2012 00:09
-
-
Save jrod01/3221917 to your computer and use it in GitHub Desktop.
Voting info bot
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
namespace send do | |
desc "Send info to random user for voting info" | |
task :search => enviroment do | |
Twitter.search("Voting Info",:result_type => "recent").results.map do |status| | |
puts "#{status.from_user}: #{status.text}" | |
Twitter.search("Polling Place)",:result_type => "recent").results.map do |status| | |
puts "#{status.from_user}: #{status.text}" | |
Twitter.search("voting precint)",:result_type => "recent").results.map do |status| | |
puts "#{status.from_user}: #{status.text}" | |
def pick(model_class) | |
model_class.find(:search, =>'RAND()') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/mysql2.gemspec:10:in ``'
'/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/mysql2.gemspec:10:in
block in <main>' /Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1368:in
initialize'/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/mysql2.gemspec:3:in`new'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194/bundler/gems/mysql2-cd443a94ecab/mysql2.gemspec:3:in `
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:280:in`eval'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:280:in `rescue in block in load_gemspec'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:275:in`block in load_gemspec'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:273:in `chdir'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:273:in`load_gemspec'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/source.rb:340:in `block in load_spec_files'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/source.rb:339:in`each'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/source.rb:339:in `load_spec_files'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/source.rb:572:in`load_spec_files'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/source.rb:372:in `local_specs'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/source.rb:557:in`specs'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/lazy_specification.rb:53:in `materialize'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/spec_set.rb:86:in`block in materialize'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `map!'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in`materialize'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/definition.rb:127:in `specs'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/definition.rb:172:in`specs_for'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/definition.rb:161:in `requested_specs'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/environment.rb:23:in`requested_specs'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:11:in `setup'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:107:in`setup'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in`require'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in`require'
/Users/jonathanrodriguez/snow_sample/config/boot.rb:6:in `<top (required)>'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/jonathanrodriguez/snow_sample/config/application.rb:1:in`<top (required)>'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/jonathanrodriguez/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require'
/Users/jonathanrodriguez/snow_sample/Rakefile:5:in `<top (required)>'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in`load'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:501:in`raw_load_rakefile'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in`standard_exception_handling'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:65:in`block in run'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in`run'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in`load'
/Users/jonathanrodriguez/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `'
jrod:snow_sample jonathanrodriguez$