From 9a7ef5057b1a8b41715a0db421992a5fe6dc8bef Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 27 Jan 2014 15:46:24 +0000 Subject: [PATCH] Fix composer provider using discontinued not_if and only_if --- providers/composer.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/providers/composer.rb b/providers/composer.rb index da3212e..a74e314 100644 --- a/providers/composer.rb +++ b/providers/composer.rb @@ -23,9 +23,8 @@ remote_file "#{new_resource.project_path}/composer.phar" do source "http://getcomposer.org/composer.phar" - mode "0774" - not_if do - ::File.exists?("#{new_resource.project_path}/composer.phar") + if ::File.exists?("#{new_resource.project_path}/composer.phar") + mode "0774" end end new_resource.updated_by_last_action(true) @@ -34,10 +33,9 @@ action :install_packages do execute "install dependencies with composer #{new_resource.name}" do cwd new_resource.project_path - user "root" - command "php composer.phar install" - only_if do - ::File.exists?("#{new_resource.project_path}/composer.json") + if ::File.exists?("#{new_resource.project_path}/composer.json") + user "root" + command "php composer.phar install" end end new_resource.updated_by_last_action(true)