Skip to content

Commit

Permalink
Update examples/rubyforge (to rubygems)
Browse files Browse the repository at this point in the history
rubyforg isn't available anymore, so i've changed the url, and then the formular instructions
  • Loading branch information
tsalmon committed Jan 26, 2015
1 parent b3f1902 commit 9b0b964
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/rubyforge.rb → examples/rubygems.rb
Expand Up @@ -10,11 +10,12 @@
mech.agent.http.debug_output = $stderr

# Load the rubyforge website
page = mech.get('http://rubyforge.org/')
page = mech.click page.link_with(:text => /Log In/) # Click the login link
page = mech.get('https://rubygems.org/')
page = mech.click page.link_with(:text => /Sign in/) # Click the login link
form = page.forms[1] # Select the first form
form.form_loginname = ARGV[0]
form.form_pw = ARGV[1]
form["session[who]"] = ARGV[0]
form["session[password]"] = ARGV[1]
form["commit"] = "Sign in"

# Submit the form
page = form.submit form.buttons.first
Expand Down

0 comments on commit 9b0b964

Please sign in to comment.