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

Custom location #8

Merged
merged 6 commits into from Dec 17, 2012
Merged

Custom location #8

merged 6 commits into from Dec 17, 2012

Conversation

yanick
Copy link
Contributor

@yanick yanick commented Dec 12, 2012

The main goal of the patch is to make it possible to configure a custom localtion_url (useful for testing, amongst other things). Along the way I create tests that can be run offline, which you might be interested in (caveat: they require Test::LWP::UserAgent).

... which is useful for tests where we want to mock
the user agent.

Also, makes the authentication lazy and a hook before any request.
... and the auth request will trigger authentication,
which will trigger a request, which will trigger
an authentication, which... you get the drift. :-)
For the case where, for example, containers() needs the token
before it uses a '_request' (and thus hasn't triggered a _authenticate()
call yet.
Uses Test::LWP::UserAgent. Also, I'm not very familiar with
the Rackspace stuff, so some of the test data might not make
a lot of sense.
useful for testing, updated urls or using private clouds
@Htbaa
Copy link
Owner

Htbaa commented Dec 12, 2012

Cool. Could you please add the new test dependencies to Makefile.PL with test_requires?

I don't have time yet to test it, but will probably be able to merge it this weekend.

The offline testing is a very much wanted feature and the requirement to have an account to test this module has always been a bit of a pain. I'm pondering if it would be a wise thing to no longer do live tests, though it would make it a bit harder to make sure the module properly works with the webservice. What do you think?

@yanick
Copy link
Contributor Author

yanick commented Dec 12, 2012

Updated dep.

As for the online tests, I would put them in a different directory (that's what I did in one of my modules, see yanick/www-ohloh-api). The casual user probably won't want to use it, but it's always nice for the author to be able to run the online tests from time to time, just to make sure the API didn't change (or that things are still working when it did).

Htbaa added a commit that referenced this pull request Dec 17, 2012
@Htbaa Htbaa merged commit 5d69ce5 into Htbaa:master Dec 17, 2012
@Htbaa
Copy link
Owner

Htbaa commented Dec 17, 2012

1.06 has been uploaded with your path in it.

For now I'll keep the current tests in simple.t.

@yanick
Copy link
Contributor Author

yanick commented Dec 18, 2012

Excellent. Thanks!

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.

None yet

2 participants