Skip to content

Basic auth optional support#1

Open
samvincent wants to merge 1 commit intoEventshare:masterfrom
samvincent:support-basic-auth
Open

Basic auth optional support#1
samvincent wants to merge 1 commit intoEventshare:masterfrom
samvincent:support-basic-auth

Conversation

@samvincent
Copy link

Looks like this is the fork of the moment (Thank you! Needed phantom 2.1.1)

If you prefer I send a pull request upstream rather, let me know.

it 'should support basic auth' do
url = 'http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?' + "0.#{rand(99999999)}" # hosted example requires fresh seed
screenshot = Screencap::Fetcher.new(url).fetch(:output => TMP_DIRECTORY + 'httpwatch.jpg', :auth => 'httpwatch:screencap', :width => 300, height: 60)
FastImage.size(screenshot)[0].should == 300
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this fail if auth is invalid? Seems like it might screenshot an error page?

@jeremyk
Copy link

jeremyk commented Apr 4, 2016

This looks ok to me but I'm not really the maintainer so not sure I want to bundle it with the changes here. Any change you can submit it separately?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants