secrets_cli 1.8.0 → 1.9.0

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: 5f4e5fa55b2abbfd5be5a5f3da7c5a9a4a8679ff50b3023a04c70e15e0f93326
4
- data.tar.gz: '097bf36c06562f0f36115316629741c5106882d66e265890ebfffdce57bed132'
3
+ metadata.gz: 53a0fb33b59e2c3822709f7f1cd867950891ca681a44fcf283445e74bba4f083
4
+ data.tar.gz: ba8a2b7ca914db4d63364dccd98b3d6af90bf74c37d56efc1dd1d8cae26806dc
5
5
  SHA512:
6
- metadata.gz: 4c09fe3b51acae59593df39c2d984226e01608071fcf3777aa4371b2981b21b8f2f176e9d0f8a04705b624113e99bd6af3f4b596cdc54e894c699c9441567bde
7
- data.tar.gz: 39ee66eaef512340eacd536a52dcb908311d44cb1effd9b8b6f12abef51dccf665ac047232965cd0442f0a2f3085d30a7740bd587da7cc4d73c3bea47069acca
6
+ metadata.gz: 996fa8086874396b8af0b70cf8905d8ae554abec87370e873c62f60a7c287dc01f16589e556bdb0c17fd887a269cf837dbd14b7b4f062dc6a81e187c7f463e44
7
+ data.tar.gz: cbaa6ac7f1c577924d996b8ad3945fca240eb1f9e27b8c733c00393187916e35b09ee647f6448e63b7b3ea92e918020bbca9a295ba0c87d7e9f6f93bc1a0c3d8
data/.rubocop.yml ADDED
@@ -0,0 +1,48 @@
1
+ require: rubocop-rspec
2
+
3
+ Metrics/LineLength:
4
+ Max: 100
5
+ Exclude:
6
+ - 'spec/support/dox/**/*'
7
+
8
+ Documentation:
9
+ Enabled: False
10
+
11
+ FrozenStringLiteralComment:
12
+ Enabled: false
13
+
14
+ WordArray:
15
+ Enabled: False
16
+
17
+ SymbolArray:
18
+ Enabled: False
19
+
20
+ AbcSize:
21
+ Max: 20
22
+
23
+ Rails:
24
+ Enabled: true
25
+
26
+ RSpec/ExampleLength:
27
+ Max: 10
28
+
29
+ RSpec/MultipleExpectations:
30
+ Enabled: false
31
+
32
+ Style/MutableConstant:
33
+ Enabled: false
34
+
35
+ Lint/AmbiguousBlockAssociation:
36
+ Exclude:
37
+ - 'spec/**/*_spec.rb'
38
+
39
+ Metrics/BlockLength:
40
+ Exclude:
41
+ - 'spec/**/*_spec.rb'
42
+ - 'lib/tasks/*.rake'
43
+
44
+ AllCops:
45
+ Exclude:
46
+ - 'db/schema.rb'
47
+ - 'db/migrate/*.rb'
48
+ - 'config/**/*.rb'
data/README.md CHANGED
@@ -65,6 +65,12 @@ Example of the `.secrets`:
65
65
 
66
66
  To get all the policies your auth grants please use this command.
67
67
 
68
+ ### Environemtns
69
+
70
+ $ secrets list
71
+
72
+ To get the list of all current environments please use this command.
73
+
68
74
  ### storage_keys and environments
69
75
 
70
76
  Next 3 commands read and write to your project storage_key in vault. The value of the storage_key is generated by
data/exe/secrets CHANGED
@@ -68,3 +68,13 @@ command :read do |c|
68
68
  SecretsCli::Vault::Read.new(options).call
69
69
  end
70
70
  end
71
+
72
+ command :list do |c|
73
+ c.syntax = 'secrets list [options]'
74
+ c.summary = 'Use to list all environemnts'
75
+ c.option '-k', '--secrets_storage_key STRING', String, 'Override secrets_storage_key'
76
+ c.action do |_args, options|
77
+ SecretsCli::Vault::Auth.new(options).call
78
+ SecretsCli::Vault::List.new(options).call
79
+ end
80
+ end
@@ -0,0 +1,20 @@
1
+ module SecretsCli
2
+ module Vault
3
+ class List < SecretsCli::Vault::Base
4
+ def initialize(options)
5
+ super
6
+ options.default(verbose: !options.ci_mode)
7
+ SecretsCli::Check::Secrets.new(:read, options).call
8
+ @secrets_storage_key = options.secrets_storage_key || config.secrets_storage_key
9
+ end
10
+
11
+ private
12
+
13
+ attr_reader :secrets_storage_key
14
+
15
+ def command
16
+ ::Vault.logical.list(secrets_storage_key).join("\n")
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module SecretsCli
2
- VERSION = '1.8.0'
2
+ VERSION = '1.9.0'
3
3
  end
data/lib/secrets_cli.rb CHANGED
@@ -13,6 +13,7 @@ require 'secrets_cli/prompts/secrets_file'
13
13
  require 'secrets_cli/prompts/secrets_storage_key'
14
14
  require 'secrets_cli/vault/base'
15
15
  require 'secrets_cli/vault/auth'
16
+ require 'secrets_cli/vault/list'
16
17
  require 'secrets_cli/vault/read'
17
18
  require 'secrets_cli/vault/pull'
18
19
  require 'secrets_cli/vault/push'
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.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stjepan Hadjic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-04 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,6 +132,7 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
134
  - ".rspec"
135
+ - ".rubocop.yml"
135
136
  - ".travis.yml"
136
137
  - CODE_OF_CONDUCT.md
137
138
  - Gemfile
@@ -150,6 +151,7 @@ files:
150
151
  - lib/secrets_cli/prompts/secrets_storage_key.rb
151
152
  - lib/secrets_cli/vault/auth.rb
152
153
  - lib/secrets_cli/vault/base.rb
154
+ - lib/secrets_cli/vault/list.rb
153
155
  - lib/secrets_cli/vault/pull.rb
154
156
  - lib/secrets_cli/vault/push.rb
155
157
  - lib/secrets_cli/vault/read.rb