summaryrefslogtreecommitdiff
path: root/lib/chef/file_content_management
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-05-20 15:32:15 -0700
committersersut <serdar@opscode.com>2013-05-20 15:32:15 -0700
commit669bb5913611ebe4838afee4c120d0006d289646 (patch)
tree7243d34fb1d79cd3a8f5f8bfc66a422c61b3acd8 /lib/chef/file_content_management
parent622b857c2dd1d06392a99ff10812b2acf721e0c5 (diff)
downloadchef-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.rb9
-rw-r--r--lib/chef/file_content_management/tempfile.rb2
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