takeltau 0.45.17 → 0.45.21

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: 29a44c58a0f65c5af312f122d9045fa3fdcb2bb6cf1d18f9aea0fb78b849931e
4
- data.tar.gz: c6403cd84660b3ab9a87cacec5e25922a24893c4325b448889cee17fd0563a2e
3
+ metadata.gz: c8e57d2af7188980db3e7454b42bb8aff22a0ee3c3dcaf731f94e8e639c9fb1d
4
+ data.tar.gz: 6019ab1b46d6e9fd93137ad4454f42deb0f0a0089b0cc6e9fec6d6b4be2b5ee7
5
5
  SHA512:
6
- metadata.gz: 502b2a590318258ca0460b0c2384b2efb6676ff13d16ed19ff6d344c2490b17dd61aaacc1e4da07fdd0a6d83299a23e4ef41a026649c23849aece9ca39422ef6
7
- data.tar.gz: f1eccb654f5ae730d28dfe034b2412f431d9cd54d383a97d889df2f766cd44127b447c70bc3fbb3665518897bb80e1f94da1dc24f15de4e6ec405d6a3454a91b
6
+ metadata.gz: 27c8140f1e2967baae32360f573787cadb475a489ef3d078ef4361f368a14b537d8505dee51e63b085380c0a57ea4e16a1a62a8abe4a7e06b96e1d67affb5b3c
7
+ data.tar.gz: 37a12bc9b55cbc55d07ff11514dad2e9073d9c6b7fd235ef0ae52254976419bce9d7ddb2f5136c6c5d228aaaa925333bb0c11ad6a587f9c1ad67b01609d080ee
@@ -23,6 +23,8 @@ module ShipInfoLib
23
23
  def _ship_info_lib_get_project(project, takelship)
24
24
  return '' if takelship.nil?
25
25
 
26
+ return '' unless takelship.instance_of?(Hash)
27
+
26
28
  return '' unless takelship.key? 'default_project'
27
29
 
28
30
  project = config.active['ship_default_project'] if project == 'default'
@@ -17,7 +17,7 @@ module ShipProjectCreate
17
17
  ship_hostname_suffix: 'dump',
18
18
  publish_ports: false
19
19
  )
20
- return false unless _ship_container_lib_started? ship_status
20
+ return false unless _ship_container_lib_started?(ship_status, false)
21
21
 
22
22
  say "#{verb} takelship project \"#{project}\"."
23
23
  true
@@ -5,20 +5,7 @@ module ShipProjectRestart
5
5
  # Restart a takelship
6
6
  def ship_project_restart(project)
7
7
  say ship_container_stop
8
- _ship_project_restart_wait
9
- ship_project_start project
10
- end
11
-
12
- private
13
-
14
- # Wait until a takelship container is stopped
15
- def _ship_project_restart_wait
16
- cmd_ship_docker_wait = format(
17
- config.active['cmd_ship_docker_wait'],
18
- ship_docker: config.active['cmd_ship_docker'],
19
- ship_hostname: _ship_container_lib_ship_hostname
20
- )
21
-
22
- run cmd_ship_docker_wait
8
+ sleep 1 until ship_project_start project, mute: true
9
+ true
23
10
  end
24
11
  end
@@ -3,7 +3,7 @@
3
3
  # tau ship project start
4
4
  module ShipProjectStart
5
5
  # Start a takelship
6
- def ship_project_start(project)
6
+ def ship_project_start(project, mute: false)
7
7
  return false unless _ship_project_start_matrjoschka?
8
8
 
9
9
  takelship = _ship_info_lib_get_takelshipinfo
@@ -23,7 +23,7 @@ module ShipProjectStart
23
23
 
24
24
  log.debug "Starting takelship project \"#{project}\""
25
25
  ship_status = _ship_container_lib_docker_privileged ports, project
26
- return false unless _ship_container_lib_started? ship_status
26
+ return false unless _ship_container_lib_started?(ship_status, mute)
27
27
 
28
28
  _ship_project_start_print_banner project
29
29
  say
@@ -62,11 +62,11 @@ module ShipProjectStart
62
62
  end
63
63
 
64
64
  # check if the ship started successfully
65
- def _ship_container_lib_started?(ship_status)
65
+ def _ship_container_lib_started?(ship_status, mute)
66
66
  return true if ship_status[2].zero?
67
67
 
68
- say 'Unable to start the takelship. The error message was:'
69
- say ship_status[1].to_s.strip.delete_prefix('"').delete_suffix('"')
68
+ say 'Unable to start the takelship. The error message was:' unless mute
69
+ say ship_status[1].to_s.strip.delete_prefix('"').delete_suffix('"') unless mute
70
70
  false
71
71
  end
72
72
 
data/lib/takeltau/version CHANGED
@@ -1 +1 @@
1
- 0.45.17
1
+ 0.45.21
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takeltau
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.45.17
4
+ version: 0.45.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takelwerk