entangler 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 +4 -4
- data/README.md +2 -2
- data/lib/entangler/executor/background/master.rb +2 -1
- data/lib/entangler/executor/base.rb +9 -0
- data/lib/entangler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c37e01ff82caac966cc6914e8ce9b3ae76820106
|
4
|
+
data.tar.gz: eb49a80d236d3a4ea41aae48b354de2be624e567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e652cb24a4724fa59c4c68f687a7e36cb5a63ecf4f59fa23ab42563fefd0e6e2c500c0f2a55ebfa9aca01b4fb4908443b093d3f63a2188198aeefd392997a36e
|
7
|
+
data.tar.gz: b0f8dd950f5a0946f9738db12f43a41a44b313034ec4bc0b13362cdce3c3b04a638ea908b0a730d735b3fa4533d271eb6a1b8095308069a4220d1569728a3763
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ $ entangler master /some/base/path user@remote:/some/remote/path
|
|
18
18
|
|
19
19
|
```
|
20
20
|
$ entangler -h
|
21
|
-
Entangler v1.0.
|
21
|
+
Entangler v1.0.1
|
22
22
|
|
23
23
|
Usage:
|
24
24
|
entangler master <base_dir> <remote_user>@<remote_host>:<remote_base_dir> [options]
|
@@ -38,7 +38,7 @@ Options:
|
|
38
38
|
|
39
39
|
If you specify a string, instead of a regex, it will match any path starting with that string, i.e. `-i '.git'` will ignore the `.git`
|
40
40
|
folder and all its sub-directories. If you want to just ignore the the `.git` sub-directories but not the content in the git folder, you'll
|
41
|
-
have to use regex. `-i '/^\.git(?:\/[^\/]+)
|
41
|
+
have to use regex. `-i '/^\.git(?:\/[^\/]+){2,}$/'` will match all sub-directories of `.git/`, but not the files in `.git`.
|
42
42
|
|
43
43
|
You can specify multiple `-i` or `--ignore` flags to ignore multiple paths.
|
44
44
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'open3'
|
2
|
+
|
1
3
|
module Entangler
|
2
4
|
module Executor
|
3
5
|
module Background
|
@@ -6,7 +8,6 @@ module Entangler
|
|
6
8
|
|
7
9
|
def start_remote_slave
|
8
10
|
logger.info('Starting - Entangler on remote')
|
9
|
-
require 'open3'
|
10
11
|
ignore_opts = @opts[:ignore].map { |regexp| "-i '#{regexp.inspect}'" }.join(' ')
|
11
12
|
entangler_cmd = "entangler slave #{@opts[:remote_base_dir]} #{ignore_opts}"
|
12
13
|
ssh_cmd = generate_ssh_command("source ~/.rvm/environments/default && #{entangler_cmd}")
|
@@ -35,6 +35,7 @@ module Entangler
|
|
35
35
|
start_listener
|
36
36
|
start_remote_io
|
37
37
|
Signal.trap('INT') { kill_off_threads }
|
38
|
+
logger.info('Ready!')
|
38
39
|
wait_for_threads
|
39
40
|
ensure
|
40
41
|
stop_listener
|
@@ -54,10 +55,18 @@ module Entangler
|
|
54
55
|
@logger ||= begin
|
55
56
|
l = Logger.new(File.join(log_dir, 'entangler.log'))
|
56
57
|
l.level = @opts[:verbose] ? Logger::DEBUG : Logger::INFO
|
58
|
+
l.formatter = logger_formatter
|
57
59
|
l
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
63
|
+
def logger_formatter
|
64
|
+
proc do |severity, datetime, _, msg|
|
65
|
+
date_format = datetime.strftime('%Y-%m-%d %H:%M:%S')
|
66
|
+
"[#{date_format}] #{severity.rjust(5)}: #{msg}\n"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
61
70
|
def log_dir
|
62
71
|
File.join(base_dir, '.entangler', 'log')
|
63
72
|
end
|
data/lib/entangler/version.rb
CHANGED