watch_list 0.1.2 → 0.1.3
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 +4 -4
- data/README.md +5 -1
- data/bin/watch_list +22 -10
- data/lib/watch_list/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d739d6fa5ff23c2e8d83257d1e2c92246556d4e
|
4
|
+
data.tar.gz: 312388c69caf67e5302a97033fa7908d94e30200
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1784535a372164fa5e20819b97d201dbb66e2d813fb3c00034b5fe969ea658fd968cec914734529ebeea20225391e685db90e45436b0e739f505de3a2c3a0e7a
|
7
|
+
data.tar.gz: 6c7141683b0ccd9d49404da4307de108c683e7202761fe75ce4d9cb182bbcee8befdf5cd1051210bd8a7b85ea541dc91d6db6ad4bdf053189c6badee3fc5770b
|
data/README.md
CHANGED
@@ -46,6 +46,8 @@ Usage: watch_list [options]
|
|
46
46
|
--split
|
47
47
|
-o, --output FILE
|
48
48
|
-s, --status
|
49
|
+
--encrypt
|
50
|
+
--decrypt
|
49
51
|
--no-color
|
50
52
|
--debug
|
51
53
|
-h, --help
|
@@ -106,6 +108,8 @@ end
|
|
106
108
|
git config watch-list.pass "**secret password**"
|
107
109
|
git config watch-list.salt "nU0+G1icf70="
|
108
110
|
# openssl rand -base64 8
|
111
|
+
|
112
|
+
watch_list --encrypt "secret value"
|
109
113
|
```
|
110
114
|
|
111
115
|
```ruby
|
@@ -117,7 +121,7 @@ monitor "http monitor" do
|
|
117
121
|
|
118
122
|
type :http do
|
119
123
|
httpusername "username"
|
120
|
-
httppassword :secure=>"
|
124
|
+
httppassword :secure=>"yI8mtdeyGrc16+wH9taw9g=="
|
121
125
|
end
|
122
126
|
end
|
123
127
|
```
|
data/bin/watch_list
CHANGED
@@ -23,16 +23,18 @@ options = {
|
|
23
23
|
|
24
24
|
ARGV.options do |opt|
|
25
25
|
begin
|
26
|
-
opt.on('',
|
27
|
-
opt.on('-a', '--apply') { mode = :apply
|
28
|
-
opt.on('-f', '--file FILE') {|v| file = v
|
29
|
-
opt.on('' , '--dry-run') { options[:dry_run] = true
|
30
|
-
opt.on('-e', '--export') { mode = :export
|
31
|
-
opt.on('' , '--split') { split = true
|
32
|
-
opt.on('-o', '--output FILE') {|v| output_file = v
|
26
|
+
opt.on('' , '--api-key API_KEY') {|v| options[:apiKey] = v }
|
27
|
+
opt.on('-a', '--apply') { mode = :apply }
|
28
|
+
opt.on('-f', '--file FILE') {|v| file = v }
|
29
|
+
opt.on('' , '--dry-run') { options[:dry_run] = true }
|
30
|
+
opt.on('-e', '--export') { mode = :export }
|
31
|
+
opt.on('' , '--split') { split = true }
|
32
|
+
opt.on('-o', '--output FILE') {|v| output_file = v }
|
33
33
|
opt.on('-s', '--status') { mode = :status }
|
34
|
-
opt.on('' , '--
|
35
|
-
opt.on('' , '--
|
34
|
+
opt.on('' , '--encrypt') { mode = :encrypt }
|
35
|
+
opt.on('' , '--decrypt') { mode = :decrypt }
|
36
|
+
opt.on('' , '--no-color') { options[:color] = false }
|
37
|
+
opt.on('' , '--debug') { options[:debug] = true }
|
36
38
|
|
37
39
|
opt.on('-h', '--help') do
|
38
40
|
puts opt.help
|
@@ -46,7 +48,9 @@ ARGV.options do |opt|
|
|
46
48
|
exit 1
|
47
49
|
end
|
48
50
|
|
49
|
-
|
51
|
+
if [:apply, :export, :status].include?(mode) and not options[:apiKey]
|
52
|
+
raise 'apiKey is required'
|
53
|
+
end
|
50
54
|
rescue => e
|
51
55
|
$stderr.puts("[ERROR] #{e.message}")
|
52
56
|
exit 1
|
@@ -111,6 +115,14 @@ begin
|
|
111
115
|
end
|
112
116
|
when :status
|
113
117
|
puts JSON.pretty_generate(client.status)
|
118
|
+
when :encrypt
|
119
|
+
puts ARGV.map {|value|
|
120
|
+
WatchList::Secure.git_encrypt(value)[:secure]
|
121
|
+
}.join(' ')
|
122
|
+
when :decrypt
|
123
|
+
puts ARGV.map {|value|
|
124
|
+
WatchList::Secure.git_decrypt(:secure => value)
|
125
|
+
}.join(' ')
|
114
126
|
end
|
115
127
|
rescue => e
|
116
128
|
if options[:debug]
|
data/lib/watch_list/version.rb
CHANGED