Skip to content

Instantly share code, notes, and snippets.

@jdx
Created December 6, 2012 22:46
Show Gist options
  • Select an option

  • Save jdx/4229182 to your computer and use it in GitHub Desktop.

Select an option

Save jdx/4229182 to your computer and use it in GitHub Desktop.
# How do I make this:
skip_authorization do |current_resource_owner, client|
client.application.auto_grant?
end
# Work with this:
!!instance_exec(@server.current_resource_owner, @pre_auth.client) &Doorkeeper.configuration.skip_authorization
# in both 1.8 and 1.9, without failures like this: https://travis-ci.org/applicake/doorkeeper/builds/3540040
@jdx

jdx commented Dec 6, 2012

Copy link
Copy Markdown
Author

possibly the more informative error:
https://travis-ci.org/applicake/doorkeeper/jobs/3539947

when it looks like this:

!!instance_exec(@server.current_resource_owner, @pre_auth.client) &Doorkeeper.configuration.skip_authorization

@jdx

jdx commented Dec 6, 2012

Copy link
Copy Markdown
Author

er

!!instance_exec(@server.current_resource_owner, @pre_auth.client, &Doorkeeper.configuration.skip_authorization)

@jdx

jdx commented Dec 6, 2012

Copy link
Copy Markdown
Author

fixed it!

!!instance_exec([@server.current_resource_owner, @pre_auth.client], &Doorkeeper.configuration.skip_authorization)

for those curious

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