aide 0.1.5 → 0.1.6

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: 594b97487398ab5462e49e81809708ff410c9483
4
- data.tar.gz: 56d6e52bea45352b5729bcbe7a4c8d67c8e8a968
3
+ metadata.gz: 913b87b1b83f1ddbfc8d738b14e80fa2f8c20cf4
4
+ data.tar.gz: 2601657bfb9457f09d2fedfbfb3adb82956bad21
5
5
  SHA512:
6
- metadata.gz: 14a0faf679c5c972812149364215336f385a713d8ef37005c4428d6f5e5aa251a5997e332effdd951918c0c9bb8aee7d008ac9a708138e9f625ca13d11a65dc5
7
- data.tar.gz: d77fc8fcc7c7e69e994072c1af3871494ccd3b85638c0e0be95829ec8d1cb326c8b5deb5146b1543896c03049e2549f49c6edd030bed7509fe230a456af8bb4d
6
+ metadata.gz: fd22e13b823f658d3dc8e795a2535e5e8f5b579736507ace32a1db6668d262a87eac6c23a30cd0aa3720019c37264c029aa01748a7a9ef1a22eecc7b014705d1
7
+ data.tar.gz: f0dc8b980e0b17a68b8914975cec967bc8a0ed6d3ad12c6e20e525f752fc136407a1dc01e82425ce41e5bed74f2e383b86d27366d6043de0ccfad6482e9eca70
@@ -25,7 +25,7 @@ module Aide
25
25
  self.service_address_method = SERVICE_ADDRESS_METHOD
26
26
  end
27
27
 
28
- def add_service(name:, url:nil, auth:nil, user_key:nil, password_key:nil, protocol_key:nil, multi_url:nil, node:nil, database_key:nil)
28
+ def add_service(name:, url:nil, auth:nil, user_key:nil, password_key:nil, protocol_key:nil, multi_url:nil, node:nil, database_key:nil, allow_missing:false)
29
29
  services[name] = {
30
30
  name: name,
31
31
  url: url,
@@ -35,7 +35,8 @@ module Aide
35
35
  password_key: password_key,
36
36
  protocol_key: protocol_key,
37
37
  node: node,
38
- database_key: database_key
38
+ database_key: database_key,
39
+ allow_missing: allow_missing
39
40
  }
40
41
  end
41
42
 
@@ -15,11 +15,11 @@ module Aide
15
15
  alias port ServicePort
16
16
 
17
17
  def url(filtered: false)
18
- return if empty?
19
-
20
18
  template = config[:url]
21
19
  return if template.nil?
22
20
 
21
+ return if empty? && !config[:allow_missing]
22
+
23
23
  template = template.dup
24
24
  template.gsub!(/{{\.protocol}}/, self.protocol.to_s)
25
25
  template.gsub!(/{{\.address}}/, self.address.to_s)
@@ -40,11 +40,11 @@ module Aide
40
40
  end
41
41
 
42
42
  def multi_url(filtered: false)
43
- return if empty?
44
-
45
43
  template = config[:multi_url]
46
44
  return if template.nil?
47
45
 
46
+ return if empty? && !config[:allow_missing]
47
+
48
48
  template = template.dup
49
49
  template.gsub!(/{{\.protocol}}/, self.protocol.to_s)
50
50
  template.gsub!(/{{\.auth}}/, self.auth(filtered: filtered).to_s)
@@ -91,11 +91,11 @@ module Aide
91
91
  end
92
92
 
93
93
  def nodes
94
- return if empty?
95
-
96
94
  template = config[:node]
97
95
  return if template.nil?
98
96
 
97
+ return if empty? && !config[:allow_missing]
98
+
99
99
  services.map do |service|
100
100
  self.node(service)
101
101
  end.join(',')
@@ -1,3 +1,3 @@
1
1
  module Aide
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Schlesinger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-07 00:00:00.000000000 Z
11
+ date: 2016-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.4.8
93
+ rubygems_version: 2.5.1
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: A configuration helper for Diplomat