raykit 0.0.298 → 0.0.302
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/lib/raykit/command.rb +11 -5
- data/lib/raykit/project.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: 1e31c9155319544ec3235de4545a56cb22d31fdaa4bd7dd29ce886b5aa9abba4
|
4
|
+
data.tar.gz: 72c06e1332d3b1c261a0668a76b2d6708da83352f77872b69ddb1d4f007c75d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adb8ce5adeeea98305c56a232983a503a9ba2a1a0e8e473a48b4b2a8598b75cf9989d5a86a33242a2f139ffaa41dcb22f053f7b94b5d40bd1d64a7d0713c1b6c
|
7
|
+
data.tar.gz: abefe06850b65f1968e4f5023747b3cd807c68644f8e21df2aaa4ae1122048352dc348cec6454f71a7d38faba41b5c55257ff31675ebaf38f2b997a74e4746ab
|
data/lib/raykit/command.rb
CHANGED
@@ -34,7 +34,7 @@ module Raykit
|
|
34
34
|
@logging_enabled = true
|
35
35
|
end
|
36
36
|
|
37
|
-
def initialize(command,timeout=0,success_log_level=
|
37
|
+
def initialize(command,timeout=0,success_log_level=Logger::DEBUG,logging_enabled=true)
|
38
38
|
@@commands=Array.new
|
39
39
|
init_defaults
|
40
40
|
@success_log_level=success_log_level
|
@@ -92,9 +92,10 @@ module Raykit
|
|
92
92
|
else
|
93
93
|
if !@success_log_level.nil?
|
94
94
|
e = to_log_event
|
95
|
-
e
|
96
|
-
e
|
97
|
-
e
|
95
|
+
e["Level"] = "Verbose" if @success_log_level == "Verbose"
|
96
|
+
e["Level"]= "Debug" if @success_log_level == Logger::DEBUG
|
97
|
+
e["Level"] = "Information" if @success_log_level == Logger::INFO
|
98
|
+
e["Level"] = "Warning" if @elapsed > 60*2
|
98
99
|
e.to_seq
|
99
100
|
end
|
100
101
|
end
|
@@ -106,6 +107,10 @@ module Raykit
|
|
106
107
|
msg =secrets.hide(@command)
|
107
108
|
level="Verbose"
|
108
109
|
level="Warning" if @exitstatus != 0
|
110
|
+
output=@output
|
111
|
+
error=@error
|
112
|
+
output = @output.last(1000) if(@output.length > 1200)
|
113
|
+
error = @error.last(1000) if(@output.length > 1200)
|
109
114
|
Raykit::LogEvent.new(level,msg,{
|
110
115
|
"SourceContext"=>"Raykit::Command",
|
111
116
|
"Category"=>"Command",
|
@@ -114,7 +119,8 @@ module Raykit
|
|
114
119
|
"Output"=>@output,
|
115
120
|
"Error"=>@error,
|
116
121
|
"ExitStatus"=>@exitstatus,
|
117
|
-
"Elapsed"=>elapsed_str
|
122
|
+
"Elapsed"=>elapsed_str,
|
123
|
+
"ElapsedSeconds"=>@elapsed
|
118
124
|
})
|
119
125
|
end
|
120
126
|
|
data/lib/raykit/project.rb
CHANGED
@@ -282,7 +282,7 @@ module Raykit
|
|
282
282
|
self
|
283
283
|
end
|
284
284
|
|
285
|
-
def run(command,quit_on_failure=true,success_log_level=
|
285
|
+
def run(command,quit_on_failure=true,success_log_level=Logger::DEBUG)
|
286
286
|
if(command.kind_of?(Array))
|
287
287
|
command.each{|subcommand| run(subcommand,quit_on_failure,success_log_level)}
|
288
288
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raykit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.302
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|