This weekend I went mushroom hunting and found about 6 Chanterelle mushrooms, and they were delicious! I made cream of mushroom soup with Chanterelles for the main course, and a Tres Leches cake for desert. I still have about three pound left. I think I’ll go hunting them again next weekend. I can’t wait! I’m thinking about giving a few to zenspider a few since I know how much he loves them.
Recently, I’ve been refactoring Mechanize and I’ve added support for a few new things. First, mechanize now (and when I say “now”, I mean whats checked in) supports “file://” urls. For example:
agent = WWW::Mechanize.new
page = agent.get("file:///Users/aaron/some_file.html")
Directories work too. Mechanize will turn directories in to a list of links for your navigation convenience. I’ve also added criteria based searching to links and frames. For example:
agent = WWW::Mechanize.new
agent.get('http://google.com/') do |page|
page = page.form_with(:name => 'f') do |form|
form.q = 'Aaron Patterson'
end.submit
page.links_with(:text => /tender/i).each do |link|
puts link.text
end
end
There is a singular and plural form. So you can locate many or one form, link, iframes, etc.
These changes will go in to an 0.8.0 release. However, I’m planning larger changes for a 1.0.0 release. I want to get rid of the WWW namespace, and stick with just Mechanize. I think that would probably be the largest change between 0.8.0 and 1.0.0 that I can think of. If you’d like to try out the new changes, just grab the gem from github: “gem install tenderlove-mechanize -s http://gems.github.com”.
Finally, I will be teaching the Ruby Certificate course at the UW. There are 3 courses, beginning Ruby, Ruby with Rails, and Advanced Topics in Ruby. Ryan will be teaching the beginning course, I’ll be teaching the Rails course, and I will be co-instructing the advanced course with Ryan. I am considering using The Rails Way or Agile Web Development with Rails (3rd ed). I’m leaning towards the Agile book, but we’ll see! Anyway, you should sign up!


I’d go with Agile Web Development with Rails if I were teaching. I would use The Rails Way for sidebar content once the core concepts were understood.
cool
didnt even know you had a blog
added to my list of ruby-blogs i can visit
mechanize rocks!
Oh btw i agree with this:
“I want to get rid of the WWW namespace, and stick with just Mechanize”
I just used mechanize for a local page, and the WWW felt a bit misplaced (i mean… with my http://localhost part i dont even need access to the www. only apache on localhost or even webrick. But granted it is a quite minor thing )
Hi,
I’m currently using Agile Web Dev with Rails (3rd) as a textbook for a college level (http://rrc.mb.ca/) Ecommerce/Rails course. I highly recommend it. Each chapter of the Depot tutorial works nicely as an assignment (with my own additions so that the assignments aren’t trivial). I looked into using the Rails Way, but I find it’s best used as a reference as it assumes some familiarity with Rails.
I made a quick outline of the required Ruby/Rails knowledge for each chapter of the Agile book:
http://stungeye.infogami.com/RequireKnowledgeforAgileRails
Hit me up with an email if you are interested in chatting about this further.
Markdown ate my link:
http://stungeye.infogami.com/RequireKnowledgeforAgileRails
I’m not sure if slash-escaping the underlines will work, if not feel free to remove this comment.