diff options
author | Joshua Timberman <joshua@opscode.com> | 2012-12-10 10:15:25 -0800 |
---|---|---|
committer | Joshua Timberman <joshua@opscode.com> | 2012-12-10 10:15:25 -0800 |
commit | 6f6b24736cfa2e24b85dc92b1cbecbb0cff939a3 (patch) | |
tree | ab51d5060ad8f8ee8ff60fdef4ffd472101447d2 | |
parent | dec8f13775eb6ade75b85c757de0c529f0f1fbff (diff) | |
parent | 15acecf1a0440e036ef6f88c7e12f42d9e4335af (diff) | |
download | mixlib-shellout-6f6b24736cfa2e24b85dc92b1cbecbb0cff939a3.tar.gz |
Merge pull request #11 from Youscribe/cook-1251
[COOK-1251] add initialize to resources
-rw-r--r-- | resources/package.rb | 8 | ||||
-rw-r--r-- | resources/shortcut.rb | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/resources/package.rb b/resources/package.rb index 97c73f1..bf80c57 100644 --- a/resources/package.rb +++ b/resources/package.rb @@ -20,6 +20,8 @@ actions :install, :remove +default_action :install + attribute :package_name, :kind_of => String, :name_attribute => true attribute :source, :kind_of => String, :required => true attribute :version, :kind_of => String @@ -35,3 +37,9 @@ attribute :timeout, :kind_of => Integer, :default => 600 # allow target dirtory of installation to be set #attribute :target_dir + +# Covers 0.10.8 and earlier +def initialize(*args) + super + @action = :install +end diff --git a/resources/shortcut.rb b/resources/shortcut.rb index 2cf22a3..eb6268b 100644 --- a/resources/shortcut.rb +++ b/resources/shortcut.rb @@ -20,8 +20,16 @@ actions :create +default_action :create + attribute :name, :kind_of => String attribute :target, :kind_of => String attribute :arguments, :kind_of => String attribute :description, :kind_of => String attribute :cwd, :kind_of => String + +# Covers 0.10.8 and earlier +def initialize(*args) + super + @action = :create +end |