diff options
author | Jeremy J. Miller <jm@chef.io> | 2017-03-09 11:49:08 -0500 |
---|---|---|
committer | Jeremy J. Miller <jm@chef.io> | 2017-03-09 11:49:08 -0500 |
commit | 1be9d4fa6fe15797daeb880b52a26ec6aed0a624 (patch) | |
tree | 97043dcd9dc7d8743755c756df2db8ed12df6c8e | |
parent | f83d4e89405c0daa8bbaf1e381788bfc6f86385f (diff) | |
download | chef-1be9d4fa6fe15797daeb880b52a26ec6aed0a624.tar.gz |
rename target_object to this_object_cache
Signed-off-by: Jeremy J. Miller <jm@chef.io>
-rw-r--r-- | lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb index 63a1eeccff..22a8c54511 100644 --- a/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb @@ -30,7 +30,7 @@ class Chef def initialize(name, parent, exists = nil) super(name, parent) @exists = exists - @target_object = nil + @this_object_cache = nil end def data_handler @@ -70,7 +70,7 @@ class Chef def exists? if @exists.nil? begin - @target_object = rest.get(api_path) + @this_object_cache = rest.get(api_path) @exists = true rescue Net::HTTPServerException => e if e.response.code == "404" @@ -87,7 +87,7 @@ class Chef def delete(recurse) # free up cache - it will be hydrated on next check for exists? - @target_object = nil + @this_object_cache = nil rest.delete(api_path) rescue Timeout::Error => e raise Chef::ChefFS::FileSystem::OperationFailedError.new(:delete, self, e, "Timeout deleting: #{e}") @@ -105,7 +105,7 @@ class Chef end def _read_json - @target_object ? JSON.parse(@target_object) : root.get_json(api_path) + @this_object_cache ? JSON.parse(@this_object_cache) : root.get_json(api_path) rescue Timeout::Error => e raise Chef::ChefFS::FileSystem::OperationFailedError.new(:read, self, e, "Timeout reading: #{e}") rescue Net::HTTPServerException => e @@ -155,7 +155,7 @@ class Chef other_value_json = Chef::JSONCompat.to_json_pretty(other_value) # free up cache - it will be hydrated on next check for exists? - @target_object = nil + @this_object_cache = nil [ value == other_value, value_json, other_value_json ] end |