docker-sync 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1670b82d1e005cdfb4485db9241a513f962a732b29d4bd3cf6beec9227c52e65
4
- data.tar.gz: da40497b93174d5794d9fe7271a9c8a02c86fac647ee038b6d2380500da0cd31
3
+ metadata.gz: c16e4b3329738820f64c10c631ff0d5ad87c3d3e24af3c7c2e55267b2c84f260
4
+ data.tar.gz: 5997aa17faededdd6074b9399fcad5c3a5c3dbec8bd2d6971b8e3b5b0c353da8
5
5
  SHA512:
6
- metadata.gz: e0bf6820a799a2381e343d4cd9e5719a2f1adf2879f1cf82bc1a96833110963b8737a019c5870e74c6a59cb76a9951a97e1bf3226bea5e94a423c69897767dc7
7
- data.tar.gz: 550d7628a372fab1328ff3d06452919259409ac4d4d6d01324da9eab1fb99e6dbd26f9ba033fbbf0762134d766691e07edaf6e68117baa0371671c2b21accb43
6
+ metadata.gz: b4d9f320c005ca2dad6e8a6beff59c4502b6b65d11558d8b428c924511a6c8d60c14c57e3277cadaeddc8d7dcdb68f1cae0e1fc6c71935555992f99877119af5
7
+ data.tar.gz: '09684e8c94b1afa1702032568d6de9179199d026806481f0966ae521405cd5499a2f25443b13107547413a278c9cba9f24668ab20b3617c89a9b3b3d4050f528'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.7.0
@@ -5,6 +5,7 @@ module DockerSync
5
5
  module Unox
6
6
  LEGACY_UNOX_WARNING = 'You installed unison-fsmonitor (unox) the old legacy way (i.e. not using brew). We need to fix that.'.freeze
7
7
  FAILED_TO_REMOVE_LEGACY_UNOX = 'Failed to remove legacy unison-fsmonitor (unox). Please delete /usr/local/bin/unison-fsmonitor manually and try again.'.freeze
8
+ UNSUPPORTED_FSMONITOR = 'You are using unsupported version of unison-fsmonitor, consider installing eugenmayer/dockersync/unox instead'.freeze
8
9
 
9
10
  class << self
10
11
  extend Forwardable
@@ -15,8 +16,12 @@ module DockerSync
15
16
  # should never have been called anyway - fix the call that it should check for the OS
16
17
  raise 'Unox cannot be available for other platforms then MacOS' unless Environment.mac?
17
18
 
18
- cmd = 'brew list unox > /dev/null 2>&1'
19
- Environment.system(cmd)
19
+ return true if brew_package_installed?('unox')
20
+ return false unless brew_package_installed?('unison-fsmonitor')
21
+
22
+ say_status 'warning', UNSUPPORTED_FSMONITOR, :yellow unless @unsupported_fsmonitor_warning_displayed
23
+ @unsupported_fsmonitor_warning_displayed = true
24
+ true
20
25
  end
21
26
 
22
27
  def self.ensure!
@@ -39,6 +44,11 @@ module DockerSync
39
44
  def self.non_brew_version_installed?
40
45
  !available? && File.exist?('/usr/local/bin/unison-fsmonitor')
41
46
  end
47
+
48
+ def self.brew_package_installed?(name)
49
+ cmd = "brew list #{name} > /dev/null 2>&1"
50
+ Environment.system(cmd)
51
+ end
42
52
  end
43
53
  end
44
54
  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.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-30 00:00:00.000000000 Z
11
+ date: 2021-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor