I have a Rails app with OAuth API. I'm using Doorkeeper gem for the OAuth 2 authentication. My API allows posting messages with image file attachments. I'd like to test it from Ruby console. Now, the problem is - how do I sign the post requests with the access token?
Doorkeeper wiki provides a tutorial on testing API with the OAuth2 gem itself. The problem there is that OAuth2 class doesn't provide ways of posting multiparted messages with the file attachments (as far as I got it).
https://github.com/applicake/doorkeeper/wiki/Testing-your-provider-with-OAuth2-gem
Then again there is multipart-post gem, which allows posting files as attachment to the Rails API. But I don't get how to sign such request with an access_token, and to pass the Doorkeeper authentication.
https://github.com/nicksieger/multipart-post
So what is the proper way of posting multiparted messages to Rails API signed with the access_token?