consul-templaterb 1.33.1 → 1.33.3

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: 47eaa92845652a63849a621657d850033637d379ca3c052b4829ef395ca00c8a
4
+ data.tar.gz: 93b6efa0a2644b0595f428b30c54e078ae6e8675f8e3333789a78270f895e878
5
5
  SHA512:
6
- metadata.gz: 29b61accf646ff4fe11946f2bafc37bd6dea31e50b9d6c01a0ded3c3c1992ae394060f1e0711136492170810c6fe5f7a25e1b06a3930d6218986f0acfee5ca34
7
- data.tar.gz: 50ab860a1eb59c0c7b99e97eb3ed95edfcfd94452917c69a462145d5d9700c16790631010c8aa7950b17d601b095bb3b799b11d852d84c3b23a1f0150ee230b7
6
+ metadata.gz: 55648527a4f03b75ee82dc8d6a59fcc1269c67e567950772651c69e53d976e2158d885ba128b5ff6a119a1932002430c2020c2ed6ec27b4aa5bcd59785e73c49
7
+ data.tar.gz: b087e056e7c511c174c0be95b18a38cfdfaa26f74f530c7eaab88b45c8f5c487b475a9743c79aa02b51dd1948db6c47652021271c74c8058060e547d60a64f03
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:
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://github.com/criteo/consul-templaterb/workflows/Ruby/badge.svg?branch=master)](https://github.com/criteo/consul-templaterb/actions?query=branch%3Amaster)
4
4
  [![Gem Version](https://badge.fury.io/rb/consul-templaterb.svg)](http://github.com/criteo/consul-templaterb/releases)
5
- [![GEM Downloads](https://ruby-gem-downloads-badge.herokuapp.com/consul-templaterb?type=total&metric=true)](https://rubygems.org/gems/consul-templaterb)
5
+ [![GEM Downloads](https://img.shields.io/gem/dt/consul-templaterb.svg)](https://rubygems.org/gems/consul-templaterb)
6
6
  [![License](https://img.shields.io/badge/license-ApacheV2-yellowgreen.svg)](#license)
7
7
 
8
8
  The ruby GEM [consul-templaterb](https://rubygems.org/gems/consul-templaterb)
@@ -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.3'.freeze
4
4
  end
5
5
  end
@@ -39,7 +39,7 @@ function usefullLinksGenerator(instance, serviceName, node_meta_info) {
39
39
  /**
40
40
  * createNodeDisplayElement resolves and displays the node name.
41
41
  */
42
- function createNodeDisplayElement(nodeName, nodemeta) {
42
+ function createNodeDisplayElement(nodeName, _nodemeta, _instanceFqdn) {
43
43
  return document.createTextNode(nodeName);
44
44
  }
45
45
 
@@ -87,7 +87,7 @@ function serviceTitleGenerator(instance, serviceName, node_info) {
87
87
  }
88
88
 
89
89
  var nodemeta = (node_info != null) ? node_info.meta : null;
90
- instanceLink.appendChild(createNodeDisplayElement(instance.name, nodemeta));
90
+ instanceLink.appendChild(createNodeDisplayElement(instance.name, nodemeta, instance?.sMeta?.fqdn));
91
91
  instanceLink.appendChild(document.createTextNode(appendPort));
92
92
 
93
93
  const nodeInfo = document.createElement('a');
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.3
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: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: em-http-request