summaryrefslogtreecommitdiff
path: root/lib/chef/run_list
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@onddo.com>2013-03-04 15:05:54 +0100
committerBryan McLellan <btm@opscode.com>2013-04-11 13:04:33 -0700
commit38becdf97cdbd060027776a551aad333fbddcd5a (patch)
tree1e193e818ca257424f1ab849e3862662bb6fc27a /lib/chef/run_list
parent8c1e41b93b119855e2e723cf35f9ca72d06a76f4 (diff)
downloadchef-38becdf97cdbd060027776a551aad333fbddcd5a.tar.gz
[CHEF-3919] cookbook version specific code factored out from Chef::Version, new classes created: Chef::Version::Cookbook and Chef::VersionConstraint::Cookbook
Diffstat (limited to 'lib/chef/run_list')
-rw-r--r--lib/chef/run_list/versioned_recipe_list.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/run_list/versioned_recipe_list.rb b/lib/chef/run_list/versioned_recipe_list.rb
index 0eefded964..9339985207 100644
--- a/lib/chef/run_list/versioned_recipe_list.rb
+++ b/lib/chef/run_list/versioned_recipe_list.rb
@@ -15,7 +15,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-require 'chef/version_class'
+require 'chef/version/cookbook'
require 'chef/version_constraint'
# Why does this class exist?
@@ -31,7 +31,7 @@ class Chef
def add_recipe(name, version=nil)
if version && @versions.has_key?(name)
- unless Chef::Version.new(@versions[name]) == Chef::Version.new(version)
+ unless Chef::Version::Cookbook.new(@versions[name]) == Chef::Version::Cookbook.new(version)
raise Chef::Exceptions::CookbookVersionConflict, "Run list requires #{name} at versions #{@versions[name]} and #{version}"
end
end
@@ -44,10 +44,10 @@ class Chef
end
# Return an Array of Hashes, each of the form:
- # {:name => RECIPE_NAME, :version_constraint => Chef::VersionConstraint }
+ # {:name => RECIPE_NAME, :version_constraint => Chef::VersionConstraint::Cookbook }
def with_version_constraints
self.map do |recipe_name|
- constraint = Chef::VersionConstraint.new(@versions[recipe_name])
+ constraint = Chef::VersionConstraint::Cookbook.new(@versions[recipe_name])
{ :name => recipe_name, :version_constraint => constraint }
end
end