Permalink
Browse files

moving everything to the trunk

git-svn-id: svn+ssh://rubyforge.org/var/svn/mechanize/trunk@7 f1cf478b-080f-0410-abad-959bfeec9ea8
  • Loading branch information...
1 parent 764e2a5 commit f98e25450ac2985e82ea5372e234c8420b17798d aaronp committed Mar 17, 2006
View
15 README
@@ -0,0 +1,15 @@
+== Dependencies
+
+* ruby 1.8.2
+
+Note that the files in the net-overrides/ directory are taken from Ruby 1.9.0.
+
+* narf 0.6.3 (www.narf-lib.org)
+
+ After unpacking, install it with:
+
+ ruby install.rb config
+ ruby install.rb setup
+ ruby install.rb install
+
+ Note that only the ruby-htmltools package bunded with narf works.
View
@@ -0,0 +1,14 @@
+task :tag do
+ if File.read('lib/mechanize.rb') =~ /Version\s+=\s+"(\d+\.\d+\.\d+)"/
+ version = $1
+ else
+ raise "no version"
+ end
+ baseurl = "svn+ssh://ntecs.de/data/projects/svn/public/Mechanize"
+
+ sh "svn cp -m 'tagged #{ version }' #{ baseurl }/trunk #{ baseurl }/tags/mechanize-#{ version }"
+end
+
+task :package do
+ sh 'gem build mechanize.gemspec'
+end
View
@@ -0,0 +1,13 @@
+$LOAD_PATH.unshift '../lib'
+require 'mechanize'
+
+agent = WWW::Mechanize.new {|a| a.log = Logger.new(STDERR) }
+page = agent.get('http://rubyforge.org/')
+link = page.links.find {|l| l.node.text =~ /Log In/ }
+page = agent.click(link)
+form = page.forms[1]
+form.fields.find {|f| f.name == 'form_loginname'}.value = ARGV[0]
+form.fields.find {|f| f.name == 'form_pw'}.value = ARGV[1]
+page = agent.submit(form, form.buttons.first)
+
+puts page.body
Oops, something went wrong.

0 comments on commit f98e254

Please sign in to comment.