docker-sync 0.5.11.pre.beta1 → 0.5.11.pre.beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2501ae9905e17c2a687358bb4a5d7f8b2eb10bfb
4
- data.tar.gz: 458f430966f1e477bacc032ee6ccecad0e6bf194
3
+ metadata.gz: 8644a79fafb6932d66c52709ff86bf281b8cf543
4
+ data.tar.gz: b4f27677378f73590c310a954497d0465d848489
5
5
  SHA512:
6
- metadata.gz: a06185a80616f8fcfa1344e61c05636d07944af8618a03aac4f5fbfcad6ce9480aaff10d9420148b76e42d8b542b00e4d8bf8a5fbfe9692af029fcf6c0454909
7
- data.tar.gz: 4b1cecb9ce0f4c9efa71f12268c331631f9bee7bd919115903ca44f4c2ca82bc5684c422ec05bca63b730efc5ff50612a438a0643bd07909ddadc87d8a1d940f
6
+ metadata.gz: 7931f368d41d7be352ac09f106c4b691a6794019ec0f1a29b4ab809b972bedc4fb68613b7d76668a371dc2292cbb17bf592f35e4095f6ae42acd9ac33be15682
7
+ data.tar.gz: 2dab2954df86b18bc432ff086d880806e14dad82ca562eeacc5867e0e2b05b64a8b00abf360abd1f91ca5810af7c07316e8638e95d3a297c4793a2748c881899
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.11-beta1
1
+ 0.5.11-beta2
@@ -23,24 +23,19 @@ module DockerSync
23
23
  Docker.ensure!
24
24
  Unison.ensure! if config.unison_required?
25
25
  Rsync.ensure! if config.rsync_required?
26
- if config.fswatch_required?
27
- unless Fswatch.available?
28
- Fswatch.ensure!
29
- puts "please restart docker sync so the installation of fswatch takes effect"
30
- raise(UNSUPPORTED_OPERATING_SYSTEM)
31
- end
32
- end
33
-
26
+ Fswatch.ensure! if config.fswatch_required?
34
27
  end
35
28
 
36
- def self.ensure_all_for_linux!(_config)
29
+ def self.ensure_all_for_linux!(config)
37
30
  Docker.ensure!
31
+ Fswatch.forbid! if config.fswatch_required?
38
32
  end
39
33
 
40
34
  def self.ensure_all_for_freebsd!(config)
41
35
  Docker.ensure!
42
36
  Unison.ensure! if config.unison_required?
43
37
  Rsync.ensure! if config.rsync_required?
38
+ Fswatch.forbid! if config.fswatch_required?
44
39
  end
45
40
  end
46
41
  end
@@ -5,14 +5,14 @@ module DockerSync
5
5
  def self.docker_for_mac?
6
6
  return false unless Environment.mac?
7
7
  return @docker_for_mac if defined? @docker_for_mac
8
- @docker_for_mac = system('pgrep -q com.docker.hyperkit')
8
+ @docker_for_mac = Environment.system('pgrep -q com.docker.hyperkit')
9
9
  end
10
10
 
11
11
  def self.docker_toolbox?
12
12
  return false unless Environment.mac? || Environment.freebsd?
13
13
  return false unless find_executable0('docker-machine')
14
14
  return @docker_toolbox if defined? @docker_toolbox
15
- @docker_toolbox = system('docker info | grep -q "Operating System: Boot2Docker"')
15
+ @docker_toolbox = Environment.system('docker info | grep -q "Operating System: Boot2Docker"')
16
16
  end
17
17
  end
18
18
  end
@@ -1,15 +1,24 @@
1
1
  module DockerSync
2
2
  module Dependencies
3
3
  module Fswatch
4
+ UNSUPPORTED = 'Fswatch is not expected to run on platforms other then MacOS'
5
+
4
6
  def self.available?
5
- raise 'Fswatch cannot be available for other platforms then MacOS' unless Environment.mac?
7
+ forbid! unless Environment.mac?
6
8
  return @available if defined? @available
7
9
  @available = find_executable0('fswatch')
8
10
  end
9
11
 
10
12
  def self.ensure!
11
- raise 'Fswatch cannot be installed on other platforms then MacOS' unless Environment.mac?
12
- PackageManager.install_package('fswatch') unless available?
13
+ return if available?
14
+
15
+ PackageManager.install_package('fswatch')
16
+ puts "please restart docker sync so the installation of fswatch takes effect"
17
+ exit(1)
18
+ end
19
+
20
+ def self.forbid!
21
+ raise UNSUPPORTED
13
22
  end
14
23
  end
15
24
  end
@@ -35,7 +35,7 @@ module DockerSync
35
35
  end
36
36
 
37
37
  def perform_installation
38
- defined?(Bundler) ? Bundler.clean_system(install_cmd) : system(install_cmd)
38
+ Environment.system(install_cmd)
39
39
  end
40
40
 
41
41
  def install_cmd
@@ -17,7 +17,7 @@ module DockerSync
17
17
 
18
18
  return @available if defined? @available
19
19
  cmd = 'brew list unox 2>&1 > /dev/null'
20
- @available = defined?(Bundler) ? Bundler.clean_system(cmd) : system(cmd)
20
+ @available = Environment.system(cmd)
21
21
  @available
22
22
  end
23
23
 
@@ -35,7 +35,7 @@ module DockerSync
35
35
  say_status 'warning', LEGACY_UNOX_WARNING, :yellow
36
36
  raise(FAILED_TO_REMOVE_LEGACY_UNOX) unless yes?('Uninstall legacy unison-fsmonitor (unox)? (y/N)')
37
37
  say_status 'command', uninstall_cmd, :white
38
- system(uninstall_cmd)
38
+ Environment.system(uninstall_cmd)
39
39
  end
40
40
 
41
41
  def self.non_brew_version_installed?
@@ -15,5 +15,9 @@ module DockerSync
15
15
  def self.freebsd?
16
16
  @freebsd ||= OS.freebsd?
17
17
  end
18
+
19
+ def self.system(cmd)
20
+ defined?(Bundler) ? Bundler.clean_system(cmd) : Kernel.system(cmd)
21
+ end
18
22
  end
19
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11.pre.beta1
4
+ version: 0.5.11.pre.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-06 00:00:00.000000000 Z
11
+ date: 2019-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor