summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/cookbook')
-rw-r--r--lib/chef/cookbook/cookbook_version_loader.rb8
-rw-r--r--lib/chef/cookbook/file_system_file_vendor.rb3
-rw-r--r--lib/chef/cookbook/metadata.rb5
-rw-r--r--lib/chef/cookbook/remote_file_vendor.rb3
-rw-r--r--lib/chef/cookbook/syntax_check.rb4
5 files changed, 5 insertions, 18 deletions
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
index 626a5d423b..eb0df849d1 100644
--- a/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/lib/chef/cookbook/cookbook_version_loader.rb
@@ -35,17 +35,11 @@ class Chef
UPLOADED_COOKBOOK_VERSION_FILE = ".uploaded-cookbook-version.json".freeze
- attr_reader :cookbook_settings
- attr_reader :frozen
- attr_reader :uploaded_cookbook_version_file
-
- attr_reader :cookbook_path
+ attr_reader :cookbook_settings, :frozen, :uploaded_cookbook_version_file, :cookbook_path, :metadata_error
# The cookbook's name as inferred from its directory.
attr_reader :inferred_cookbook_name
- attr_reader :metadata_error
-
def initialize(path, chefignore = nil)
@cookbook_path = File.expand_path( path ) # cookbook_path from which this was loaded
diff --git a/lib/chef/cookbook/file_system_file_vendor.rb b/lib/chef/cookbook/file_system_file_vendor.rb
index a4a6711270..c96c53b15f 100644
--- a/lib/chef/cookbook/file_system_file_vendor.rb
+++ b/lib/chef/cookbook/file_system_file_vendor.rb
@@ -30,8 +30,7 @@ class Chef
# nonsensical.
class FileSystemFileVendor < FileVendor
- attr_reader :cookbook_name
- attr_reader :repo_paths
+ attr_reader :cookbook_name, :repo_paths
def initialize(manifest, *repo_paths)
@cookbook_name = manifest.name
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index 7f6d972771..260bc1ac6b 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -68,10 +68,7 @@ class Chef
include Chef::Mixin::ParamsValidate
include Chef::Mixin::FromFile
- attr_reader :platforms
- attr_reader :dependencies
- attr_reader :providing
- attr_reader :recipes
+ attr_reader :platforms, :dependencies, :providing, :recipes
# @return [Array<Gem::Dependency>] Array of supported Chef versions
attr_reader :chef_versions
diff --git a/lib/chef/cookbook/remote_file_vendor.rb b/lib/chef/cookbook/remote_file_vendor.rb
index a6a6e96e06..005839243e 100644
--- a/lib/chef/cookbook/remote_file_vendor.rb
+++ b/lib/chef/cookbook/remote_file_vendor.rb
@@ -24,8 +24,7 @@ class Chef
# if not available, loading them from the remote server.
class RemoteFileVendor < FileVendor
- attr_reader :rest
- attr_reader :cookbook_name
+ attr_reader :rest, :cookbook_name
def initialize(manifest, rest)
@manifest = manifest
diff --git a/lib/chef/cookbook/syntax_check.rb b/lib/chef/cookbook/syntax_check.rb
index 8b593eea81..ea6e59b894 100644
--- a/lib/chef/cookbook/syntax_check.rb
+++ b/lib/chef/cookbook/syntax_check.rb
@@ -72,14 +72,12 @@ class Chef
include Chef::Mixin::ShellOut
include Chef::Mixin::Checksum
- attr_reader :cookbook_path
+ attr_reader :cookbook_path, :chefignore
# A PersistentSet object that tracks which files have already been
# validated.
attr_reader :validated_files
- attr_reader :chefignore
-
# Creates a new SyntaxCheck given the +cookbook_name+ and a +cookbook_path+.
# If no +cookbook_path+ is given, +Chef::Config.cookbook_path+ is used.
def self.for_cookbook(cookbook_name, cookbook_path = nil)