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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24ab1f0ac689c51c2a2b353c2cd9b9f6de09358e
4
- data.tar.gz: 61005288c87456ed526ee85b96c100a240315752
3
+ metadata.gz: c37e01ff82caac966cc6914e8ce9b3ae76820106
4
+ data.tar.gz: eb49a80d236d3a4ea41aae48b354de2be624e567
5
5
  SHA512:
6
- metadata.gz: 6bff0242ca552222c8c2f8d9b6a85f4d6e5f7a4d2f1a05a830390513db30abd519867b907f383d62789e763c22a78bcf619e6c6b5eb836e252404e7cab5ea0bc
7
- data.tar.gz: 4e09843aa732a4f8263d86acac49767c35793a3060aea43886999e76466fdc4e8aa3e55974f095b1db599590643bf6116d2e66dd0f30bfe1287c61e38ffa13af
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.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(?:\/[^\/]+)+$/'` will match all sub-directories of `.git/`, but not the files in `.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
@@ -1,3 +1,3 @@
1
1
  module Entangler
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entangler
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
  - Dave Allie