lib/chef-api/aclable.rb in chef-api-0.10.0 vs lib/chef-api/aclable.rb in chef-api-0.10.2
- old
+ new
@@ -1,9 +1,9 @@
module ChefAPI
module AclAble
def acl_path
- self.resource_path + '/_acl'
+ resource_path + "/_acl"
end
def load_acl
data = self.class.connection.get(acl_path)
# make deep copy
@@ -12,24 +12,24 @@
@acl = data
end
def acl
unless @acl
- self.load_acl
+ load_acl
end
@acl
end
def save!
super
if @acl != @orig_acl_data
- %w(create update grant read delete).each{|action|
+ %w{create update grant read delete}.each { |action|
if @acl[action] != @orig_acl_data[action]
- url = "#{self.acl_path}/#{action}"
- self.class.connection.put(url, {action => @acl[action]}.to_json)
+ url = "#{acl_path}/#{action}"
+ self.class.connection.put(url, { action => @acl[action] }.to_json)
end
}
end
end
end
-
+
end