summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/file_system/rest_list_dir.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-10-09 13:40:21 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-10-09 13:40:21 -0700
commitc13e335c6d87c50212589fdac75e46c62712ed97 (patch)
tree80bbedcdaab9e33e76cd5bf86a82a926ec876376 /lib/chef/chef_fs/file_system/rest_list_dir.rb
parenta5337fcad5ed979078b6cf57c7e1e6ec8f0b76cf (diff)
downloadchef-c13e335c6d87c50212589fdac75e46c62712ed97.tar.gz
Add "get_json" helper to upload/download root dir for people who want json
Diffstat (limited to 'lib/chef/chef_fs/file_system/rest_list_dir.rb')
-rw-r--r--lib/chef/chef_fs/file_system/rest_list_dir.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/chef/chef_fs/file_system/rest_list_dir.rb b/lib/chef/chef_fs/file_system/rest_list_dir.rb
index 3a0ea4f37e..b7ee51d284 100644
--- a/lib/chef/chef_fs/file_system/rest_list_dir.rb
+++ b/lib/chef/chef_fs/file_system/rest_list_dir.rb
@@ -45,7 +45,7 @@ class Chef
def children
begin
- @children ||= rest_json.get(api_path).keys.sort.map do |key|
+ @children ||= root.get_json(api_path).keys.sort.map do |key|
_make_child_entry("#{key}.json", true)
end
rescue Timeout::Error => e
@@ -106,10 +106,6 @@ class Chef
parent.rest
end
- def rest_json
- parent.rest_json
- end
-
def _make_child_entry(name, exists = nil)
RestListEntry.new(name, self, exists)
end