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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/console +6 -0
  4. data/lib/docker-sync.rb +2 -1
  5. data/lib/docker-sync/config/project_config.rb +13 -12
  6. data/lib/docker-sync/dependencies.rb +39 -0
  7. data/lib/docker-sync/dependencies/docker.rb +23 -0
  8. data/lib/docker-sync/dependencies/docker_driver.rb +20 -0
  9. data/lib/docker-sync/dependencies/fswatch.rb +14 -0
  10. data/lib/docker-sync/dependencies/package_manager.rb +24 -0
  11. data/lib/docker-sync/dependencies/package_managers/apt.rb +24 -0
  12. data/lib/docker-sync/dependencies/package_managers/base.rb +47 -0
  13. data/lib/docker-sync/dependencies/package_managers/brew.rb +24 -0
  14. data/lib/docker-sync/dependencies/package_managers/none.rb +23 -0
  15. data/lib/docker-sync/dependencies/package_managers/pkg.rb +24 -0
  16. data/lib/docker-sync/dependencies/package_managers/yum.rb +24 -0
  17. data/lib/docker-sync/dependencies/rsync.rb +14 -0
  18. data/lib/docker-sync/dependencies/unison.rb +15 -0
  19. data/lib/docker-sync/dependencies/unox.rb +40 -0
  20. data/lib/docker-sync/environment.rb +19 -0
  21. data/lib/docker-sync/execution.rb +11 -35
  22. data/lib/docker-sync/sync_manager.rb +10 -3
  23. data/lib/docker-sync/sync_process.rb +16 -18
  24. data/lib/docker-sync/sync_strategy/native.rb +3 -4
  25. data/lib/docker-sync/sync_strategy/native_osx.rb +11 -11
  26. data/lib/docker-sync/sync_strategy/rsync.rb +15 -7
  27. data/lib/docker-sync/sync_strategy/unison.rb +13 -12
  28. data/lib/docker-sync/update_check.rb +5 -0
  29. data/lib/docker-sync/upgrade_check.rb +2 -1
  30. data/lib/docker-sync/watch_strategy/dummy.rb +1 -1
  31. data/lib/docker-sync/watch_strategy/fswatch.rb +4 -5
  32. data/lib/docker-sync/watch_strategy/remotelogs.rb +3 -3
  33. data/lib/docker-sync/watch_strategy/unison.rb +2 -2
  34. data/tasks/daemon/daemon.thor +0 -1
  35. data/tasks/stack/stack.thor +8 -9
  36. data/tasks/sync/sync.thor +16 -19
  37. metadata +21 -9
  38. data/lib/docker-sync/preconditions/preconditions_linux.rb +0 -51
  39. data/lib/docker-sync/preconditions/preconditions_osx.rb +0 -174
  40. 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
-