secrets_cli 1.12.1 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f49c6ff102690ea82d4b6690fd57f4b68623e5844254b152a50cce069e10865
4
- data.tar.gz: 001b8aa6ea425a1811d443fbfa8104bf318baacb22e14444524abbd96f0ef429
3
+ metadata.gz: 1feb1269fb615a44d6db915f8663b7551456fd3601bf328696e472df8c0aa10a
4
+ data.tar.gz: fabe58b06429dc412c22a741e2dd69108b65518f328ffcba4aff0b48824b205a
5
5
  SHA512:
6
- metadata.gz: dcc6685035d12ac48c5ebaf2afbf753891a2e652816a4e1f24a7aedaafd5c62adcbdc4718b2ce8f8502b8caed9665c539480d9a87a060d7c99e26193db5fda77
7
- data.tar.gz: d908edd9fa492a679e576984980fb45cf9498faa39c19df0fbecebd6c1d748d010a2a6853e7f19626542d5d4b0ec13b69de43923b2ab12f0b9b9818a3cc93c05
6
+ metadata.gz: 7cd6763fb917a56cb130b1b56ed4031b8ab41758f7b002ed589a2ab4f93e5ec0c96c9f0146179c13818801464ac1ab837712bbc9780cc7794d76ec4f7a8b244e
7
+ data.tar.gz: b16dee05767bdb1912f5f0c5c64970ecdc10509a8451a487fa3de0bf822b5e0c6637161f630cc97c9a45184d15a9fc39a820e8d1fd3d322ec1dbfea288abe998
@@ -21,17 +21,21 @@ module SecretsCli
21
21
  def command
22
22
  case auth_method
23
23
  when 'github'
24
- ::Vault.auth.github(auth_token)
24
+ vault.auth.github(auth_token)
25
25
  when 'token'
26
- ::Vault.auth.token(auth_token)
26
+ vault.auth.token(auth_token)
27
27
  when 'app_id'
28
- ::Vault.auth.app_id(auth_app_id, auth_user_id)
28
+ vault.auth.app_id(auth_app_id, auth_user_id)
29
29
  when 'approle'
30
- ::Vault.auth.approle(auth_role_id, auth_secret_id)
30
+ vault.auth.approle(auth_role_id, auth_secret_id)
31
31
  else
32
32
  error! "Unknown auth method #{auth_method}"
33
33
  end.auth
34
34
  end
35
+
36
+ def vault
37
+ ::Vault::Client.new(address: config.vault_addr)
38
+ end
35
39
  end
36
40
  end
37
41
  end
@@ -1,3 +1,3 @@
1
1
  module SecretsCli
2
- VERSION = '1.12.1'
2
+ VERSION = '1.12.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secrets_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stjepan Hadjic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-22 00:00:00.000000000 Z
11
+ date: 2019-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler