summaryrefslogtreecommitdiff
path: root/lib/chef/provider/file.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@opscode.com>2013-04-09 14:46:40 -0700
committerLamont Granquist <lamont@opscode.com>2013-04-09 14:46:40 -0700
commit9b109f4ca4a2ab32d81dc39bfb8d1586610d4d74 (patch)
tree64fe15d5056cd15aa60e94fdb5db867d6fcec215 /lib/chef/provider/file.rb
parent8ba2ea4bf2211d56acc85f4897cffc8e61cff243 (diff)
downloadchef-9b109f4ca4a2ab32d81dc39bfb8d1586610d4d74.tar.gz
move the deploy switching stuff out of the resource and
into the lower level objects. clean up cp_unix a little bit.
Diffstat (limited to 'lib/chef/provider/file.rb')
-rw-r--r--lib/chef/provider/file.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb
index 98d7e4c393..8d59278e52 100644
--- a/lib/chef/provider/file.rb
+++ b/lib/chef/provider/file.rb
@@ -50,7 +50,9 @@ class Chef
def initialize(new_resource, run_context)
@content_class ||= Chef::Provider::File::Content
- @deployment_strategy = new_resource.deployment_strategy.new() if new_resource.respond_to?(:deployment_strategy)
+ if new_resource.respond_to?(:deployment_strategy)
+ @deployment_strategy = Chef::Provider::File::Deploy.strategy(new_resource.deployment_strategy)
+ end
super
end