docker-sync 0.4.6 → 0.5.0.pre.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/console +6 -0
- data/lib/docker-sync.rb +2 -1
- data/lib/docker-sync/config/project_config.rb +13 -12
- data/lib/docker-sync/dependencies.rb +39 -0
- data/lib/docker-sync/dependencies/docker.rb +23 -0
- data/lib/docker-sync/dependencies/docker_driver.rb +20 -0
- data/lib/docker-sync/dependencies/fswatch.rb +14 -0
- data/lib/docker-sync/dependencies/package_manager.rb +24 -0
- data/lib/docker-sync/dependencies/package_managers/apt.rb +24 -0
- data/lib/docker-sync/dependencies/package_managers/base.rb +47 -0
- data/lib/docker-sync/dependencies/package_managers/brew.rb +24 -0
- data/lib/docker-sync/dependencies/package_managers/none.rb +23 -0
- data/lib/docker-sync/dependencies/package_managers/pkg.rb +24 -0
- data/lib/docker-sync/dependencies/package_managers/yum.rb +24 -0
- data/lib/docker-sync/dependencies/rsync.rb +14 -0
- data/lib/docker-sync/dependencies/unison.rb +15 -0
- data/lib/docker-sync/dependencies/unox.rb +40 -0
- data/lib/docker-sync/environment.rb +19 -0
- data/lib/docker-sync/execution.rb +11 -35
- data/lib/docker-sync/sync_manager.rb +10 -3
- data/lib/docker-sync/sync_process.rb +16 -18
- data/lib/docker-sync/sync_strategy/native.rb +3 -4
- data/lib/docker-sync/sync_strategy/native_osx.rb +11 -11
- data/lib/docker-sync/sync_strategy/rsync.rb +15 -7
- data/lib/docker-sync/sync_strategy/unison.rb +13 -12
- data/lib/docker-sync/update_check.rb +5 -0
- data/lib/docker-sync/upgrade_check.rb +2 -1
- data/lib/docker-sync/watch_strategy/dummy.rb +1 -1
- data/lib/docker-sync/watch_strategy/fswatch.rb +4 -5
- data/lib/docker-sync/watch_strategy/remotelogs.rb +3 -3
- data/lib/docker-sync/watch_strategy/unison.rb +2 -2
- data/tasks/daemon/daemon.thor +0 -1
- data/tasks/stack/stack.thor +8 -9
- data/tasks/sync/sync.thor +16 -19
- metadata +21 -9
- data/lib/docker-sync/preconditions/preconditions_linux.rb +0 -51
- data/lib/docker-sync/preconditions/preconditions_osx.rb +0 -174
- data/lib/docker-sync/preconditions/strategy.rb +0 -65
@@ -1,65 +0,0 @@
|
|
1
|
-
require 'docker-sync/preconditions/preconditions_osx'
|
2
|
-
require 'docker-sync/preconditions/preconditions_linux'
|
3
|
-
|
4
|
-
require 'singleton'
|
5
|
-
require 'os'
|
6
|
-
|
7
|
-
module DockerSync
|
8
|
-
module Preconditions
|
9
|
-
class Strategy
|
10
|
-
include Singleton
|
11
|
-
|
12
|
-
attr_accessor :strategy
|
13
|
-
|
14
|
-
def initialize
|
15
|
-
if DockerSync::Preconditions::Strategy.is_osx
|
16
|
-
@strategy = DockerSync::Preconditions::Osx.new
|
17
|
-
elsif DockerSync::Preconditions::Strategy.is_linux
|
18
|
-
@strategy = DockerSync::Preconditions::Linux.new
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.is_osx
|
23
|
-
return OS.mac?
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.is_linux
|
27
|
-
return OS.linux?
|
28
|
-
end
|
29
|
-
|
30
|
-
def check_all_preconditions(config)
|
31
|
-
strategy.check_all_preconditions(config)
|
32
|
-
end
|
33
|
-
|
34
|
-
def docker_available
|
35
|
-
strategy.docker_available
|
36
|
-
end
|
37
|
-
|
38
|
-
def docker_running
|
39
|
-
strategy.docker_running
|
40
|
-
end
|
41
|
-
|
42
|
-
def rsync_available
|
43
|
-
strategy.rsync_available
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
def fswatch_available
|
48
|
-
strategy.fswatch_available
|
49
|
-
end
|
50
|
-
|
51
|
-
def unison_available
|
52
|
-
strategy.unison_available
|
53
|
-
end
|
54
|
-
|
55
|
-
def is_driver_docker_for_mac?
|
56
|
-
strategy.is_driver_docker_for_mac?
|
57
|
-
end
|
58
|
-
|
59
|
-
def is_driver_docker_toolbox?
|
60
|
-
strategy.is_driver_docker_toolbox?
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|