consul-templaterb 1.33.1 → 1.33.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
  SHA256:
3
- metadata.gz: 18c7c1fcf9c8e0685664f79da1b48f7e15dabdaa959ad12172f64313877f9551
4
- data.tar.gz: d54d351404c5f76d7e08b502b1f905b9709a2666a6641ad7c24aa7d9b122e6a7
3
+ metadata.gz: f55651aacf74759dde1f529be4cb482568b0272067b5b208ff4268828cbfce6b
4
+ data.tar.gz: f22a2c679bcaf2a79a1d70f2d375d1707a5a2e58ae99f9186f10d97615b24303
5
5
  SHA512:
6
- metadata.gz: 29b61accf646ff4fe11946f2bafc37bd6dea31e50b9d6c01a0ded3c3c1992ae394060f1e0711136492170810c6fe5f7a25e1b06a3930d6218986f0acfee5ca34
7
- data.tar.gz: 50ab860a1eb59c0c7b99e97eb3ed95edfcfd94452917c69a462145d5d9700c16790631010c8aa7950b17d601b095bb3b799b11d852d84c3b23a1f0150ee230b7
6
+ metadata.gz: 1b10810197fc2c882d09723203d47c62f6aaed2a94cd463a939e4b9ab34b75c0e3c2f8b2c702bc999dd5e37bd86d1b727f17268f7029b66f0ac75211843340ba
7
+ data.tar.gz: cbbec34b47aa8230846ff21dbeb247928519d65f058cded7cf29f76df225fa8148bcb99d3d842e1951a782c992e355b37628b83505c5dd705831d1b7ce49ac6f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.31.2 (Aug 04 2022)
4
+
5
+ BUG FIX:
6
+
7
+ * URL encode service and KV names when calling the http API
8
+
3
9
  ## 1.31.1 (Feb 281 2022)
4
10
 
5
11
  BUG FIX:
@@ -132,7 +132,7 @@ module Consul
132
132
  def service(name, dc: nil, passing: false, tag: nil, agent: nil)
133
133
  raise 'You must specify a name for a service' if name.nil?
134
134
 
135
- path = "/v1/health/service/#{name}"
135
+ path = '/v1/health/service/' + ERB::Util.url_encode(name.to_s)
136
136
  query_params = {}
137
137
  query_params[:dc] = dc if dc
138
138
  query_params[:passing] = passing if passing
@@ -144,7 +144,7 @@ module Consul
144
144
  def checks_for_service(name, dc: nil, passing: false, agent: nil)
145
145
  raise 'You must specify a name for a service' if name.nil?
146
146
 
147
- path = "/v1/health/checks/#{name}"
147
+ path = '/v1/health/checks/' + ERB::Util.url_encode(name.to_s)
148
148
  query_params = {}
149
149
  query_params[:dc] = dc if dc
150
150
  query_params[:passing] = passing if passing
@@ -155,7 +155,7 @@ module Consul
155
155
  def checks_for_node(name, dc: nil, passing: false, agent: nil)
156
156
  raise 'You must specify a name for a service' if name.nil?
157
157
 
158
- path = "/v1/health/node/#{name}"
158
+ path = '/v1/health/node/' + ERB::Util.url_encode(name.to_s)
159
159
  query_params = {}
160
160
  query_params[:dc] = dc if dc
161
161
  query_params[:passing] = passing if passing
@@ -184,7 +184,7 @@ module Consul
184
184
 
185
185
  # https://www.consul.io/api/catalog.html#list-services-for-node
186
186
  def node(name_or_id, dc: nil, agent: nil)
187
- path = "/v1/catalog/node/#{name_or_id}"
187
+ path = '/v1/catalog/node/' + ERB::Util.url_encode(name_or_id.to_s)
188
188
  query_params = {}
189
189
  query_params[:dc] = dc if dc
190
190
  create_if_missing(path, query_params, agent: agent) { ConsulTemplateNode.new(ConsulEndpoint.new(consul_conf, path, true, query_params, '{}', agent)) }
@@ -247,7 +247,7 @@ module Consul
247
247
 
248
248
  # https://www.consul.io/api/kv.html#read-key
249
249
  def kv(name = nil, dc: nil, keys: nil, recurse: false, agent: nil)
250
- path = "/v1/kv/#{name}"
250
+ path = '/v1/kv/' + ERB::Util.url_encode(name.to_s)
251
251
  query_params = {}
252
252
  query_params[:dc] = dc if dc
253
253
  query_params[:recurse] = recurse if recurse
@@ -1,5 +1,5 @@
1
1
  module Consul
2
2
  module Async
3
- VERSION = '1.33.1'.freeze
3
+ VERSION = '1.33.2'.freeze
4
4
  end
5
5
  end
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.33.1
4
+ version: 1.33.2
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: 2022-02-21 00:00:00.000000000 Z
11
+ date: 2022-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: em-http-request