secret_hub 0.1.0 → 0.1.1

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: 763f15611b0f1f269e1c957d88597f7a793ae2f8e69390f8eb720d8bc1a46a20
4
- data.tar.gz: f1af0ee3550d0664d58fd6d0112968229f8a394a5425373fed73017ed1d6a802
3
+ metadata.gz: ce4f4c239e9593aa02e1236120dfbcaf2546f6fe36364aab50200cf40b2166f8
4
+ data.tar.gz: f5ebb5db5db52d32fba5c07136444beadd348f1be4e9dd43af44682881bc1007
5
5
  SHA512:
6
- metadata.gz: 21860a561122f6c9d168b653bbbc705e0f8df4722f4bfdb79f12f36475d4f458731ef3e4367b0cdb92dd938be5ef62b16a64aff84449c8b0fc11051954a7c2ae
7
- data.tar.gz: 1d46836c5db99f1793cf1cc9461ca1c0716761b78e1a77b4cfb585a488d162445de54f1d5ea1528511da928c258f149fc183179ef2332851c9ef8108b8fe3cc8
6
+ metadata.gz: 5492dca43f4c9eab988e47e0a06889ca5541113bd3ad3551a5c0adb68231c0647bf600d858e135c515e8ade1925115e65578497463cbea60c00fc47e01cc1bf9
7
+ data.tar.gz: bef918bb30a0eaf1e6ddd0774652c4b9a8355b88a91bf084bb18702fc4c88bf11812e33000a4a83577641718e324587792a54dfe4bcdf92e69418f48add0bb0a
@@ -38,6 +38,15 @@ module SecretHub
38
38
  say "!txtgrn!Saved #{config_file}"
39
39
  end
40
40
 
41
+ def list_command
42
+ config.each do |repo, keys|
43
+ say "!txtblu!#{repo}:"
44
+ github.secrets(repo).each do |secret|
45
+ say "- !txtpur!#{secret}"
46
+ end
47
+ end
48
+ end
49
+
41
50
  def save_command
42
51
  clean = args['--clean']
43
52
 
@@ -55,15 +64,6 @@ module SecretHub
55
64
  end
56
65
  end
57
66
 
58
- def list_command
59
- config.each do |repo, keys|
60
- say "!txtblu!#{repo}"
61
- github.secrets(repo).each do |secret|
62
- say "!txtpur!#{secret}"
63
- end
64
- end
65
- end
66
-
67
67
  private
68
68
 
69
69
  def clean_repo(repo, keys)
@@ -96,10 +96,7 @@ module SecretHub
96
96
  def config
97
97
  raise ConfigurationError, "Config file not found #{config_flie}" unless File.exist? config_file
98
98
  result = YAML.load_file config_file
99
- result.each do |key, value|
100
- raise ConfigurationError, "Invalid repo #{key}" unless key.include? '/'
101
- raise ConfigurationError, "Invalid keys for #{key} - must be an array" unless value.is_a? Array
102
- end
99
+ result.transform_values { |v| v || [] }
103
100
  end
104
101
  end
105
102
  end
@@ -12,9 +12,9 @@ module SecretHub
12
12
 
13
13
  def run
14
14
  repo = args['REPO']
15
- say "!txtblu!#{repo}"
15
+ say "!txtblu!#{repo}:"
16
16
  github.secrets(repo).each do |secret|
17
- say "!txtpur!#{secret}"
17
+ say "- !txtpur!#{secret}"
18
18
  end
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module SecretHub
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.0
4
+ version: 0.1.1
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-14 00:00:00.000000000 Z
11
+ date: 2020-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mister_bin