heroku / platform-api

Ruby HTTP client for the Heroku API
MIT License
214 stars 85 forks source link

log_session.create body should be optional #45

Closed technicalpickles closed 8 years ago

technicalpickles commented 8 years ago

Looking at http://heroku.github.io/platform-api/PlatformAPI/LogDrain.html#create-instance_method which is powered by https://devcenter.heroku.com/articles/platform-api-reference#log-session-create , all the parameters are optional, so I don't think log_session.create should require a body parameter.

This fails:

heroku.log_session.create(name, :lines => 100)
# vendor/gems/ruby/2.1.0/gems/platform-api-0.7.0/lib/platform-api/client.rb:1397:in `create': wrong number of arguments (1 for 2) (ArgumentError)

But this works:

    log_session = heroku_platform_api.log_session.create(name, {})

I've looked at the code of this gem enough to know it's generated by heroics, but I'm not sure this change is possible.

geemus commented 8 years ago

Hey, sorry for the delay (I was closing on a house and moving, so things got a little hectic), going to try and sort this out presently.

geemus commented 8 years ago

I think this should fix it, at least once we merge/etc and then rebuild this: https://github.com/interagent/heroics/pull/77

geemus commented 8 years ago

ok, I think this should now be available in 0.8.0 (via fixes in heroics 0.0.17).