lib/ridley/resources/cookbook.rb in ridley-0.6.3 vs lib/ridley/resources/cookbook.rb in ridley-0.7.0.beta
- old
+ new
@@ -1,10 +1,8 @@
module Ridley
# @author Jamie Winsor <jamie@vialstudios.com>
- class Cookbook
- include Ridley::Resource
-
+ class Cookbook < Ridley::Resource
class << self
# Save a new Cookbook Version of the given name, version with the
# given manifest of files and checksums.
#
# @param [Ridley::Connection] connection
@@ -32,11 +30,11 @@
set_chef_id "name"
set_chef_type "cookbook"
set_chef_json_class "Chef::Cookbook"
set_resource_path "cookbooks"
- attribute :name
- validates_presence_of :name
+ attribute :name,
+ required: true
end
module DSL
# Coerces instance functions into class functions on Ridley::Cookbook. This coercion
# sends an instance of the including class along to the class function.