Sha256: 23ed6985720298b8309b486e5b150b5f9a8098d7e631854fe5e207f0f2ffa81c

Contents?: true

Size: 611 Bytes

Versions: 15

Compression:

Stored size: 611 Bytes

Contents

module DockerSync
  module Dependencies
    module Fswatch
      UNSUPPORTED = 'Fswatch is not expected to run on platforms other then MacOS'

      def self.available?
        forbid! unless Environment.mac?
        return @available if defined? @available
        @available = find_executable0('fswatch')
      end

      def self.ensure!
        return if available?

        PackageManager.install_package('fswatch')
        puts "please restart docker sync so the installation of fswatch takes effect"
        exit(1)
      end

      def self.forbid!
        raise UNSUPPORTED
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
docker-sync-1.0.5 lib/docker-sync/dependencies/fswatch.rb
docker-sync-1.0.4 lib/docker-sync/dependencies/fswatch.rb
docker-sync-1.0.3 lib/docker-sync/dependencies/fswatch.rb
docker-sync-1.0.2 lib/docker-sync/dependencies/fswatch.rb
docker-sync-1.0.1 lib/docker-sync/dependencies/fswatch.rb
docker-sync-1.0.0 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.7.2 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.7.1 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.7.0 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.6.0 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.5.14 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.5.13 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.5.11 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.5.11.pre.beta3 lib/docker-sync/dependencies/fswatch.rb
docker-sync-0.5.11.pre.beta2 lib/docker-sync/dependencies/fswatch.rb