Sha256: 683f5b0c6f85c3b95fac61982748354a1db06c7ae44b27d2a56ba8f4b02520a5

Contents?: true

Size: 691 Bytes

Versions: 1

Compression:

Stored size: 691 Bytes

Contents

require 'net/ssh'
require 'tempfile'

module Pairzone
  module Commands
    class Start
      def initialize(project_name, identity, options)
        @project_name = project_name
        @identity = File.expand_path(identity)
        @options = options
      end

      def execute
        @pairzone = Pairzone::Api::Pairzone.start(:project_name => @project_name, :collaborators => collaborators)
        @pairzone.push_code(@identity)
        unless @options[:background]
          @pairzone.connect(@identity)
          @pairzone.fetch_code(@identity)
        end
      end

      private

      def collaborators
        return (@options[:c] || "").split(',')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pairzone-0.0.1 lib/pairzone/commands/start.rb