lib/ridley/connection.rb in ridley-0.2.1 vs lib/ridley/connection.rb in ridley-0.2.2
- old
+ new
@@ -90,9 +90,13 @@
unless uri_hash[:port]
uri_hash[:port] = (uri_hash[:scheme] == "https" ? 443 : 80)
end
+ if org_match = options[:server_url].match(/.*\/organizations\/(.*)/)
+ @organization ||= org_match[1]
+ end
+
unless organization.nil?
uri_hash[:path] = "/organizations/#{organization}"
end
server_uri = Addressable::URI.new(uri_hash)