indocker 0.3.8 → 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: 87639308a00d3b5ff25ea91c810684010020f5b3166d437a4cb9e13fbc0bdaaa
4
- data.tar.gz: 67e2bccca67ce27dc8c9c2e22932aa6fc7787f78e1330dda2f9bc303f827c58e
3
+ metadata.gz: 94c3e1673cb76f0e0684e0d88286d7e9797e0d5095cc8d1da23c43c729c80df4
4
+ data.tar.gz: c2ee0ea5f6e461fb3efeeeb5b3f9415e701c7bffcadc754fae8356a88dcdd7ac
5
5
  SHA512:
6
- metadata.gz: 0e9c826e268274d3051c8a4ce11f3eb33b33d786821fb750ef8ccc0d651edf7b8dcc63147793b7324ef1aa7493df7341aa6769d08b17aa159aba8fa8d7299820
7
- data.tar.gz: 125b92b07ab11799d228152eac7f61a9ce059344c65d2285bbf18457fdeb15e0ec15f2b45ecf1809870b86a6f192aa1c42b751bbedcbcf11f3aa950fe0e770b9
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.8)
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
@@ -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.8"
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.8
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: 2024-04-03 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