Closed raul closed 11 years ago
Sorry I totally missed this PR. It looks good to me, the change of method name might break a few things tho, but that's also easily fixable and the new name is actually better.
Thanks @mattetti – are you willing to keep WS active or are you more focused on Go-based APIs these days? :) Since I read your post I'm really tempted to learn Go and use it instead of Ruby for any small API that I need to work on.
I'm willing to keep WS active but would def. need some help maintaining the project. For my own startup i'm using Rails for the frontend and Go for the API so I'm using WS for this specific project.
Since reading some of your tweets and Go articles I've also been considering trying out Go to build an API. Planning any posts about your experiences building your API in Go?
I'm planning on writing a book but that won't happen until my startup is launched :)
On Tue, Aug 20, 2013 at 4:44 PM, Jack Chu notifications@github.com wrote:
Since reading some of your tweets and Go articles I've also been considering trying out Go to build an API. Planning any posts about your experiences building your API in Go?
— Reply to this email directly or view it on GitHubhttps://github.com/mattetti/Weasel-Diesel/pull/25#issuecomment-22986259 .
Can you please sign me up as a beta reader? :)
While adding support for top-level array responses I found
JSONResponseVerification
's internals a bit complicated so I refactored them. Some notes:#validate_hash_response
with a more vague#verify
: the input now can be a hash or an array, and once we extend WD so specify response headers and status code we'll probably want to verify headers, status code and the response body under a single#verify
public method. The old method is still supported as an alias, but I'd like to remove it once we bump to a new version if this PR gets approved.flatten
ed before being returned.All specs are passing but I don't have an actual production API to test it yet, so cases not covered by the test suite may break.