Sha256: d221527324497dc0670549be41240071ef1ee5a616b286089a4dcae1e6da546e

Contents?: true

Size: 1.04 KB

Versions: 22

Compression:

Stored size: 1.04 KB

Contents

require 'thor/shell'
require 'docker-sync/execution'
require 'docker-sync/sync_strategy/unison'

module Docker_Sync
  module WatchStrategy
    class Unison
      include Execution

      @options
      @sync_name
      @watch_fork

      def initialize(sync_name, options)
        @options = options
        @sync_name = sync_name
        @watch_fork = nil
        # instantiate the sync task to easily access all common parameters between
        # unison sync and watch
        # basically unison watch is the command with the additionnal -repeat watch option
        # note: this doesn't run a sync
        @unison = Docker_Sync::SyncStrategy::Unison.new(@sync_name, @options)
      end

      def run
        @watch_fork = @unison.watch
      end

      def stop
        Process.kill 'TERM', @watch_fork
        Process.wait @watch_fork
      end

      def clean
      end

      def watch
      end

      def watch_options
      end

      def watch_fork
        return @watch_fork
      end

      def watch_thread
        return nil
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
docker-sync-0.4.6 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.5 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.5.beta1 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.4 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.4.beta2 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.4.beta1 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.3 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.3.pre.beta1 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.2 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.1 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.1.pre.beta2 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.1.pre.beta1 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.0 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.0.pre.beta2 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.4.0.pre.beta1 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.3.6 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.3.5 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.3.4 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.3.3 lib/docker-sync/watch_strategy/unison.rb
docker-sync-0.3.2 lib/docker-sync/watch_strategy/unison.rb