antony / grails-oauth-scribe

Grails Oauth plugin using the Scribe library
23 stars 40 forks source link

Use grailsApplication.config to access runtime configuration. #15

Closed pledbrook closed 12 years ago

pledbrook commented 12 years ago

OauthService was using ConfigurationHolder, which is pretty bad practice. This updates it to use grailsApplication.config instead. The unit tests have also been updated for this change. In particular, the unit test no longer extends UnitSpec.

This also means that the tests work from the command line!

antony commented 12 years ago

Excellent! Thanks for this.

I think the config holder was a hangover from 1.3.7.

Will merge all pull requests after work! On Jul 27, 2012 12:07 PM, "Peter Ledbrook" < reply@reply.github.com> wrote:

OauthService was using ConfigurationHolder, which is pretty bad practice. This updates it to use grailsApplication.config instead. The unit tests have also been updated for this change. In particular, the unit test no longer extends UnitSpec.

This also means that the tests work from the command line!

You can merge this Pull Request by running:

git pull https://github.com/pledbrook/grails-oauth-scribe patch-3

Or you can view, comment on it, or merge it online at:

https://github.com/aiten/grails-oauth-scribe/pull/15

-- Commit Summary --

  • Use grailsApplication.config to access runtime configuration.

-- File Changes --

M grails-app/services/uk/co/desirableobjects/oauth/scribe/OauthService.groovy (21) M test/unit/uk/co/desirableobjects/oauth/scribe/AuthorisationProcessSpec.groovy (8) M test/unit/uk/co/desirableobjects/oauth/scribe/OauthServiceSpec.groovy (410)

-- Patch Links --

https://github.com/aiten/grails-oauth-scribe/pull/15.patch https://github.com/aiten/grails-oauth-scribe/pull/15.diff


Reply to this email directly or view it on GitHub: https://github.com/aiten/grails-oauth-scribe/pull/15

antony commented 12 years ago

Cheers Peter - had been meaning to do this for a while now! Thanks for the hard work.