aide 0.1.5 → 0.1.6
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 +4 -4
- data/lib/aide/config.rb +3 -2
- data/lib/aide/service.rb +6 -6
- data/lib/aide/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 913b87b1b83f1ddbfc8d738b14e80fa2f8c20cf4
|
4
|
+
data.tar.gz: 2601657bfb9457f09d2fedfbfb3adb82956bad21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd22e13b823f658d3dc8e795a2535e5e8f5b579736507ace32a1db6668d262a87eac6c23a30cd0aa3720019c37264c029aa01748a7a9ef1a22eecc7b014705d1
|
7
|
+
data.tar.gz: f0dc8b980e0b17a68b8914975cec967bc8a0ed6d3ad12c6e20e525f752fc136407a1dc01e82425ce41e5bed74f2e383b86d27366d6043de0ccfad6482e9eca70
|
data/lib/aide/config.rb
CHANGED
@@ -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
|
|
data/lib/aide/service.rb
CHANGED
@@ -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(',')
|
data/lib/aide/version.rb
CHANGED
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.
|
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-
|
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.
|
93
|
+
rubygems_version: 2.5.1
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: A configuration helper for Diplomat
|