fsevents_to_vm 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fsevents_to_vm/ssh_emit.rb +16 -2
- data/lib/fsevents_to_vm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 124e6037bd036859c7d514b92ed5b8ab0dab59be
|
4
|
+
data.tar.gz: 43d4d7cf2e483c0ee9b6c28d16a0d29c499c3b59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc9bc260fb294da69de46fc69792e5eec6d763c74fdcc49b5e06bf9337430cbf87f06aec2ebc3f15bb9265f01ab094a1df7661051da63f75b806e225ab118186
|
7
|
+
data.tar.gz: cdba2d66334200bc349b2232f8b7f741b558d8201118b173ea37bf2d8589a60b64c3b42dfc2988d73111a6280e6a9d90b814f4e0dad0d657d10edcec4200bcb2
|
@@ -5,11 +5,25 @@ require 'tempfile'
|
|
5
5
|
module FseventsToVm
|
6
6
|
class SshEmit
|
7
7
|
def initialize(ssh_config_file)
|
8
|
-
@
|
8
|
+
@config_path = ssh_config_file.path
|
9
9
|
end
|
10
10
|
|
11
11
|
def event(event)
|
12
|
-
|
12
|
+
ssh.exec!("touch -m -c -t #{event.mtime} #{Shellwords.escape event.path}".force_encoding(Encoding::BINARY))
|
13
|
+
rescue SystemCallError => e
|
14
|
+
$stderr.puts "Error sending event: #{e}"
|
15
|
+
$stderr.puts "\t#{e.backtrace.join("\n\t")}"
|
16
|
+
disconnect!
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def ssh
|
22
|
+
@ssh ||= Net::SSH.start('dinghy', 'docker', config: @config_path)
|
23
|
+
end
|
24
|
+
|
25
|
+
def disconnect!
|
26
|
+
@ssh = nil
|
13
27
|
end
|
14
28
|
end
|
15
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fsevents_to_vm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb-fsevent
|