secret_hub 0.1.4 → 0.1.5

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: ba608183188fcc510b16eebb1b02a0a426c69e638f52656c64335ec467ea5042
4
- data.tar.gz: 78788d64bdbe84fa632fd2d0fd675622b01fd953ccc1c8c3f2787d4106c2a112
3
+ metadata.gz: e6826ae6ff439ea52282709e85763ce621e16df21a06717cb4dc02ac3c8fde10
4
+ data.tar.gz: 042eddba704dabdf25795ff759cc0143801b94c2e4d24d0f0a3b189786aa8ee0
5
5
  SHA512:
6
- metadata.gz: fae95b5ab77f112281debf4a46194aad8aad1fedfd71bcd78c64913a2d8a98b695099a6aceb8b83c3a7096896d3e9487a687cb910c6b3be1a72016cc6127efd4
7
- data.tar.gz: 44f948f6467d1d6207204d63bd898603dba654ed298c9af3e2fe91531d844e27b086715158b43fc084efea5f8f11052685a6ef4ba1a6c54dba5b94bbdd9de405
6
+ metadata.gz: d65734ce86a9dad8fb55e77227e30a19ec4159d6e6084769b1d55a7bdc0d3833fac3ef9d693c14e87c9e17f7035e9256461c9593526fb49e55c5394bc13bd055
7
+ data.tar.gz: 2147da79c5da7844ffa8ff9e77231fe37a0dccc501db14bb390c235fcaf7857183ad9daf63012c4ed31d2ae0b75f547d2602ff0fec400a554d99f5dc5f102f1f
data/README.md CHANGED
@@ -160,7 +160,7 @@ $ secrethub bulk list mysecrets.yml
160
160
  ### Save multiple secrets to multiple repositories
161
161
 
162
162
  ```shell
163
- # secrethub bulk save [CONFIG --clean]
163
+ # secrethub bulk save [CONFIG --clean --dry --only REPO]
164
164
  $ secrethub bulk save mysecrets.yml --clean
165
165
  ```
166
166
 
@@ -11,7 +11,7 @@ module SecretHub
11
11
  usage "secrethub bulk init [CONFIG]"
12
12
  usage "secrethub bulk show [CONFIG --visible]"
13
13
  usage "secrethub bulk list [CONFIG]"
14
- usage "secrethub bulk save [CONFIG --clean --dry]"
14
+ usage "secrethub bulk save [CONFIG --clean --dry --only REPO]"
15
15
  usage "secrethub bulk clean [CONFIG --dry]"
16
16
  usage "secrethub bulk (-h|--help)"
17
17
 
@@ -24,6 +24,7 @@ module SecretHub
24
24
  option "-c, --clean", "Also delete any other secret not defined in the configuration file"
25
25
  option "-v, --visible", "Also show secret values"
26
26
  option "-d, --dry", "Dry run"
27
+ option "-o, --only REPO", "Save all secrets to a single repository from the configuration file"
27
28
 
28
29
  param "CONFIG", "Path to the configuration file [default: secrethub.yml]"
29
30
 
@@ -33,6 +34,7 @@ module SecretHub
33
34
  example "secrethub bulk list mysecrets.yml"
34
35
  example "secrethub bulk save mysecrets.yml --dry"
35
36
  example "secrethub bulk save --clean"
37
+ example "secrethub bulk save --only me/my-important-repo"
36
38
 
37
39
  def init_command
38
40
  raise SecretHubError, "File #{config_file} already exists" if File.exist? config_file
@@ -60,9 +62,11 @@ module SecretHub
60
62
 
61
63
  def save_command
62
64
  dry = args['--dry']
65
+ only = args['--only']
63
66
  skipped = 0
64
67
 
65
68
  config.each do |repo, secrets|
69
+ next if only and repo != only
66
70
  say "!txtblu!#{repo}"
67
71
  skipped += update_repo repo, secrets, dry
68
72
  clean_repo repo, secrets.keys, dry if args['--clean']
@@ -1,3 +1,3 @@
1
1
  module SecretHub
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secret_hub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-15 00:00:00.000000000 Z
11
+ date: 2020-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mister_bin