deplomat 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52f3f28b7c61b018e8c5d0c4ca7124b022f51bb741f36ff9ded70c65f54bd900
4
- data.tar.gz: c62691d8f74aed43afd4cd73f41eae83fa4b7be88d697770e4c5e62c62c7c4c4
3
+ metadata.gz: 66ae898f5e989d5a0d75e1bc1553c4b5fbf0b72985f56d567196b45245a29e34
4
+ data.tar.gz: 7997c279e5efa60157e363a9f2a364652ab63d9043cdd4776d46518d9e9adc43
5
5
  SHA512:
6
- metadata.gz: 121320dbe76071c5b79f19d85b5157461b29e45e6bafe1cfe42ec90680327d4d0cd4193221d34635f70bfaef935d6c476fe3de131899c56be4bd19f54e4a8e32
7
- data.tar.gz: df10942d990399297fc97bcdd15d9d7ae802115b15074f5c989eaccbd7a1e52d902d6254afd0701dbac96e66bce0c07b429ba68bf6aa2fe70ed259709c46d014
6
+ metadata.gz: 7e39f88db17fb163497d22f7df5e1852d4400d2cf7cf4fe95e8d17a7adaf79763bfff8d871ba3504f84a43077510fb2d92168c8980e6aba6169349476768d370
7
+ data.tar.gz: bc9bb50fa861aeedb8e5ca8efdebeefa7b0172beb0a46eca85e4541e35dbe7d8981603918a159bc22a3453b2c38626b78938ac75c8611b0bb5f129cf5cc38090
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.9
1
+ 0.2.10
data/deplomat.gemspec CHANGED
@@ -2,21 +2,21 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: deplomat 0.2.9 ruby lib
5
+ # stub: deplomat 0.2.10 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "deplomat".freeze
9
- s.version = "0.2.9"
9
+ s.version = "0.2.10"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Roman Snitko".freeze]
14
- s.date = "2018-12-17"
14
+ s.date = "2019-06-16"
15
15
  s.description = "Stack agnostic deployment system that uses bash and ssh commands".freeze
16
16
  s.email = "roman.snitko@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
19
- "README.rdoc"
19
+ "README.md"
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  "Gemfile",
25
25
  "Gemfile.lock",
26
26
  "LICENSE.txt",
27
- "README.rdoc",
27
+ "README.md",
28
28
  "Rakefile",
29
29
  "VERSION",
30
30
  "deplomat.gemspec",
@@ -1,7 +1,7 @@
1
1
  module Deplomat
2
2
  class RemoteNode < Node
3
3
 
4
- def initialize(host:, port: 22, user: "deploy", raise_exceptions: true, path: nil, logfile: '~/deplomat.log', log_to: [:stdout])
4
+ def initialize(host:, port: nil, user: "deploy", raise_exceptions: true, path: nil, logfile: '~/deplomat.log', log_to: [:stdout])
5
5
 
6
6
  @log_to = log_to
7
7
  @logfile = logfile
@@ -12,14 +12,14 @@ module Deplomat
12
12
  end
13
13
 
14
14
  # Establish connection
15
- first_ssh_command = "ssh -MNfS #{ENV['HOME']}/.ssh/controlmasters/%r@%h:%p #{user}@#{host} -p #{port} -o ControlPersist=10m"
15
+ first_ssh_command = "ssh -MNfS #{ENV['HOME']}/.ssh/controlmasters/%r@%h:%p #{user}@#{host} #{port ? "-p #{port.to_s} " : ""}-o ControlPersist=10m"
16
16
  system first_ssh_command
17
17
 
18
18
  # get background process id by the full command name
19
19
  @pids = []
20
20
  Sys::ProcTable.ps.each do |process|
21
21
  if process.cmdline.match(first_ssh_command)
22
- @pids << process.pid.to_i
22
+ @pids << process.pid.to_i
23
23
  end
24
24
  end
25
25
  @pids.compact!
@@ -33,7 +33,7 @@ module Deplomat
33
33
  log("Connected with ssh, host #{host}, pid #{@pids.first}", color: "white")
34
34
  end
35
35
 
36
- @ssh_command = "ssh -S #{ENV['HOME']}/.ssh/controlmasters/%r@%h:%p #{user}@#{host} -p #{port}"
36
+ @ssh_command = "ssh -S #{ENV['HOME']}/.ssh/controlmasters/%r@%h:%p #{user}@#{host} #{port ? "-p #{port.to_s} " : ""}"
37
37
 
38
38
  @host = host
39
39
  @user = user
@@ -53,12 +53,12 @@ module Deplomat
53
53
 
54
54
  def upload(what, where, except: nil)
55
55
  except = "--exclude '#{except}'" if except
56
- local_execute "rsync -arzve 'ssh -p #{@port}' #{except} --delete #{what} #{@user}@#{@host}:#{where}", nil
56
+ local_execute "rsync -arzve 'ssh #{@port ? "-p #{@port.to_s} " : ""}' #{except} --delete #{what} #{@user}@#{@host}:#{where}", nil
57
57
  end
58
58
 
59
59
  def download(what, where, except: nil)
60
60
  except = "--exclude '#{except}'" if except
61
- local_execute "rsync -arzve 'ssh -p #{@port}' #{except} --delete #{@user}@#{@host}:#{what} #{where}", nil
61
+ local_execute "rsync -arzve 'ssh #{@port ? "-p #{@port.to_s} " : ""}' #{except} --delete #{@user}@#{@host}:#{what} #{where}", nil
62
62
  end
63
63
 
64
64
  def close
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deplomat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-17 00:00:00.000000000 Z
11
+ date: 2019-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sys-proctable