Class: Minestrone::Deploy::Strategy::RemoteCache

Inherits:
Base
  • Object
show all
Defined in:
lib/minestrone/recipes/deploy/strategy/remote_cache.rb

Overview

Implements the deployment strategy that keeps a cached checkout of the source code on the remote server. Each deploy simply updates the cached checkout, and then does a copy from the cached copy to the final deployment location.

Instance Attribute Summary

Attributes inherited from Base

#configuration

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Minestrone::Deploy::Strategy::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Minestrone::Deploy::Strategy::Base

Instance Method Details

#check!Object



22
23
24
25
26
27
28
# File 'lib/minestrone/recipes/deploy/strategy/remote_cache.rb', line 22

def check!
  super.check do |d|
    d.remote.command(source.command)
    d.remote.command("rsync") unless copy_exclude.empty?
    d.remote.writable(shared_path)
  end
end

#deploy!Object

Executes the SCM command for this strategy and writes the REVISION mark file on the server.



17
18
19
20
# File 'lib/minestrone/recipes/deploy/strategy/remote_cache.rb', line 17

def deploy!
  update_repository_cache
  copy_repository_cache
end