lib/stella/api.rb in stella-2.1.0.001 vs lib/stella/api.rb in stella-2.1.1.001
- old
+ new
@@ -24,9 +24,14 @@
def post path, params=nil
opts = httparty_opts
opts[:body] = params || {}
execute_request :post, path, opts
end
+ def site_uri path
+ uri = Addressable::URI.parse self.class.base_uri
+ uri.path = uri_path(path)
+ uri.to_s
+ end
private
def uri_path *args
args.unshift '' # force leading slash
path = args.flatten.join('/')
path.gsub '//', '/'
\ No newline at end of file