Closed dehubbed closed 11 years ago
Looks good to me?
=> (str (com.ashafa.clutch.utils/url "database_name"))
"http://localhost:5984/database_name"
BTW, "Ashafa" is someone's name, just like "cemerick" is (sorta). It's just a maven groupId / Clojure namespace.
It works for localhost but not other hosts.
So you want (str (com.ashafa.clutch.utils/url "http://hostname/database_name"))
=> "http://hostname:5984/database_name"
?
P.S. in the clojure community I know no other groupIds/namespaces (other than ashafa and cemerick) that have people's names in it.
yes that's what it did in clutch before. I'm cool with the change but the ideas is to not break existing code normally.
As long as the rev is < 1.0.0
, breakage is possible (and generally noted here). In this case, the new behaviour is preferable IMO; if you're providing a base URL, then I think you should be trusted to be providing a full base URL. Especially if the URL is https, then bashing in 5984 when a port isn't specified is not helpful.
There are other names-as-groupIds, in the Clojure world and elsewhere. It's convenient, and IMO better than antipatterns like ring/ring
, etc.
ok
apart from issue #64 the move to cemerick.url broke clutch.utils/url even more: previously the default port when not given was 5984, now this has to be explicitly specified
p.s. what's that with people's names in namespace names, that's seriously uncool