diff options
author | sersut <serdar@opscode.com> | 2013-05-20 15:32:15 -0700 |
---|---|---|
committer | sersut <serdar@opscode.com> | 2013-05-20 15:32:15 -0700 |
commit | 669bb5913611ebe4838afee4c120d0006d289646 (patch) | |
tree | 7243d34fb1d79cd3a8f5f8bfc66a422c61b3acd8 /lib/chef/file_content_management | |
parent | 622b857c2dd1d06392a99ff10812b2acf721e0c5 (diff) | |
download | chef-669bb5913611ebe4838afee4c120d0006d289646.tar.gz |
Rename file config parameters to be file_atomic_update & file_staging_uses_destdir
Diffstat (limited to 'lib/chef/file_content_management')
-rw-r--r-- | lib/chef/file_content_management/deploy.rb | 9 | ||||
-rw-r--r-- | lib/chef/file_content_management/tempfile.rb | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/chef/file_content_management/deploy.rb b/lib/chef/file_content_management/deploy.rb index a57af7b938..35ea3c6fc8 100644 --- a/lib/chef/file_content_management/deploy.rb +++ b/lib/chef/file_content_management/deploy.rb @@ -25,14 +25,11 @@ end class Chef class FileContentManagement class Deploy - def self.strategy(deploy_with) - case deploy_with - when :move + def self.strategy(atomic_update) + if atomic_update Chef::Platform.windows? ? MvWindows.new() : MvUnix.new() - when :copy - Cp.new() else - raise "invalid deployment strategy use :move or :copy" + Cp.new() end end end diff --git a/lib/chef/file_content_management/tempfile.rb b/lib/chef/file_content_management/tempfile.rb index 30ab89367b..d109e3f51f 100644 --- a/lib/chef/file_content_management/tempfile.rb +++ b/lib/chef/file_content_management/tempfile.rb @@ -52,7 +52,7 @@ class Chef end def tempfile_dirname - Chef::Config[:file_deployment_uses_destdir] ? ::File.dirname(@new_resource.path) : Dir::tmpdir + Chef::Config[:file_staging_uses_destdir] ? ::File.dirname(@new_resource.path) : Dir::tmpdir end end end |