opswalrus 1.0.112 → 1.0.113
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/opswalrus/app.rb +13 -5
- data/lib/opswalrus/cli.rb +3 -0
- data/lib/opswalrus/patches.rb +5 -0
- data/lib/opswalrus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edb7b34aeba140582fc1c10c2944ff6495a3fd1172d0dfc90fb1db20c0142782
|
4
|
+
data.tar.gz: b5243fffab6e5c826ccbda730e4cc8d5c927d4ee8c43b1deae8ff3b21547d215
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d4ed0069f951c872bedbd2a69e631389ca8cf3d9710023aab46f47c03dfce3f77c5da53f022316088990ebf1c05c882a963b097c63986a884f064f12770f716
|
7
|
+
data.tar.gz: 5b50dcd941da41c3584cb57d445b1cae5598ea3be6e7ceaee4a0db9984d7f7b3eef26f5605c9d2e4c1ddaa4aecf76ea633a4ffc65447318e940606b8096b7829
|
data/Gemfile.lock
CHANGED
data/lib/opswalrus/app.rb
CHANGED
@@ -59,7 +59,7 @@ module OpsWalrus
|
|
59
59
|
@pwd = pwd.to_pathname
|
60
60
|
@bundler = Bundler.new(self, @pwd)
|
61
61
|
@local_hostname = "localhost"
|
62
|
-
@
|
62
|
+
@mode = nil
|
63
63
|
@dry_run = false
|
64
64
|
@zip_mutex = Thread::Mutex.new
|
65
65
|
end
|
@@ -73,11 +73,19 @@ module OpsWalrus
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def script_mode!
|
76
|
-
@
|
76
|
+
@mode = :script
|
77
|
+
end
|
78
|
+
|
79
|
+
def pretty_print_mode!
|
80
|
+
@mode = :pretty
|
77
81
|
end
|
78
82
|
|
79
83
|
def script_mode?
|
80
|
-
@
|
84
|
+
@mode == :script
|
85
|
+
end
|
86
|
+
|
87
|
+
def pretty_print_mode?
|
88
|
+
@mode == :pretty
|
81
89
|
end
|
82
90
|
|
83
91
|
def dry_run?
|
@@ -321,10 +329,10 @@ module OpsWalrus
|
|
321
329
|
end
|
322
330
|
|
323
331
|
def print_script_result(result)
|
324
|
-
if script_mode?
|
332
|
+
if script_mode? || pretty_print_mode?
|
325
333
|
SemanticLogger.flush
|
326
334
|
output = StringIO.open do |io|
|
327
|
-
io.puts
|
335
|
+
io.puts(SCRIPT_RESULT_HEADER) if script_mode?
|
328
336
|
obj = case result
|
329
337
|
when Invocation::Success
|
330
338
|
result.value
|
data/lib/opswalrus/cli.rb
CHANGED
@@ -225,6 +225,7 @@ module OpsWalrus
|
|
225
225
|
c.switch [:b, :bundle], desc: "Update bundle prior to running the specified operation"
|
226
226
|
c.switch :pass, desc: "Prompt for a sudo password"
|
227
227
|
c.switch :script, desc: "Script mode"
|
228
|
+
c.switch :pretty, desc: "Pretty print mode"
|
228
229
|
c.switch [:r, :remote], desc: "Run the operation on the remote hosts"
|
229
230
|
|
230
231
|
c.flag [:u, :user], desc: "Specify the user that the operation will run as"
|
@@ -262,6 +263,8 @@ module OpsWalrus
|
|
262
263
|
|
263
264
|
if options[:script]
|
264
265
|
$app.script_mode!
|
266
|
+
elsif options[:pretty]
|
267
|
+
$app.pretty_print_mode!
|
265
268
|
end
|
266
269
|
|
267
270
|
exit_status = if options[:remote]
|
data/lib/opswalrus/patches.rb
CHANGED
data/lib/opswalrus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opswalrus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.113
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Ellis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|