vagrant-unison-morroni 0.0.16 → 0.0.17
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: 75c1475be13bdce2a2d98df72246e21e329e32ea
|
4
|
+
data.tar.gz: 47fc0845a101569d1e7f66db0f9f26b78040ed6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f428b4df4665910a6f319c9cfaa21021e1e78cbae4a8b0b8274d2c69e242dc45487a662ce494e02b768f6715b62f10b58f8882ac917205dd17a40b081f82b56b
|
7
|
+
data.tar.gz: f8181cdcaf04cb1b254d34300831bce8f2be4cc51ba06311bcd13fbadb166beb7957d40527527d32dd403861ef1f5578d188bf208aa3aa4c5d2a9e8f23522821
|
@@ -64,6 +64,64 @@ module VagrantPlugins
|
|
64
64
|
CommandInteract
|
65
65
|
end
|
66
66
|
|
67
|
+
provisioner "start-unison" do
|
68
|
+
require "log4r"
|
69
|
+
require "vagrant"
|
70
|
+
require "thread"
|
71
|
+
require 'listen'
|
72
|
+
|
73
|
+
require_relative 'unison_paths'
|
74
|
+
require_relative 'ssh_command'
|
75
|
+
require_relative 'shell_command'
|
76
|
+
require_relative 'unison_sync'
|
77
|
+
class StartUnisonProvisioner < Vagrant.plugin("2", :provisioner)
|
78
|
+
|
79
|
+
def initialize(machine, config)
|
80
|
+
@@machine = machine
|
81
|
+
super
|
82
|
+
end
|
83
|
+
|
84
|
+
def configure(root_config)
|
85
|
+
end
|
86
|
+
|
87
|
+
def provision
|
88
|
+
|
89
|
+
unison_paths = UnisonPaths.new(@@machine.env, @@machine)
|
90
|
+
guest_path = unison_paths.guest
|
91
|
+
host_path = unison_paths.host
|
92
|
+
|
93
|
+
user_name = @@machine.ssh_info[:username]
|
94
|
+
|
95
|
+
@@machine.ui.info(host_path)
|
96
|
+
@@machine.ui.info(guest_path)
|
97
|
+
|
98
|
+
|
99
|
+
@@machine.env.ui.info "Unisoning changes from {host}::#{host_path} --> {guest VM}::#{guest_path}"
|
100
|
+
|
101
|
+
# Create the guest path
|
102
|
+
@@machine.communicate.sudo("mkdir -p '#{guest_path}'")
|
103
|
+
@@machine.communicate.sudo("chown #{user_name} '#{guest_path}'")
|
104
|
+
|
105
|
+
ssh_command = SshCommand.new(@@machine, unison_paths)
|
106
|
+
command = ShellCommand.new(@@machine, unison_paths, ssh_command)
|
107
|
+
|
108
|
+
command.repeat = true
|
109
|
+
command.terse = true
|
110
|
+
command = command.to_s + '> ' + @@machine.env.root_path.to_s + '/.vagrant/unison.log 2>&1 &'
|
111
|
+
|
112
|
+
@@machine.env.ui.info "Running #{command}"
|
113
|
+
|
114
|
+
system(command)
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
def cleanup
|
119
|
+
end
|
120
|
+
|
121
|
+
end
|
122
|
+
StartUnisonProvisioner
|
123
|
+
end
|
124
|
+
|
67
125
|
# This initializes the internationalization strings.
|
68
126
|
def self.setup_i18n
|
69
127
|
I18n.load_path << File.expand_path("locales/en.yml", Unison.source_root)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-unison-morroni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Laing
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/vagrant-unison-morroni/unison_paths.rb
|
117
117
|
- lib/vagrant-unison-morroni/unison_sync.rb
|
118
118
|
- lib/vagrant-unison-morroni/version.rb
|
119
|
+
- lib/vagrant-unison-morroni/version.rb~
|
119
120
|
- locales/en.yml
|
120
121
|
- spec/vagrant-unison-morroni/config_spec.rb
|
121
122
|
- vagrant-unison-morroni.gemspec
|