consul-templaterb 1.9.4 → 1.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +4 -0
- data/docs/images/consul-ui_001.png +0 -0
- data/lib/consul/async/consul_endpoint.rb +8 -4
- data/lib/consul/async/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 641ec7ace0ee7b0bdad06b8cbaef7ceba31b520f0302ef3504cee674e48344ed
|
4
|
+
data.tar.gz: 7d996fff12f90c62b9a402342ad4b51265ae2dc59df53cdd9ee3774aabe62b29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f904d40d4b51ca467ac13455bca0047ead220e2377143b33d610b44479b5d480ca5cec055f4628de2bde86df03711d56c3c65f5bd870b4ea3ad4a0e0a8f4adb
|
7
|
+
data.tar.gz: e653a1d9c5e2656110cb7168e4f825b4a2eb3b4cee951ad1bce2ba574f311f0f65ee800d34eceb61a18458f68b593531d2ccd3dd72fa4b04306cbdf20f542bc4
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -31,6 +31,10 @@ with fully [working examples](samples/).
|
|
31
31
|
It also allow to display a very nice and hi-performance HTML5 UI for Consul,
|
32
32
|
see [consul-ui](samples/consul-ui) for details.
|
33
33
|
|
34
|
+
## Video introduction to consul-templaterb
|
35
|
+
|
36
|
+
[![Introduction to Consul-templaterb](docs/images/consul-ui_001.png)](https://youtu.be/zLzrLGLLl4Q)
|
37
|
+
|
34
38
|
## Differences with HashiCorp's consul-template
|
35
39
|
|
36
40
|
[Hashicorp's Consul Template](https://github.com/hashicorp/consul-template)
|
Binary file
|
@@ -206,14 +206,16 @@ module Consul
|
|
206
206
|
connect_timeout: 5, # default connection setup timeout
|
207
207
|
inactivity_timeout: conf.wait_duration + 1 + (conf.wait_duration / 16), # default connection inactivity (post-setup) timeout
|
208
208
|
}
|
209
|
-
connection =
|
209
|
+
connection = {
|
210
|
+
conn: EventMachine::HttpRequest.new(conf.base_url, options)
|
211
|
+
}
|
210
212
|
cb = proc do |consul_index|
|
211
|
-
http = connection.get(build_request(consul_index))
|
213
|
+
http = connection[:conn].get(build_request(consul_index))
|
212
214
|
http.callback do
|
213
215
|
# Dirty hack, but contrary to other path, when key is not present, Consul returns 404
|
214
216
|
is_kv_empty = path.start_with?('/v1/kv') && http.response_header.status == 404
|
215
217
|
if !is_kv_empty && enforce_json_200 && http.response_header.status != 200 && http.response_header['Content-Type'] != 'application/json'
|
216
|
-
_handle_error(http, consul_index) { connection = EventMachine::HttpRequest.new(conf.base_url, options) }
|
218
|
+
_handle_error(http, consul_index) { connection[:conn] = EventMachine::HttpRequest.new(conf.base_url, options) }
|
217
219
|
else
|
218
220
|
n_consul_index = find_x_consul_index(http)
|
219
221
|
@x_consul_index = n_consul_index.to_i if n_consul_index
|
@@ -247,7 +249,9 @@ module Consul
|
|
247
249
|
|
248
250
|
http.errback do
|
249
251
|
unless @stopping
|
250
|
-
_handle_error(http, consul_index)
|
252
|
+
_handle_error(http, consul_index) do
|
253
|
+
connection[:conn] = EventMachine::HttpRequest.new(conf.base_url, options)
|
254
|
+
end
|
251
255
|
end
|
252
256
|
end
|
253
257
|
queue.pop(&cb)
|
data/lib/consul/async/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul-templaterb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SRE Core Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-http-request
|
@@ -161,6 +161,7 @@ files:
|
|
161
161
|
- TemplateAPI.md
|
162
162
|
- bin/consul-templaterb
|
163
163
|
- consul-templaterb.gemspec
|
164
|
+
- docs/images/consul-ui_001.png
|
164
165
|
- lib/consul/async/consul_endpoint.rb
|
165
166
|
- lib/consul/async/consul_template.rb
|
166
167
|
- lib/consul/async/consul_template_engine.rb
|
@@ -232,7 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
233
|
- !ruby/object:Gem::Version
|
233
234
|
version: '0'
|
234
235
|
requirements: []
|
235
|
-
|
236
|
+
rubyforge_project:
|
237
|
+
rubygems_version: 2.7.7
|
236
238
|
signing_key:
|
237
239
|
specification_version: 4
|
238
240
|
summary: Implementation of Consul template using Ruby and .erb templating language
|