Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making basic auth work with webrat and mechanize #64

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

knifhen
Copy link

@knifhen knifhen commented Sep 16, 2011

Hi,

I have made some changes to webrat to make the basic_auth method work with the mechanize adapter.
I have also added the possibility to configure follow redirects for mechanize.

It would be awesome if you want to merge my changes and make it public.

//Best regard Andreas Knifh

@tobyw4n
Copy link

tobyw4n commented Dec 13, 2011

Hey Andreas, I made these changes to webrat 0.7.2 and it works for basic_auth with mechanize 1.0.0, but the ability to follow redirects seems to be broken. Please let me know if I can assist with troubleshooting. I'm sort of new to all of this.

@knifhen
Copy link
Author

knifhen commented Dec 16, 2011

In my env.rb I have added the following. So if you can add the corresponding config with follow_redirects = true it should work

Webrat.configure do |config|
config.mode = :mechanize
config.follow_redirects = true
end

@tobyw4n
Copy link

tobyw4n commented Dec 16, 2011

That worked great. Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants