dory 0.6.1 → 0.6.2

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
  SHA1:
3
- metadata.gz: d01151c6c0776bde1a7aadf38029c8764585d88d
4
- data.tar.gz: 50a86e3abb55c96ddb3878162aa31baf8fb90197
3
+ metadata.gz: ed21af67680e2286c0717b5b33de9f296b2664ce
4
+ data.tar.gz: 6b93398f6d7ccb2da694ef0c2ae591141b800c4b
5
5
  SHA512:
6
- metadata.gz: '01507058e722fc6cb79ca75d37188285e551effe36c5c31a2c3900375568ee3c1cb5c584f16a50e84fff88c71709fab797f4011784ede37cf0e356aa64d4a4f6'
7
- data.tar.gz: 72c68d59ef4274e8636ab5b62431efe0fd2c3d3087bbca22e0afa82d6b10061acc7848d9e138f6832d970679f1668d428b2a4434571dd024ebb5933788671090
6
+ metadata.gz: f87fe6bf2fa5f9bc37dc344fb4b6f85d9e377ffb0d4eb5d4a7f2d87c33153830d72850907169b5aea7a52536e768e9e131113465ad9d9f11f80969179c8b7484
7
+ data.tar.gz: 8c9fd422e6003319dea3ada3f9b946208396fe25e3ecd6045c31f6a1252aec48c3e5da7be1bc9d549a54ed6aba69e4a42ef4d4eb1ab5b57d7eb7e48074ec8b6f
@@ -33,6 +33,7 @@ module Dory
33
33
  # yes|true (go aheand and kill without asking)
34
34
  # no|false (don't kill, and don't even ask)
35
35
  kill_others: ask
36
+ service_start_delay: 5 # seconds to wait after restarting systemd services
36
37
  nginx_proxy:
37
38
  enabled: true
38
39
  container_name: dory_dinghy_http_proxy
@@ -95,7 +96,13 @@ module Dory
95
96
  end
96
97
 
97
98
  # Add the option to skip prompts
98
- newsettings[:dory][:dnsmasq][:kill_others] = 'ask'
99
+ unless newsettings[:dory][:dnsmasq][:kill_others]
100
+ newsettings[:dory][:dnsmasq][:kill_others] = 'ask'
101
+ end
102
+
103
+ unless newsettings[:dory][:dnsmasq][:service_start_delay]
104
+ newsettings[:dory][:dnsmasq][:service_start_delay] = 5
105
+ end
99
106
 
100
107
  newsettings
101
108
  end
@@ -2,6 +2,10 @@ require_relative 'docker_service'
2
2
 
3
3
  module Dory
4
4
  module Systemd
5
+ def self.up_delay_seconds
6
+ Dory::Config.settings[:dory][:dnsmasq][:service_start_delay] || 5
7
+ end
8
+
5
9
  def self.has_systemd?
6
10
  Sh.run_command('which systemctl').success?
7
11
  end
@@ -24,7 +28,15 @@ module Dory
24
28
  def self.set_systemd_service(service:, up:)
25
29
  action = up ? 'start' : 'stop'
26
30
  puts "Requesting sudo to #{action} #{service}".green
27
- Sh.run_command("sudo systemctl #{action} #{service}").success?
31
+ retval = Sh.run_command("sudo systemctl #{action} #{service}").success?
32
+
33
+ # We need to wait a few seconds for init if putting stuff up to avoid race conditions
34
+ if up
35
+ puts "Waiting #{self.up_delay_seconds} seconds for #{service} to start ...".green
36
+ sleep(self.up_delay_seconds)
37
+ end
38
+
39
+ retval
28
40
  end
29
41
  end
30
42
  end
@@ -1,4 +1,4 @@
1
1
  module Dory
2
- VERSION = '0.6.1'
3
- DATE = '2016-07-12'
2
+ VERSION = '0.6.2'
3
+ DATE = '2016-08-02'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize