summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/synchronizer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/cookbook/synchronizer.rb')
-rw-r--r--lib/chef/cookbook/synchronizer.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/chef/cookbook/synchronizer.rb b/lib/chef/cookbook/synchronizer.rb
index 9955bae6bb..e5b6f2ede9 100644
--- a/lib/chef/cookbook/synchronizer.rb
+++ b/lib/chef/cookbook/synchronizer.rb
@@ -4,13 +4,11 @@ require "chef/server_api"
require "singleton"
class Chef
-
# Keep track of the filenames that we use in both eager cookbook
# downloading (during sync_cookbooks) and lazy (during the run
# itself, through FileVendor). After the run is over, clean up the
# cache.
class CookbookCacheCleaner
-
attr_accessor :skip_removal
# Setup a notification to clear the valid_cache_entries when a Chef client
@@ -56,7 +54,6 @@ class Chef
Chef::Log.info("Skipping removal of unused files from the cache")
end
end
-
end
# Synchronizes the locally cached copies of cookbooks with the files on the
@@ -141,7 +138,7 @@ class Chef
# === Returns
# true:: Always returns true
def sync_cookbooks
- Chef::Log.info("Loading cookbooks [#{cookbooks.map {|ckbk| ckbk.name + '@' + ckbk.version}.join(', ')}]")
+ Chef::Log.info("Loading cookbooks [#{cookbooks.map { |ckbk| ckbk.name + '@' + ckbk.version }.join(', ')}]")
Chef::Log.debug("Cookbooks detail: #{cookbooks.inspect}")
clear_obsoleted_cookbooks
@@ -176,7 +173,7 @@ class Chef
# Saves the full_path to the file of the cookbook to be updated
# in the manifest later
def save_full_file_path(file, full_path)
- @cookbook_full_file_paths[file.cookbook] ||= { }
+ @cookbook_full_file_paths[file.cookbook] ||= {}
@cookbook_full_file_paths[file.cookbook][file.segment] ||= [ ]
@cookbook_full_file_paths[file.cookbook][file.segment] << full_path
end
@@ -289,6 +286,5 @@ class Chef
def server_api
Chef::ServerAPI.new(Chef::Config[:chef_server_url])
end
-
end
end