diff options
author | Eike Waldt <waldt@b1-systems.de> | 2016-09-29 14:19:12 +0200 |
---|---|---|
committer | Eike Waldt <waldt@b1-systems.de> | 2016-09-29 14:19:12 +0200 |
commit | 547dde38361caf912a83bd92f9ab1b2f700c5a21 (patch) | |
tree | b9c3a6198addd324adf6e5355e265d622f4a218d | |
parent | b9435386d0d5f556e575ccb562f2b62c2c8c3da0 (diff) | |
download | chef-547dde38361caf912a83bd92f9ab1b2f700c5a21.tar.gz |
fixed style
-rw-r--r-- | lib/chef/provider/package.rb | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index 7e635cc3ad..d282b8ba79 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -218,33 +218,33 @@ class Chef end end - def action_lock - if package_locked(@new_resource.name, @new_resource.version) == false - description = @new_resource.version ? "version #{@new_resource.version} of " : "" - converge_by("lock #{description}package #{@current_resource.package_name}") do - multipackage_api_adapter(@current_resource.package_name, @new_resource.version) do |name, version| - lock_package(name, version) - Chef::Log.info("#{@new_resource} locked") - end - end - else - Chef::Log.debug("#{new_resource} is already locked") - end - end - - def action_unlock - if package_locked(@new_resource.name, @new_resource.version) == true - description = @new_resource.version ? "version #{@new_resource.version} of " : "" - converge_by("unlock #{description}package #{@current_resource.package_name}") do - multipackage_api_adapter(@current_resource.package_name, @new_resource.version) do |name, version| - unlock_package(name, version) - Chef::Log.info("#{@new_resource} unlocked") - end - end - else - Chef::Log.debug("#{new_resource} is already unlocked") - end - end + def action_lock + if package_locked(@new_resource.name, @new_resource.version) == false + description = @new_resource.version ? "version #{@new_resource.version} of " : "" + converge_by("lock #{description}package #{@current_resource.package_name}") do + multipackage_api_adapter(@current_resource.package_name, @new_resource.version) do |name, version| + lock_package(name, version) + Chef::Log.info("#{@new_resource} locked") + end + end + else + Chef::Log.debug("#{new_resource} is already locked") + end + end + + def action_unlock + if package_locked(@new_resource.name, @new_resource.version) == true + description = @new_resource.version ? "version #{@new_resource.version} of " : "" + converge_by("unlock #{description}package #{@current_resource.package_name}") do + multipackage_api_adapter(@current_resource.package_name, @new_resource.version) do |name, version| + unlock_package(name, version) + Chef::Log.info("#{@new_resource} unlocked") + end + end + else + Chef::Log.debug("#{new_resource} is already unlocked") + end + end # @todo use composition rather than inheritance |