vagrant-vaimo-unison 2.0.2 → 2.2.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f25dc5fd5ddd86766446b5411f91848bf12f8d95
|
4
|
+
data.tar.gz: 87d0c221cd01df1d72648503351f78a9a0f7a807
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3cf06f546ef3ef98361be397ab66093214dab326911f517b2ed9b75e6e6bd61efd2eb4de8553cea21bf45855cac8f08c087f8bbaf974001b97d319de8676d2b
|
7
|
+
data.tar.gz: 43885decdea686d54e54644092079994e230aa148882ce545903a8f949f239cbb683ac6d931b6c9fabef662ad637d2047fb9de4e0380c97eb5dd55e3fb3c25a7
|
@@ -19,6 +19,8 @@ module VagrantPlugins
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def execute
|
22
|
+
parse_options!
|
23
|
+
|
22
24
|
sync_once
|
23
25
|
sync_polling unless options[:no_polling]
|
24
26
|
end
|
@@ -26,7 +28,7 @@ module VagrantPlugins
|
|
26
28
|
def sync_once
|
27
29
|
status = nil
|
28
30
|
with_target_vms do |machine|
|
29
|
-
execute_sync_command(machine) do |command|
|
31
|
+
execute_sync_command(machine, true) do |command|
|
30
32
|
command.batch = true
|
31
33
|
command.terse = true
|
32
34
|
command = command.to_s
|
@@ -129,7 +131,7 @@ module VagrantPlugins
|
|
129
131
|
def execute
|
130
132
|
with_target_vms do |machine|
|
131
133
|
ssh_user = machine.config.unison.ssh_user
|
132
|
-
command
|
134
|
+
command = "rm -rf ~/Library/'Application Support'/Unison/*"
|
133
135
|
@env.ui.info "Running #{command} on host" if options[:verbose]
|
134
136
|
system(command)
|
135
137
|
|
@@ -4,25 +4,27 @@ module VagrantPlugins
|
|
4
4
|
module Unison
|
5
5
|
# mixin providing common functionality for our vagrant commands
|
6
6
|
module UnisonSync
|
7
|
-
def execute_sync_command(machine)
|
7
|
+
def execute_sync_command(machine, display_sync_message = false)
|
8
8
|
parse_options!
|
9
9
|
|
10
10
|
return 0 if machine.config.unison.host_folder.nil?
|
11
11
|
|
12
12
|
unison_paths = UnisonPaths.new(@env, machine, options[:project])
|
13
13
|
|
14
|
-
startup_command(machine, unison_paths)
|
14
|
+
startup_command(machine, unison_paths, display_sync_message)
|
15
15
|
|
16
16
|
yield set_shell_command(machine, options, unison_paths)
|
17
17
|
end
|
18
18
|
|
19
|
-
def startup_command(machine, unison_paths)
|
19
|
+
def startup_command(machine, unison_paths, display_sync_message = false)
|
20
20
|
guest_path = unison_paths.guest
|
21
21
|
host_path = unison_paths.host
|
22
22
|
ssh_user = machine.config.unison.ssh_user
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
if display_sync_message
|
25
|
+
@env.ui.info "Sync changes from {host}::#{host_path}"
|
26
|
+
@env.ui.info " --> {guest VM}::#{guest_path}"
|
27
|
+
end
|
26
28
|
|
27
29
|
# Create the guest and host path if they don't exists path
|
28
30
|
machine.communicate.sudo("mkdir -p '#{guest_path}'")
|
@@ -78,10 +80,9 @@ module VagrantPlugins
|
|
78
80
|
end
|
79
81
|
|
80
82
|
def options_optional_flags(o)
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
# end
|
83
|
+
o.on('--no-polling', 'trigger sync without starting the polling process') do |flag|
|
84
|
+
options[:no_polling] = !flag
|
85
|
+
end
|
85
86
|
|
86
87
|
o.on('--verbose', 'print additional debug information') do |flag|
|
87
88
|
options[:verbose] = flag
|
@@ -119,7 +120,8 @@ module VagrantPlugins
|
|
119
120
|
end
|
120
121
|
|
121
122
|
def check_conflicting_options!
|
122
|
-
|
123
|
+
conflicting = %i[prefer_local prefer_remote force_local force_remote]
|
124
|
+
enabled = conflicting.select do |opt|
|
123
125
|
options[opt]
|
124
126
|
end
|
125
127
|
|