librato / librato-metrics

Ruby wrapper to make it easy to interact with Librato's API.
https://librato.com
Other
108 stars 51 forks source link

Access Faraday environment using `#[]` #138

Closed oggy closed 7 years ago

oggy commented 7 years ago

We're seeing env come through as a Hash rather than a Faraday::Response here. Faraday's middleware docs are poor, but it seems common to look up environment values using [] rather than relying on the methods of Response, presumably because this can happen.

If it makes a difference, we're using Faraday 0.8.11, but librato-metrics does not specify any version requirements.

oggy commented 7 years ago

Ah, I just saw the discussion in #134 . I'll see if Faraday 0.9 will work for us.

Either way, I think either a version requirement should be set, or support for 0.8 should be added.

nextmat commented 7 years ago

Yeah I agree. We should fix this so it works cleanly with 0.8.x+

oggy commented 7 years ago

Great! As a data point we've been running with this patch for the past week or so and no problems for us.

chancefeick commented 7 years ago

@oggy Thanks for your contribution. Released in v2.1.2.