summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/rest_object_endpoint.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-02-15 15:10:07 +0000
committerThom May <thom@chef.io>2018-02-15 15:19:08 +0000
commit0f8280aa100aa60238f39f9df66ecba700fdc16f (patch)
treee46d909ba0aaff765b259f9739628cafd14c40f8 /lib/chef_zero/endpoints/rest_object_endpoint.rb
parent0ac00a8e04dcdf4298c68d92d047eb1c2cf04351 (diff)
downloadchef-zero-0f8280aa100aa60238f39f9df66ecba700fdc16f.tar.gz
chefstyle 0.6
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef_zero/endpoints/rest_object_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/rest_object_endpoint.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef_zero/endpoints/rest_object_endpoint.rb b/lib/chef_zero/endpoints/rest_object_endpoint.rb
index c35133f..887905e 100644
--- a/lib/chef_zero/endpoints/rest_object_endpoint.rb
+++ b/lib/chef_zero/endpoints/rest_object_endpoint.rb
@@ -20,7 +20,7 @@ module ChefZero
def put(request)
# We grab the old body to trigger a 404 if it doesn't exist
- old_body = get_data(request)
+ get_data(request)
# If it's a rename, check for conflict and delete the old value
if is_rename?(request)
@@ -69,7 +69,7 @@ module ChefZero
# Does this request change the value of the identity key?
def is_rename?(request)
- return false unless key = identity_key_value(request)
+ return false unless (key = identity_key_value(request))
key != request.rest_path[-1]
end
end