indocker 0.3.7 → 0.3.9

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: 1d3472a334b23e6fc3ecf88306d9af0a9394a90aec769711492226322e96e2d6
4
- data.tar.gz: '08150afcc26f9f053290d6abb1160a2a32405fa08d1cb2740b4839f3298f8e74'
3
+ metadata.gz: 94c3e1673cb76f0e0684e0d88286d7e9797e0d5095cc8d1da23c43c729c80df4
4
+ data.tar.gz: c2ee0ea5f6e461fb3efeeeb5b3f9415e701c7bffcadc754fae8356a88dcdd7ac
5
5
  SHA512:
6
- metadata.gz: a3eeff429884e4f1961e725c97997b9c8c58874c7bb5ba31164e18cc6bc80e0169f82ceb01855dbaed098888397cf94f773c177b3aed4fe72091edfee2b969a5
7
- data.tar.gz: 14480618981749a870f6acadb503d2cb9cbc08652d55a098c40801bbdcf3e01639d593cb100537c9399ed3df434a59740cf45ca9322939134982a78f0cf2c247
6
+ metadata.gz: ea87d5271a5bce0ff19bb28145ac31e6ab681278e008e43ebbba057fd8325bd358f02b83b46b1ba762653cbb6ed1b6565ce4e7ef72961149270fea3073e5d960
7
+ data.tar.gz: 2a18463fbb82df02122ec3b842f3a186dd08d50a946b5f999850c7f677ee305292a09cd9e95f54d1ca51ccaed21ac69edd25f56c3b5dde9f9de2a10d599b5319
data/Gemfile.lock CHANGED
@@ -1,38 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- indocker (0.3.6)
4
+ indocker (0.3.9)
5
5
  net-ssh
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  coderay (1.1.3)
11
- diff-lcs (1.5.0)
12
- docile (1.4.0)
13
- method_source (1.0.0)
14
- net-ssh (7.2.0)
15
- pry (0.14.2)
11
+ diff-lcs (1.5.1)
12
+ docile (1.4.1)
13
+ method_source (1.1.0)
14
+ net-ssh (7.3.0)
15
+ pry (0.15.0)
16
16
  coderay (~> 1.1)
17
17
  method_source (~> 1.0)
18
18
  rake (12.3.3)
19
- rspec (3.12.0)
20
- rspec-core (~> 3.12.0)
21
- rspec-expectations (~> 3.12.0)
22
- rspec-mocks (~> 3.12.0)
23
- rspec-core (3.12.2)
24
- rspec-support (~> 3.12.0)
25
- rspec-expectations (3.12.3)
19
+ rspec (3.13.0)
20
+ rspec-core (~> 3.13.0)
21
+ rspec-expectations (~> 3.13.0)
22
+ rspec-mocks (~> 3.13.0)
23
+ rspec-core (3.13.2)
24
+ rspec-support (~> 3.13.0)
25
+ rspec-expectations (3.13.3)
26
26
  diff-lcs (>= 1.2.0, < 2.0)
27
- rspec-support (~> 3.12.0)
28
- rspec-mocks (3.12.6)
27
+ rspec-support (~> 3.13.0)
28
+ rspec-mocks (3.13.2)
29
29
  diff-lcs (>= 1.2.0, < 2.0)
30
- rspec-support (~> 3.12.0)
31
- rspec-support (3.12.1)
30
+ rspec-support (~> 3.13.0)
31
+ rspec-support (3.13.2)
32
32
  simplecov (0.18.5)
33
33
  docile (~> 1.1)
34
34
  simplecov-html (~> 0.11)
35
- simplecov-html (0.12.3)
35
+ simplecov-html (0.13.1)
36
36
 
37
37
  PLATFORMS
38
38
  x86_64-linux
@@ -26,9 +26,7 @@ class Indocker::ContainerDeployer
26
26
  end
27
27
  else
28
28
  Proc.new do |&block|
29
- Thread.new do
30
- block.call
31
- end
29
+ block.call
32
30
  end
33
31
  end
34
32
 
@@ -44,9 +42,9 @@ class Indocker::ContainerDeployer
44
42
  )
45
43
 
46
44
  if result.exit_code != 0
47
- exit 1
45
+ exit 1
48
46
  end
49
-
47
+
50
48
  @logger.info("Container deployment to #{server.user}@#{server.host} finished: #{container.name.to_s.green}")
51
49
 
52
50
  deploy_server.close_session
@@ -69,8 +69,10 @@ class Indocker::DeployContext
69
69
  container.before_start_proc.call(container, number)
70
70
  end
71
71
 
72
+ stop_timeout = container.get_start_option(:stop_timeout)
73
+
72
74
  if container_id
73
- Indocker::Docker.stop(hostname, skip_errors: true)
75
+ Indocker::Docker.stop(hostname, time: stop_timeout, skip_errors: true)
74
76
  else
75
77
  Indocker::Docker.rm(hostname, skip_errors: true)
76
78
  end
@@ -97,4 +99,4 @@ class Indocker::DeployContext
97
99
 
98
100
  nil
99
101
  end
100
- end
102
+ end
@@ -18,7 +18,8 @@ class Indocker::Docker
18
18
  Indocker::Shell.command("docker pull #{url}", Indocker.logger)
19
19
  end
20
20
 
21
- def stop(container_name, time = 10, skip_errors: false)
21
+ def stop(container_name, time: nil, skip_errors: false)
22
+ time ||= 10 # default timeout for Linux
22
23
  Indocker::Shell.command("docker stop --time=#{time} #{container_name}", Indocker.logger, skip_errors: skip_errors)
23
24
  rm(container_name, skip_errors: skip_errors)
24
25
  end
@@ -1,3 +1,3 @@
1
1
  module Indocker
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-10-10 00:00:00.000000000 Z
12
+ date: 2024-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-ssh