liberator

ordnungswidrig 2015-10-18T19:25:23.000021Z

@jonas: this might be a bug.

jonas 2015-10-18T19:26:03.000022Z

yeah, if it’s not on purpose I guess it’s a bug. I guess my second snippet would be a solution?

jonas 2015-10-18T19:27:00.000023Z

Should I open a PR? I guess it might break some code if someone is relying on request being available?

ordnungswidrig 2015-10-18T19:27:55.000024Z

yes, that would be nice.

ordnungswidrig 2015-10-18T19:28:25.000025Z

and please provide a test case and an entry to CHANGES.markdown which would make my life easier :simple_smile:

jonas 2015-10-18T19:29:44.000026Z

ok. Not quite sure how to test this? Check that request is not defined inside defresource?

ordnungswidrig 2015-10-18T19:30:32.000027Z

check that using „request“ as a parameter name to defresource works.

ordnungswidrig 2015-10-18T19:31:14.000028Z

(liberator.core/defresource xxx [request] :handle-ok (str request))
((xxx "test") {:request-method :get})
;; => {:status 200, :headers {"Content-Type" "text/plain;charset=UTF-8"}, :body "{:request-method :get}“}

ordnungswidrig 2015-10-18T19:31:52.000030Z

this should maybe return „test“ instead.

jonas 2015-10-18T19:32:41.000031Z

ok. I will add such a test

ordnungswidrig 2015-10-18T19:33:06.000032Z

\o/

jonas 2015-10-18T19:56:40.000033Z

@ordnungswidrig: Do you mind if my editor removed some trailing whitespace? https://github.com/jonase/liberator/commit/860bb0978f98a4a13faec1fa2495f0045962f032

jonas 2015-10-18T19:59:24.000034Z

I opened the PR: https://github.com/clojure-liberator/liberator/pull/234 Let me know if something is wrong/missing

ordnungswidrig 2015-10-18T20:08:16.000036Z

that was quick!

ordnungswidrig 2015-10-18T20:08:57.000037Z

Thank! I did some bikeshedding and can merge when you updated the pr.

jonas 2015-10-18T20:09:54.000038Z

Cool! Do you want squashed commits or can I just add the changes as new commits?

ordnungswidrig 2015-10-18T20:19:58.000040Z

Yes, squashed, please for these minor changes.

jonas 2015-10-18T20:26:19.000042Z

New PR, with your suggested changes: https://github.com/clojure-liberator/liberator/pull/235

ordnungswidrig 2015-10-18T20:26:32.000044Z

Fine! You could have force pushed to your existing branch. No need open a new PR.

jonas 2015-10-18T20:28:37.000045Z

Yeap, I should have done that.

jonas 2015-10-18T20:45:43.000046Z

@ordnungswidrig: Thanks for the merge and thanks for liberator!

ordnungswidrig 2015-10-18T20:45:57.000047Z

:simple_smile: