diff options
author | John Keiser <jkeiser@opscode.com> | 2014-05-27 07:21:22 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-05-27 07:21:22 -0700 |
commit | a2ed7c6cfefeb94fe2831093b35196f7ac123383 (patch) | |
tree | fa092064aba5507a4aac17309bb57e0f288693d9 | |
parent | 8c463a8424d0c028c0cb5c4ad2fadb0bfb01deb0 (diff) | |
download | chef-zero-a2ed7c6cfefeb94fe2831093b35196f7ac123383.tar.gz |
Make external build_uri calls work
-rw-r--r-- | lib/chef_zero/rest_base.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef_zero/rest_base.rb b/lib/chef_zero/rest_base.rb index de81ae6..1ed7366 100644 --- a/lib/chef_zero/rest_base.rb +++ b/lib/chef_zero/rest_base.rb @@ -119,6 +119,7 @@ module ChefZero [response_code, {"Content-Type" => "application/json"}, json_text] end + # To be called from inside rest endpoints def build_uri(base_uri, rest_path) if server.options[:single_org] # Strip off /organizations/chef if we are in single org mode @@ -132,6 +133,7 @@ module ChefZero end def self.build_uri(base_uri, rest_path) + "#{base_uri}/#{rest_path.join('/')}" end def populate_defaults(request, response) |