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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b95340130b792146eeee73303c8a617ef7ce1a9d4748a124e3d8b46658280a5
4
- data.tar.gz: 9103d4414a1d933a82a49f917143fb3d6d2d2f0ecd6b11f79089f0d0477c6a75
3
+ metadata.gz: 46ea3e316eba29453ae4fd2b33bf73e38112b21a14cc4f87c2ce906c0d139309
4
+ data.tar.gz: 96ba993d95a8ef6ab6f315856a943b11fada8eacb2bddf618fb372f15a08643a
5
5
  SHA512:
6
- metadata.gz: 9047b28026836b804685e285839d58e29bd3b4cfc53ba9e29d207e27d26afe217a15d21d8b74557a17503fe958287e2b35cb3171cfa02382a93ae8846bbe761e
7
- data.tar.gz: fbeacae84e7a885817ad3bc9e058ed6c83d1d27e0825466bd0dc334690a8beca29a9bc7a38e85f2136933102e3b425ff5aa70000abcd347adfb9732dfe221d0c
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
@@ -1,11 +1,11 @@
1
1
  version: '3'
2
2
  services:
3
3
  consul:
4
- image: consul:1.2.3
4
+ image: consul:1.3.0
5
5
  ports:
6
6
  - "8500:8500"
7
7
  vault:
8
- image: vault:0.11.1
8
+ image: vault:0.11.3
9
9
  environment:
10
10
  - VAULT_DEV_ROOT_TOKEN_ID=94e1a9ed-5d72-5677-27ab-ebc485cca368
11
11
  cap_add:
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
- @config[:consul][:acl_token] = consul_token
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][:acl_token] ||
87
+ @config[:consul].delete(:acl_token) ||
86
88
  (CONSUL_DISK_TOKEN.exist? ? CONSUL_DISK_TOKEN.read.chomp : nil)
87
89
  end
88
90
  end
@@ -1,3 +1,3 @@
1
1
  module Consult
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
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.1
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 00:00:00.000000000 Z
11
+ date: 2018-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport