entangler 1.5.0 → 1.6.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
  SHA256:
3
- metadata.gz: 3a4ebf4a24baaacd27607af53da80054873901c438a88fbc647521bf76183a6e
4
- data.tar.gz: b5a56d17bf8a7d4cb251654c2be3929c9d4d6a4d5f31fe37b9ea41e81ab88bf3
3
+ metadata.gz: 53adde0b653345a289e273c891539863ae2346a85c2ac4431f30ff6b00557075
4
+ data.tar.gz: e20b0eca3371ddd0127b4b068becf5e8e0b0e430fa051b1c349a3d454a808fe0
5
5
  SHA512:
6
- metadata.gz: 610b064643380a99c59fdfc61fb292c448d44f0b891da081fb39f34462f841e30e3be6a8094e4067e5878217ba0927ef7fbed812de40b92c55139d165a8b2916
7
- data.tar.gz: 2d4d014f1df0606988281772c30e2674d7de057571f586953093448b7ce470cfc418b719fcbe058f57cbd9a289a49c3aa016508df86a882f58a52c106789c206
6
+ metadata.gz: 6132124e59b384d8220330d493001201166e01bf6d4a96ef67d9144c8b46cdb53ced4103688af82489e3e2df36031f0228725c8f66c7856794bc4ee05b474c57
7
+ data.tar.gz: a15dc33a5e5505cd0c965d96b142394be0daafaa4e820e81b90aac7130ee79c99a3a488bdbfc7449d8494b05c332c8fda7f5c904b43036ab7306810ceb777b1d
data/README.md CHANGED
@@ -30,6 +30,8 @@ Options:
30
30
  All paths should be relative to the base sync directory.
31
31
  -p, --port PORT Overwrite the SSH port (usually 22)
32
32
  (doesn't do anything in slave mode)
33
+ -c, --config PATH Use a custom SSH config (usually $HOME/.ssh/config)
34
+ (doesn't do anything in slave mode)
33
35
  --force-polling Forces the use of the listen polling adapter
34
36
  (works cross-platform, generally slower, doesn't do anything in slave mode)
35
37
  --no-rvm Skip attempting to load RVM on remote
data/exe/entangler CHANGED
@@ -40,6 +40,9 @@ OptionParser.new do |opts|
40
40
  value_opt(options, opts, :port, '-p', '--port PORT', 'Overwrite the SSH port (usually 22)',
41
41
  "(doesn't do anything in slave mode)")
42
42
 
43
+ value_opt(options, opts, :config, '-c', '--config PATH', 'Use a custom SSH config (usually $HOME/.ssh/config)',
44
+ "(doesn't do anything in slave mode)")
45
+
43
46
  bool_opt(options, opts, :force_polling, '--force-polling',
44
47
  'Forces the use of the listen polling adapter',
45
48
  "(works cross-platform, generally slower, doesn't do anything in slave mode)")
@@ -124,6 +127,7 @@ if options[:ignore]
124
127
  end
125
128
  end
126
129
 
130
+ opts[:config] = options[:config]
127
131
  opts[:force_polling] = options[:force_polling]
128
132
  opts[:no_rvm] = options[:no_rvm]
129
133
  opts[:quiet] = options[:quiet]
@@ -11,7 +11,8 @@ module Entangler
11
11
  def start_remote_slave
12
12
  logger.info('Starting - Entangler on remote')
13
13
  ignore_opts = @opts[:ignore].map { |regexp| "-i '#{regexp.inspect}'" }.join(' ')
14
- entangler_cmd = "entangler slave #{@opts[:remote_base_dir]} #{ignore_opts}"
14
+ entangler_cmd = +"entangler slave #{@opts[:remote_base_dir]} #{ignore_opts}"
15
+ entangler_cmd << ' --verbose' if @opts[:verbose]
15
16
  ssh_cmd = generate_ssh_command(entangler_cmd, source_rvm: true)
16
17
  full_cmd = @opts[:remote_mode] ? ssh_cmd : entangler_cmd
17
18
 
@@ -65,7 +65,9 @@ module Entangler
65
65
  cmd
66
66
  end
67
67
 
68
- "ssh -q #{remote_hostname} -p #{@opts[:remote_port]} -C \"#{prefixed_cmd}\""
68
+ ssh = "ssh -q #{remote_hostname} -p #{@opts[:remote_port]}"
69
+ ssh += " -F #{@opts[:config]}" if @opts[:config]
70
+ ssh + " -C \"#{prefixed_cmd}\""
69
71
  end
70
72
 
71
73
  def remote_hostname
@@ -83,7 +85,10 @@ module Entangler
83
85
  remote_path += "#{@opts[:remote_base_dir]}/"
84
86
 
85
87
  cmd = "rsync -azv --exclude-from #{rsync_ignores_file_path}"
86
- cmd += " -e \"ssh -p #{@opts[:remote_port]}\"" if @opts[:remote_mode]
88
+ if @opts[:remote_mode]
89
+ config = @opts[:config] ? "-F #{@opts[:config]}" : ''
90
+ cmd += " -e \"ssh -p #{@opts[:remote_port]} #{config}\""
91
+ end
87
92
  cmd + " --delete #{base_dir}/ #{remote_path}"
88
93
  end
89
94
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Entangler
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entangler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Allie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-16 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler