boutons 0.4.8 → 0.4.9
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/README.md +6 -0
- data/lib/boutons/version.rb +1 -1
- data/lib/boutons.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e675d81810f244e9154b555c99cec37264978b4
|
4
|
+
data.tar.gz: 2276c448854581ff2dce7e1e478c8e0817615b38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83bdc50e3ee82b747115a64a47e05d564da294730aacc9fb6c3d2392482facee325729789bd537d51d34a3da54692de56c2b8207716e2d3610ee3c4f172734b8
|
7
|
+
data.tar.gz: 7cceba7b9b6f542dc7f6fadf950738ee416073bdc2ed56079f1a4c405dd10e81c42caa215f4d73bda3ef52ada00602b249a1e9c8196fbf433368c5fd6f74764e
|
data/README.md
CHANGED
@@ -55,6 +55,12 @@ Boutons can also add synapses at runtime.
|
|
55
55
|
Boutons.provide "smtp", "zookeeper://zookeeper.mail.company.com:2181/outbound-relay/smtp"
|
56
56
|
puts Boutons.smtp.to_s("%h:%p")
|
57
57
|
|
58
|
+
A bit more complex
|
59
|
+
|
60
|
+
Boutons.provide "weather", "zookeeper+http://zk.weather.earth:2181/europe#/health"
|
61
|
+
|
62
|
+
Will set the type to http and check if the server by GETting /health.
|
63
|
+
|
58
64
|
## String-Format
|
59
65
|
|
60
66
|
the to_s method prints the local uri as default. You may provide some kind of format-string to your needs. The following placeholders will be replaces by it's value:
|
data/lib/boutons/version.rb
CHANGED
data/lib/boutons.rb
CHANGED
@@ -32,7 +32,8 @@ module Boutons
|
|
32
32
|
params[:path] = uri.registry.zk_path
|
33
33
|
params[:hosts] = uri.registry.zk_hosts
|
34
34
|
params[:name] = service.to_sym
|
35
|
-
|
35
|
+
synapse = Synapse::Easy::Service.new params
|
36
|
+
add(synapse) and return synapse
|
36
37
|
end
|
37
38
|
def remove name
|
38
39
|
services[mapping[name]] = nil
|