summaryrefslogtreecommitdiff
path: root/lib/chef/provider/file/deploy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/file/deploy.rb')
-rw-r--r--lib/chef/provider/file/deploy.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/chef/provider/file/deploy.rb b/lib/chef/provider/file/deploy.rb
new file mode 100644
index 0000000000..50cc6e4b6e
--- /dev/null
+++ b/lib/chef/provider/file/deploy.rb
@@ -0,0 +1,25 @@
+
+
+class Chef
+ class Provider
+ class File
+ class Deploy
+ def self.strategy(deployment_strategy)
+ deployment_strategy ||= Chef::Config[:file_deployment_strategy]
+ deployment_strategy ||= Chef::Platform.windows? ? :mv_windows : :mv_unix
+ case deployment_strategy
+ when :mv_windows
+ Chef::Provider::File::Deploy::MvWindows.new()
+ when :mv_unix
+ Chef::Provider::File::Deploy::MvUnix.new()
+ when :cp_unix
+ Chef::Provider::File::Deploy::CpUnix.new()
+ else
+ raise "invalid deployment strategy use :mv_unix, :mv_windows or :cp_unix"
+ end
+ end
+ end
+ end
+ end
+end
+