lib/masterbaker/config.rb in masterbaker-0.7.8 vs lib/masterbaker/config.rb in masterbaker-0.9.0
- old
+ new
@@ -41,11 +41,11 @@
unless File.directory?(cache_path)
end
end
def cookbook_paths
- ([royal_crown_cookbooks_directory] + compiled.cookbook_paths).map do |path|
+ ([royal_crown_cookbooks_directory] + [masterbaker_cookbooks_directory] + compiled.cookbook_paths).map do |path|
File.expand_path(path, royal_crown_path)
end.uniq.select do |path|
File.directory?(path)
end
end
@@ -98,9 +98,13 @@
root? ? command : "sudo -E #{command}"
end
def root?
Process.uid == 0
+ end
+
+ def masterbaker_cookbooks_directory
+ File.expand_path("cookbooks", royal_crown_path.gsub(/\.bakery/, '.masterbaker'))
end
def royal_crown_cookbooks_directory
File.expand_path("cookbooks", royal_crown_path)
end