consult 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docker-compose.yml +2 -2
- data/lib/consult.rb +4 -2
- data/lib/consult/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ea3e316eba29453ae4fd2b33bf73e38112b21a14cc4f87c2ce906c0d139309
|
4
|
+
data.tar.gz: 96ba993d95a8ef6ab6f315856a943b11fada8eacb2bddf618fb372f15a08643a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f47bc8fccf91f7efcd5ae3b9042e1c22d93a8c5a2f375a934ea5aaddae7eb0b8ecb7c63384367abf5428453f5bad98a2513b7b75ebf421ac15ba3a9c353ed05a
|
7
|
+
data.tar.gz: 8500c4dd097cfbc4c82cd3f9054c006214a4d51cf0ca0e79ae77655c2392581f341c031dfbdb66d1804d418148489411f164c46a7c58f0e055c2d70d18f22993
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
#### 0.8.2
|
2
|
+
|
3
|
+
* Use `X-Consul-Token` header for Consul authentication. See the [Consul docs](https://www.consul.io/api/index.html#authentication) for details. ([#19](https://github.com/veracross/consult/pull/19))
|
4
|
+
|
1
5
|
#### 0.8.1
|
2
6
|
|
3
7
|
* Obey template location order as specified in consult's config
|
data/docker-compose.yml
CHANGED
data/lib/consult.rb
CHANGED
@@ -40,7 +40,9 @@ module Consult
|
|
40
40
|
# Additionally: prefer env vars over explicit config
|
41
41
|
configured_address = @config[:consul].delete(:address)
|
42
42
|
@config[:consul][:url] = ENV['CONSUL_HTTP_ADDR'] || configured_address || @config[:consul][:url]
|
43
|
-
|
43
|
+
# If a consul token exists, treat it as special
|
44
|
+
# See https://github.com/WeAreFarmGeek/diplomat/pull/160
|
45
|
+
(@config[:consul][:options] ||= {}).merge!(headers: {'X-Consul-Token' => consul_token}) if consul_token.present?
|
44
46
|
|
45
47
|
Diplomat.configure do |c|
|
46
48
|
@config[:consul].each do |opt, val|
|
@@ -82,7 +84,7 @@ module Consult
|
|
82
84
|
def consul_token
|
83
85
|
ENV['CONSUL_HTTP_TOKEN'] ||
|
84
86
|
@config[:consul].delete(:token) ||
|
85
|
-
@config[:consul]
|
87
|
+
@config[:consul].delete(:acl_token) ||
|
86
88
|
(CONSUL_DISK_TOKEN.exist? ? CONSUL_DISK_TOKEN.read.chomp : nil)
|
87
89
|
end
|
88
90
|
end
|
data/lib/consult/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consult
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Fraser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|