docker-sync 1.0.0 → 1.0.1

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: 1938ef0a123f6f1a0af089e55086717e8e94f2f013c40c3d29f61743d0cda08e
4
- data.tar.gz: bd46e6944225bd9f52cc66ce4a45f1ff11a954e4c9b5bb441f249b20f0c0dfa1
3
+ metadata.gz: 440a1277f902234557ce07713930f28cf69e95fa6ff77ee095128fe407b2a6da
4
+ data.tar.gz: 65643b530ee3cfa703fa03140d07545a459f0e6414ccc4ef1fbb4bcc9485bb79
5
5
  SHA512:
6
- metadata.gz: aba2408b6a8370e0fc534b0fffa27e9d048705c227247c6552b637747cf0913362dcd76f4dad9ce906df5a395e125b134a29d88c53f471fec8bc5aed43abe1ce
7
- data.tar.gz: aa5eb3883ece787df7c6398e0ad7cd967dee35be9b9e0f60cfc0812855e95904dc49b58f25e47ee1973da60fc8e72c08c0ea75c232bef3bea621f080ac558ace
6
+ metadata.gz: 1bd8e762ee2d4eaff553501371169439c5fb511670a4a6937110d16965c9da0bfdac7ec0298a8b2dc2f8548333fd120c1174986320ce314dcfcd86ffc03b3329
7
+ data.tar.gz: f8528c8f0747cafb57ae66f638e78128ee561adeb77b7c9d3f8cf439fb0324f5637cca4dd48d6916952bc27baa35e6fcf9e14a7da7ac888211d3670dd31cf1c0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -1,4 +1,6 @@
1
1
  require 'pp'
2
+ require 'docker-sync/docker_compose_session'
3
+
2
4
  class ComposeManager
3
5
  include Thor::Shell
4
6
  @compose_session
@@ -1,3 +1,5 @@
1
+ require 'docker-sync/command'
2
+
1
3
  module DockerSync
2
4
  # based on `Docker::Compose::Compose` from `docker-compose` gem
3
5
  class DockerComposeSession
@@ -21,5 +21,9 @@ module DockerSync
21
21
  def self.system(cmd)
22
22
  defined?(Bundler) ? Bundler.unbundled_system(cmd) : Kernel.system(cmd)
23
23
  end
24
+
25
+ def self.default_ignores()
26
+ ['.docker-sync/daemon.log', '.docker-sync/daemon.pid']
27
+ end
24
28
  end
25
29
  end
@@ -183,7 +183,7 @@ module DockerSync
183
183
  end
184
184
 
185
185
  unless @options['sync_excludes'].nil?
186
- expanded_ignore_strings = @options['sync_excludes'].map do |pattern|
186
+ expanded_ignore_strings = @options['sync_excludes'].append(Environment.default_ignores).flatten!.map do |pattern|
187
187
  if exclude_type == 'none'
188
188
  # the ignore type like Name / Path are part of the pattern
189
189
  ignore_string = "#{pattern}"
@@ -61,8 +61,10 @@ module DockerSync
61
61
 
62
62
  def sync_options
63
63
  args = []
64
- unless @options['sync_excludes'].nil?
65
- args = @options['sync_excludes'].map { |pattern| "--exclude='#{pattern}'" } + args
64
+ excludes_list = @options['sync_excludes'].append(Environment.default_ignores).flatten!
65
+
66
+ unless excludes_list.nil?
67
+ args = excludes_list.map { |pattern| "--exclude='#{pattern}'" } + args
66
68
  end
67
69
  args.push('-ap')
68
70
  args.push(@options['sync_args']) if @options.key?('sync_args')
@@ -102,7 +102,7 @@ module DockerSync
102
102
  exclude_type = @options['sync_excludes_type'] unless @options['sync_excludes_type'].nil?
103
103
 
104
104
  unless @options['sync_excludes'].nil?
105
- expanded_ignore_strings = @options['sync_excludes'].map do |pattern|
105
+ expanded_ignore_strings = @options['sync_excludes'].append(Environment.default_ignores).flatten!.map do |pattern|
106
106
  ignore_string = if exclude_type == 'none'
107
107
  # the ignore type like Name / Path are part of the pattern
108
108
  pattern.to_s
@@ -135,6 +135,8 @@ module DockerSync
135
135
 
136
136
  # cares about conflict resolution
137
137
  def sync_prefer
138
+ sync_host_port = get_host_port(get_container_name, UNISON_CONTAINER_PORT)
139
+
138
140
  case @options.fetch('sync_prefer', 'default')
139
141
  when 'default' then "-prefer '#{@options['src']}' -copyonconflict" # thats our default, if nothing is set
140
142
  when 'src' then "-prefer '#{@options['src']}'"
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-08 00:00:00.000000000 Z
11
+ date: 2022-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor