summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-12 13:38:34 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-12 13:38:34 -0800
commit30895241dfde87d74e3caaf649a118ea2aa304d1 (patch)
tree077958295f1b8c8ca5c7fea1f227204eedef7559 /lib/chef
parent812101f11a6c33e49f401ad72598ca6ffb38adc4 (diff)
downloadchef-30895241dfde87d74e3caaf649a118ea2aa304d1.tar.gz
more rubocop fixeslcg/more-rubocop-lint
fixes: Lint/UnreachableCode Lint/NonLocalExitFromIterator Lint/LiteralInCondition Lint/EmptyEnsure Lint/DefEndAlignment Lint/CircularArgumentReference
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/data_bag_item.rb4
-rw-r--r--lib/chef/mixin/why_run.rb4
-rw-r--r--lib/chef/provider/service/macosx.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/data_bag_item.rb b/lib/chef/data_bag_item.rb
index 7ef9fffe07..b0713c298f 100644
--- a/lib/chef/data_bag_item.rb
+++ b/lib/chef/data_bag_item.rb
@@ -2,7 +2,7 @@
# Author:: Adam Jacob (<adam@opscode.com>)
# Author:: Nuo Yan (<nuo@opscode.com>)
# Author:: Christopher Brown (<cb@opscode.com>)
-# Copyright:: Copyright (c) 2009 Opscode, Inc.
+# Copyright:: Copyright (c) 2009-2016 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -163,7 +163,7 @@ class Chef
end
end
- def destroy(data_bag=data_bag(), databag_item=name)
+ def destroy(data_bag=self.data_bag(), databag_item=name)
chef_server_rest.delete("data/#{data_bag}/#{databag_item}")
end
diff --git a/lib/chef/mixin/why_run.rb b/lib/chef/mixin/why_run.rb
index d3acea5490..3539ce1c5f 100644
--- a/lib/chef/mixin/why_run.rb
+++ b/lib/chef/mixin/why_run.rb
@@ -1,7 +1,7 @@
#
# Author:: Dan DeLeo ( <dan@opscode.com> )
# Author:: Marc Paradise ( <marc@opscode.com> )
-# Copyright:: Copyright (c) 2012 Opscode, Inc.
+# Copyright:: Copyright (c) 2012-2016 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -322,7 +322,7 @@ class Chef
a.run(action, events, @resource)
if a.assertion_failed? and a.block_action?
@blocked_actions << action
- return
+ break
end
end
end
diff --git a/lib/chef/provider/service/macosx.rb b/lib/chef/provider/service/macosx.rb
index 9c733da493..72fd600f1c 100644
--- a/lib/chef/provider/service/macosx.rb
+++ b/lib/chef/provider/service/macosx.rb
@@ -160,7 +160,7 @@ class Chef
end
end
- def load_service
+ def load_service
session = @session_type ? "-S #{@session_type} " : ''
cmd = 'launchctl load -w ' + session + @plist
shell_out_as_user(cmd)