summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-02-10 10:43:54 -0800
committerdanielsdeleo <dan@getchef.com>2015-02-11 10:52:50 -0800
commit5c72aff6a75c749c28b153b576f75ea1e818708c (patch)
tree7076510f3d6c64b6ea69e2d3995c5648230b0659
parent06757d1307538f7b4d8ef4c57beedc7eff8b8bbe (diff)
downloadchef-5c72aff6a75c749c28b153b576f75ea1e818708c.tar.gz
Ensure cookbook_manifest is required where it's used
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb1
-rw-r--r--lib/chef/cookbook_manifest.rb4
-rw-r--r--lib/chef/cookbook_uploader.rb1
3 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb
index 5f147720eb..4084fb80d3 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -16,6 +16,7 @@
# limitations under the License.
#
+require 'chef/cookbook_manifest'
require 'chef_zero/data_store/memory_store'
require 'chef_zero/data_store/data_already_exists_error'
require 'chef_zero/data_store/data_not_found_error'
diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb
index 92f20664bd..5bde5b1e3e 100644
--- a/lib/chef/cookbook_manifest.rb
+++ b/lib/chef/cookbook_manifest.rb
@@ -39,6 +39,10 @@ class Chef
def_delegator :@cookbook_version, :version
def_delegator :@cookbook_version, :frozen_version?
+ # Create a new CookbookManifest object for the given `cookbook_version`.
+ # You can subsequently call #to_hash to get a Hash representation of the
+ # cookbook_version in the "manifest" format, or #to_json to get a JSON
+ # representation of the cookbook_version.
def initialize(cookbook_version, policy_mode: false)
@cookbook_version = cookbook_version
@policy_mode = !!policy_mode
diff --git a/lib/chef/cookbook_uploader.rb b/lib/chef/cookbook_uploader.rb
index 826b362a3d..d294684d78 100644
--- a/lib/chef/cookbook_uploader.rb
+++ b/lib/chef/cookbook_uploader.rb
@@ -3,6 +3,7 @@ require 'set'
require 'chef/exceptions'
require 'chef/knife/cookbook_metadata'
require 'chef/digester'
+require 'chef/cookbook_manifest'
require 'chef/cookbook_version'
require 'chef/cookbook/syntax_check'
require 'chef/cookbook/file_system_file_vendor'