Sha256: 5183fdb7c031e4a9ac4dcd0646e2e43c7e1e4bc4f1150b69e0a0fe214d04d4c2

Contents?: true

Size: 898 Bytes

Versions: 1

Compression:

Stored size: 898 Bytes

Contents

require 'deployml/exceptions/missing_option'
require 'deployml/options/thin'

module DeploYML
  module Servers
    module Thin
      def initialize_server
        @thin = Options::Thin.new(@server_options)
        @thin.environment ||= @name
      end

      def thin(shell,*args)
        options = args + ['-C', @thin.config, '-s', @thin.servers]

        shell.run 'thin', *options
      end

      def server_config(shell)
        unless @thin.config
          raise(MissingOption,"No 'config' option specified under the server options",caller)
        end

        options = ['-c', dest.path] + @thin.arguments

        shell.run 'thin', 'config', *options
      end

      def server_start(shell)
        thin shell, 'start'
      end

      def server_stop(shell)
        thin shell, 'stop'
      end

      def server_restart(shell)
        thin shell, 'restart'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
deployml-0.3.0 lib/deployml/servers/thin.rb