docker-sync 0.5.3 → 0.5.4

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
  SHA1:
3
- metadata.gz: fb070a930f4ed696ff77d215964bc8b072befa4e
4
- data.tar.gz: b28aa8a79ce842c345616df3a7c036a106c6a9a1
3
+ metadata.gz: 2f8b70cd8eadb981ebb2d30dbb2aa82ed2457a24
4
+ data.tar.gz: e5b01b4e856a62db95006063eb10e13bccfba9f5
5
5
  SHA512:
6
- metadata.gz: 8fea6207b55d99adf4f400ea6feff7ddd3a261487bbf9e656c03026d8cb34c011883c57f24045de8358248071e9407d9d31485d6e0a1cd72e02f808c7e3fea7a
7
- data.tar.gz: 7905e062de45685bc43bb98863aba020c37fe80bbd8d04b02cd8ebc9047ee679ab6d9d9c4dc16c5c0b3f57ffdca482892de74e168d2bfdf641efefe376db5be2
6
+ metadata.gz: a84e897db840254b726b4fbefc20905b4b186f8c46053c5d3b8f34e48749c0bd6d9b12f4e579caa3ff34ea6e03f5428fbc876d92a878e1964cd735c6c39943af
7
+ data.tar.gz: 4917fb9c501ff074d3266d56557fe2859880e2383f46acb6c14efbdf54267e4baf7c868be7b39fef3d1e41524867a0761331d9d319a01da3c5ded71f141395e5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.4
@@ -119,11 +119,10 @@ module DockerSync
119
119
  args.push("'#{@options['src']}'")
120
120
  args.push('-auto')
121
121
  args.push('-batch')
122
- sync_host_port = get_host_port(get_container_name, UNISON_CONTAINER_PORT)
123
- dest = "socket://#{@options['sync_host_ip']}:#{sync_host_port}"
124
- args.push(sync_prefer(dest))
122
+ args.push(sync_prefer)
125
123
  args.push(@options['sync_args']) if @options.key?('sync_args')
126
- args.push(dest)
124
+ sync_host_port = get_host_port(get_container_name, UNISON_CONTAINER_PORT)
125
+ args.push("socket://#{@options['sync_host_ip']}:#{sync_host_port}")
127
126
 
128
127
  if @options.key?('sync_group') || @options.key?('sync_groupid')
129
128
  raise('Unison does not support sync_group, sync_groupid - please use rsync if you need that')
@@ -132,15 +131,16 @@ module DockerSync
132
131
  end
133
132
 
134
133
  # cares about conflict resolution
135
- def sync_prefer dest
134
+ def sync_prefer
136
135
  case @options.fetch('sync_prefer', 'default')
137
136
  when 'default' then "-prefer '#{@options['src']}' -copyonconflict" # thats our default, if nothing is set
138
137
  when 'src' then "-prefer '#{@options['src']}'"
139
- when 'dest' then "-prefer '#{dest}'"
138
+ when 'dest' then "-prefer 'socket://#{@options['sync_host_ip']}:#{sync_host_port}'"
140
139
  else "-prefer '#{@options['sync_prefer']}'"
141
140
  end
142
141
  end
143
142
 
143
+
144
144
  def start_container
145
145
  say_status 'ok', "Starting unison for sync #{@sync_name}", :white
146
146
 
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.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-11 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor