diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/file.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/file.rb | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index 5ed7c6ac5b..4d9f07d2b2 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@opscode.com>) # Author:: Lamont Granquist (<lamont@opscode.com>) -# Copyright:: Copyright (c) 2008-2013 Opscode, Inc. +# Copyright:: Copyright (c) 2008-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb index 80fae1b4dc..f5a8cf809c 100644 --- a/lib/chef/resource/file.rb +++ b/lib/chef/resource/file.rb @@ -50,11 +50,6 @@ class Chef default_action :create allowed_actions :create, :delete, :touch, :create_if_missing - def initialize(name, run_context=nil) - super - @verifications = [] - end - property :content, [ String, nil ], desired_state: false property :backup, [ Integer, false ], desired_state: false, default: 5 property :checksum, [ String, nil ], is: /^[a-zA-Z0-9]{64}$/ @@ -63,6 +58,7 @@ class Chef property :atomic_update, [ true, false ], desired_state: false, default: Chef::Config[:file_atomic_update] property :force_unlink, [ true, false ], desired_state: false, default: false property :manage_symlink_source, [ true, false ], desired_state: false + property :verifications, Array, default: [] def verify(command=nil, opts={}, &block) if ! (command.nil? || [String, Symbol].include?(command.class)) @@ -70,9 +66,9 @@ class Chef end if command || block_given? - @verifications << Verification.new(self, command, opts, &block) + verifications << Verification.new(self, command, opts, &block) else - @verifications + verifications end end |