Browse Source

Allow swapping deploy_revision for something else.

Noah Kantrowitz 12 years ago
parent
commit
74784c0e48
2 changed files with 2 additions and 1 deletions
  1. 1 1
      providers/default.rb
  2. 1 0
      resources/default.rb

+ 1 - 1
providers/default.rb

@@ -84,7 +84,7 @@ action :deploy do
     end
   end
 
-  @deploy_resource = deploy_revision new_resource.id do
+  @deploy_resource = send(new_resource.strategy.to_sym, new_resource.id) do
     revision new_resource.revision
     repository new_resource.repository
     user new_resource.owner

+ 1 - 0
resources/default.rb

@@ -35,6 +35,7 @@ attribute :environment_name, :kind_of => String, :default => (node.chef_environm
 attribute :path, :kind_of => String
 attribute :owner, :kind_of => String
 attribute :group, :kind_of => String
+attribute :strategy, :kind_of => [String, Symbol], :default => :deploy_revision
 attribute :revision, :kind_of => String
 attribute :repository, :kind_of => String
 attribute :environment, :kind_of => Hash, :default => {}