lib/ridley/chef/cookbook/metadata.rb in ridley-2.5.1 vs lib/ridley/chef/cookbook/metadata.rb in ridley-3.0.0.rc1

- old
+ new

@@ -237,12 +237,10 @@ # versions<Array>:: Returns the list of versions for the platform def supports(platform, *version_args) version = version_args.first @platforms[platform] = Solve::Constraint.new(version).to_s @platforms[platform] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a dependency on another cookbook, with version checking strings. # # === Parameters @@ -255,12 +253,10 @@ # versions<Array>:: Returns the list of versions for the platform def depends(cookbook, *version_args) version = version_args.first @dependencies[cookbook] = Solve::Constraint.new(version).to_s @dependencies[cookbook] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a recommendation for another cookbook, with version checking strings. # # === Parameters @@ -273,12 +269,10 @@ # versions<Array>:: Returns the list of versions for the platform def recommends(cookbook, *version_args) version = version_args.first @recommendations[cookbook] = Solve::Constraint.new(version).to_s @recommendations[cookbook] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a suggestion for another cookbook, with version checking strings. # # === Parameters @@ -291,12 +285,10 @@ # versions<Array>:: Returns the list of versions for the platform def suggests(cookbook, *version_args) version = version_args.first @suggestions[cookbook] = Solve::Constraint.new(version).to_s @suggestions[cookbook] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a conflict for another cookbook, with version checking strings. # # === Parameters @@ -309,12 +301,10 @@ # versions<Array>:: Returns the list of versions for the platform def conflicts(cookbook, *version_args) version = version_args.first @conflicting[cookbook] = Solve::Constraint.new(version).to_s @conflicting[cookbook] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a recipe, definition, or resource provided by this cookbook. # # Recipes are specified as normal @@ -331,12 +321,10 @@ # versions<Array>:: Returns the list of versions for the platform def provides(cookbook, *version_args) version = version_args.first @providing[cookbook] = Solve::Constraint.new(version).to_s @providing[cookbook] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a cookbook that is replaced by this one, with version checking strings. # # === Parameters @@ -348,11 +336,9 @@ # versions<Array>:: Returns the list of versions for the platform def replaces(cookbook, *version_args) version = version_args.first @replacing[cookbook] = Solve::Constraint.new(version).to_s @replacing[cookbook] - rescue Solve::Errors::InvalidConstraintFormat => ex - raise InvalidVersionConstraint, ex.to_s end # Adds a description for a recipe. # # === Parameters