summaryrefslogtreecommitdiff
path: root/lib/chef/version_class.rb
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/version_class.rb
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/version_class.rb')
-rw-r--r--lib/chef/version_class.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/version_class.rb b/lib/chef/version_class.rb
index 36ff05a46d..25b393854b 100644
--- a/lib/chef/version_class.rb
+++ b/lib/chef/version_class.rb
@@ -51,7 +51,7 @@ class Chef
other.is_a?(Version) && self == other
end
- private
+ protected
def parse(str="")
@major, @minor, @patch =
@@ -63,8 +63,8 @@ class Chef
when /^(\d+)$/
[ $1.to_i, 0, 0 ]
else
- msg = "'#{str.to_s}' does not match 'x.y.z' or 'x.y'"
- raise Chef::Exceptions::InvalidCookbookVersion.new( msg )
+ msg = "'#{str.to_s}' does not match 'x.y.z', 'x.y' or 'x'"
+ raise Chef::Exceptions::InvalidVersion.new( msg )
end
end