Sha256: 5eadf018af63e624ed83356d45f68c876a5fb375ac294c0b7816a6de2de73c68

Contents?: true

Size: 1.27 KB

Versions: 121

Compression:

Stored size: 1.27 KB

Contents

require 'alpha_omega/deploy/strategy/base'

module Capistrano
  module Deploy
    module Strategy

      # An abstract superclass, which forms the base for all deployment
      # strategies which work by grabbing the code from the repository directly
      # from remote host.
      class Remote < Base
        # Executes the SCM command for this strategy and writes the REVISION
        # mark file to each host.
        def deploy!
          commands.each do |command|
            run command
          end
          run mark
        end

        def check!
          super.check do |d|
            d.remote.command(source.command)
          end
        end

        protected

          # An abstract method which must be overridden in subclasses, to
          # return the actual SCM command(s) which must be executed on each
          # target host in order to perform the deployment.
          def commands
            raise NotImplementedError, "`command' is not implemented by #{self.class.name}"
          end

          # Returns the command which will write the identifier of the
          # revision being deployed to the REVISION file on each host.
          def mark
            "echo #{revision} > #{configuration[:release_path]}/REVISION"
          end
      end

    end
  end
end

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
alpha_omega-0.0.137 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.136 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.135 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.134 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.133 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.132 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.131 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.130 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.129 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.128 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.127 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.126 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.125 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.124 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.122 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.121 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.120 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.119 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.118 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-0.0.117 lib/alpha_omega/deploy/strategy/remote.rb