Closed joelmoss closed 12 years ago
I'm not a big fan of this approach ie adding options params. Especially if there's only one valid option in the hash. I think it'd be better to update the regex of the domain
method (https://github.com/mwunsch/weary/blob/master/lib/weary/resource.rb#L25):
@uri = Addressable::Template.new(uri.gsub(/:(\w+)/) { "{#{$1}}" }) unless uri.nil?
to a pattern that match the word after a colon only if it does not begin with a digit.
When specifying the port number in the domain or path (
http://localhost:9200
), Weary is treating it as a URL variable, which is not correct. Not sure how best to handle this, but it's a definate blocker. for me, and I am sure for a lot of others.Perhaps
Weary::Client.domain
should accept an option that tells Weary to ignore colon prefixed URL variables, like this:I would be happy to implement this. Thoughts?