summaryrefslogtreecommitdiff
path: root/lib/chef/role.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:09:07 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:09:07 -0700
commit7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (patch)
tree1e390cd535b38368d091cbb33e5d419408d5ce00 /lib/chef/role.rb
parent77f8739a4741e2370e40ec39345a92a6ea393a1a (diff)
downloadchef-7a1a6c8ef26c787e4b6dd1602f3d158b37e81720.tar.gz
fix Layout/EmptyLineAfterGuardClause
i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/role.rb')
-rw-r--r--lib/chef/role.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb
index d0c1bc4327..a73b9d5183 100644
--- a/lib/chef/role.rb
+++ b/lib/chef/role.rb
@@ -226,6 +226,7 @@ class Chef
chef_server_rest.put("roles/#{@name}", self)
rescue Net::HTTPClientException => e
raise e unless e.response.code == "404"
+
chef_server_rest.post("roles", self)
end
self
@@ -253,6 +254,7 @@ class Chef
if js_files.count > 1 || rb_files.count > 1
raise Chef::Exceptions::DuplicateRole, "Multiple roles of same type found named #{name}"
end
+
js_path, rb_path = js_files.first, rb_files.first
if js_path && File.exists?(js_path)