search for: schapht

Displaying 20 results from an estimated 20 matches for "schapht".

Did you mean: schacht
2007 Jul 15
3
rejected form not handled
Hello, I have a login form on /login.php which POSTs to /dorf1.php when access is granted and to /login.php when it is denied. require ''rubygems'' require ''mechanize'' agent = WWW:Mechanize.new() login = agent.get("http://server/login.php") form = login.forms.action("dorf1.php") form.fields[2].value = "wronguser" # login
2006 Aug 07
3
Monitoring Rails apps?
I just had an interesting meeting with developers from other parts of my company. One of the things they said they really liked about Java- based solutions was the availability of sys-admin tools to monitor Java (probably J2EE) applications. Nothing comes to mind in the RoR camp to cover this. I''m sure there are plenty of generic tools for watching pings and log files, but is
2006 Aug 01
8
Dumb views?
Hello again! I''ve another "what would you do in this situation" question. You''ve got 6 controllers, one named base. The other 5 controllers extend base. Currently they share one layout. Your layout displays navigation. However, there are two actions inside base for which you do not want navigation displayed (index, new). Do you... a) Add logic to your layout telling
2006 Jul 07
1
FYI: Manuals Site
I didn''t get much notice on #rubyonrails, so I thought I''d post here: http://manuals.rubyonrails.com/ looks pretty broken, also lots of "book not found" errors: http://manuals.rubyonrails.com/read/book/17 -Mat
2008 Jul 10
1
custom http headers in form.submit / upload without original form
Heyas :) I''m wondering how do I do to send my custom HTTP headers when posting a form. agent.set_headers is a private method and I don''t know how to get a reference to HTTPHeaders to use add_field and such. Since my request is a form, I''m sending it using agent.submit(form). Any hints? Bonus question: I would like to upload a file to a REST webservice, but I
2007 Jun 29
0
(no subject)
Thanks Mat. ----- Original Message ---- From: Mat Schaffer <schapht at gmail.com> To: Ruby Mechanize Users List <mechanize-users at rubyforge.org> Sent: Friday, June 29, 2007 7:22:40 AM Subject: Re: [Mechanize-users] (no subject) On Jun 26, 2007, at 11:33 AM, Matt White wrote: Hello, I am on a page that lists 78 items and can only show 25 per page, so...
2006 Sep 18
2
BUG: Possible issue with escaped hrefs
...with spaces.html'' --- test.rb require ''rubygems'' require ''mechanize'' agent = WWW::Mechanize.new # Un-comment to debug using Charles # agent.set_proxy(''localhost'', ''8888'') first = agent.get(''http://localhost/~schapht/link_test/start.html'') second = agent.click(first.links.first) puts second.body --- end test.rb Expected: This page is after the link. Actual: /opt/local/lib/ruby/1.8/net/http.rb:1049:in `request'': Unhandled response (WWW::Mechanize::ResponseCodeError) [likely due to 404] F...
2007 Jan 27
7
Getting elements from a web page
I am new to Mechanize and was wondering if there was a built-in method to get the elements that are on the page that are not part of a form. A couple of examples would be my banking site lists my entries and I want them to go into an array so that I can handle them. Or another site I use, does some categorization for me and I would like to manipulate it and present it differently to a user.
2006 Aug 04
2
MacOS + darwinport + rubygems
Hi, Installing ruby (following wiki recommandations) with darwinport, I have the following error when I want to install rails gem: /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'': no such file to load -- sources (LoadError) from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from
2006 Aug 14
2
Rails Monitoring, reprise
Last week I posted a question about monitoring Rails applications. Basically, the java folks at my business cited one of their reasons for sticking with Java is it''s monitoring tools. After picking some ears, I found out that the one we''re looking at most is JBoss Operations Network. And I have to say, it''s pretty neat.
2006 Jul 31
17
Ruby on Snails
I''ve been reading, hearing, and looking at blogs that state Ruby on Rails is rather slow. Coming from a VB 6 world (thank you Microsoft for killing VB because VB.NET is NOT VB) I was always told that VB was a toy or too slow. Now, I''ll easily tell you that yes VB was not a great language. It had it''s share of warts, like a lot of other languages I might add, but
2007 Jul 23
4
Design ideas
I''m trying to use mechanize against a site that has four fields in the form. However, those four fields have to be filled in order. So putting something in field one, populates the second field drop down. So I''m thinking that I''ll probably have to call the page multiple times? What sort of things should I be doing to figure out how to interact with this page.
2006 Jul 27
0
Profiling functional tests
I looked at the basic profiling information in the Agile book and around google, but the profiler script that comes with rails doesn''t really seem sufficient. Something like: ruby -r profile <functional test file> Seems a lot more like what I''m trying to get at. But is there any solution that I missed that will give me nice profiling output for functional test
2006 Jul 21
0
[PATCH] TestResponseBehavior#binary_content calls block improperly
(In lieu of the broken bug-tracker) TestResponseBehavior#binary_content calls the block generated by send_file with no parameters. But the block created at http:// dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/ streaming.rb#L68 expects a response and an output stream. The following patch corrects the block.call in binary_content at
2006 Sep 08
0
links behavior in 0.6.0
Here''s what I mentioned on ruby-talk a little while ago. Basically mechanize 0.5.4 could match a link on a regexp regardless of children in that link. 0.6.0 can''t. Here''s a demonstration, but I can''t get require_gem to properly load 0.5.4 for some reason. I keep getting "uninitialized constant WWW (NameError)". Under 0.5.4 it will return
2006 Jul 28
2
Slowness on PUT requests
I''ve been noticing about a 2 second pause between PUT requests when running either webrick or mongrel. GET, LIST and DELETE all work great. I tested this by using curl to make a lot of continuous requests. Even if I remove everything from the controller method and just replace it with render(:nothing => true) I still get the lag. So I don''t think it''s
2007 Jul 24
3
Jruby + Rhino = Javascript support?
Hey Aaron, I''m just thinking out loud here, but have you considered the possibility of using the Rhino [1] library to implement javascript support in mechanize? It''d create a jruby dependency for that feature, but still. Just thought I''d bring it up while I was thinking about it. -Mat [1] http://www.mozilla.org/rhino/
2006 Nov 02
5
Adding fields to a form
Is there a decent way to add a field to a form before posting it? I haven''t tried using HPricot manipulations just yet, since I can''t ever find really solid docs on hpricot.... Form#[]= doesn''t work because it first searches only pre-existing fields. I''m investigating how to write a patch now. But I thought maybe someone here might have an idea.
2006 Sep 26
7
Interesting mechanize difficulty
I found an interesting page today that I was trying to script against. The server returns a 404 with content and the page just works normally in firefox despite the 404. Mechanize raises an exception on it though. I''m working on a test case now.
2007 Jul 02
6
Basic auth bug in 0.6.9
I haven''t spent the time to get a proper test case for this yet, but there appears to be a bug in the basic_auth code for mechanize 0.6.9. I''ve attached a CSV (from Charles) that illustrates the problem. Basically when running with basic_auth, there''s a failed request that''s followed up by a successful request. That last POST is a agent.submit(form)