Created
February 12, 2013 06:52
-
-
Save yasuhito/4760689 to your computer and use it in GitHub Desktop.
Vote-for-Trema-on-every-packet_in-receive controller
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 "mechanize" | |
class VoteForTrema < Controller | |
def start | |
info "OK, I'm registered to vote" | |
end | |
def packet_in dpid, message | |
Mechanize.new { | agent | | |
agent.user_agent_alias = "iPhone" | |
agent.get "http://www.micropoll.com/a/mpview/1130680-3744756" | |
agent.click "Trema" | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment