deplomat 0.1.8 → 0.1.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 +4 -4
- data/VERSION +1 -1
- data/deplomat.gemspec +2 -2
- data/lib/deplomat/node.rb +8 -6
- data/lib/deplomat/remote_node.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4e61e49e58a7d0202392bb9690e92d883dddc085e6ec8e0299d6a7fb8836e23
|
4
|
+
data.tar.gz: 63e359530d746474cb083690cadcebb28effa41a5c0d7003bdeda1c292297559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ac78323205e268c84f106d871185d0625ac3779040ec9a05df6f6b88280c26d71143add369156c07d06b4c8fba2f554c61125a42006d3964bf4b8a93dd32167
|
7
|
+
data.tar.gz: '0108070dd2c3ea71abe830397bc2e367f4bd90b75506f2659e4a38fdf851826b36a9ed97a8c8ffc550a79d3e26b664729146e2b77dedb2629075d6312ff9977b'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.10
|
data/deplomat.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
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.1.
|
5
|
+
# stub: deplomat 0.1.10 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "deplomat"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.10"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/deplomat/node.rb
CHANGED
@@ -128,13 +128,15 @@ module Deplomat
|
|
128
128
|
def clean(path: @current_path, except: [], leave: [0, :last])
|
129
129
|
# Gets us all entries sorted by date, most recent ones first
|
130
130
|
entries_by_date = execute("ls -t", path, log_command: false)[:out].split("\n")
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
131
|
+
if entries_by_date
|
132
|
+
# Don't do anything with entries listed in :except
|
133
|
+
entries_by_date = entries_by_date - except
|
134
|
+
if leave
|
135
|
+
entries_by_date.reverse! if leave[1] == :first
|
136
|
+
entries_by_date = entries_by_date[leave[0]..entries_by_date.length]
|
137
|
+
end
|
138
|
+
entries_by_date.each { |entry| remove("#{path}#{entry}") } if entries_by_date
|
136
139
|
end
|
137
|
-
entries_by_date.each { |entry| remove("#{path}#{entry}") }
|
138
140
|
end
|
139
141
|
|
140
142
|
def log(line, color: 'light_black')
|
data/lib/deplomat/remote_node.rb
CHANGED
@@ -20,6 +20,7 @@ module Deplomat
|
|
20
20
|
@pids << process.pid.to_i
|
21
21
|
end
|
22
22
|
end
|
23
|
+
@pids.compact!
|
23
24
|
if @pids.empty?
|
24
25
|
log("ERROR: no ssh pid found for\n\t#{first_ssh_command}.\nThis is weird.", color: "red")
|
25
26
|
exit
|
@@ -54,7 +55,7 @@ module Deplomat
|
|
54
55
|
def close
|
55
56
|
begin
|
56
57
|
puts "Closing connection(s) to #{@host}, ssh pid(s): #{@pids.join(", ")}."
|
57
|
-
@pids.each { |pid| Process.kill '
|
58
|
+
@pids.each { |pid| Process.kill 'TERM', pid }
|
58
59
|
rescue Errno::ESRCH
|
59
60
|
puts "WARNING: no process with #{@pid} found, no connection to close!"
|
60
61
|
end
|
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.1.
|
4
|
+
version: 0.1.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-06-
|
11
|
+
date: 2018-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sys-proctable
|