raykit 0.0.287 → 0.0.288
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 +24 -0
- data/lib/raykit/environment.rb +3 -0
- data/lib/raykit/logevent.rb +33 -0
- data/lib/raykit/vstest.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca39389db5e0297bed811fe9d54bf3425dbf75efaa90035a4b2d8b96960b4c58
|
4
|
+
data.tar.gz: a7baabecf86d29b0cced7f7e6a06a0460640d9a58445788e637750eb755b7c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3662fe9339f3398f23e5889d8ec8921cba8ebd3c437cc87805b0130c99cc78ee0dd61fff45e16d6bf2f47f88602b00d3c48f8eb1f597eb332438c9fb356d98c0
|
7
|
+
data.tar.gz: 5856978c20d77863834991ed75e7a4648d85c77b90000856d867707ef353c55baa4d60cbbe604b87ac6429ba25b0ae404bdafb2766883c563ca86a1b538ccf71
|
data/lib/raykit/command.rb
CHANGED
@@ -82,7 +82,31 @@ module Raykit
|
|
82
82
|
log
|
83
83
|
end
|
84
84
|
|
85
|
+
#@timeout=0
|
86
|
+
#@directory = Dir.pwd
|
87
|
+
#@output = ''
|
88
|
+
#@error = ''
|
89
|
+
#@exitstatus = 0
|
90
|
+
|
85
91
|
def log
|
92
|
+
# --- Rolling File JSON -----
|
93
|
+
log = Logger.new("#{Raykit::Environment::log_dir}/Raykit.Commands.txt",'daily')
|
94
|
+
log.formatter = proc do |severity,datetime,progname,msg|
|
95
|
+
"#{msg}\n"
|
96
|
+
end
|
97
|
+
secrets=Secrets.new()
|
98
|
+
msg =secrets.hide(@command)#"?"# self.summary(false)
|
99
|
+
level="Verbose"
|
100
|
+
level="Warning" if @exitstatus != 0
|
101
|
+
event = Raykit::LogEvent.new(level,msg,{
|
102
|
+
"Timeout"=>@timeout,
|
103
|
+
"Directory"=>@directory,
|
104
|
+
"Output"=>@output,
|
105
|
+
"Error"=>@error,
|
106
|
+
"ExitStatus"=>@exitstatus,
|
107
|
+
"Elapsed"=>elapsed_str})
|
108
|
+
log.info event.to_json
|
109
|
+
# ---------------------------
|
86
110
|
begin
|
87
111
|
json=JSON.generate(to_hash)
|
88
112
|
log_filename = Environment.get_dev_dir('log') + '/Raykit.Command/' + SecureRandom.uuid + '.json'
|
data/lib/raykit/environment.rb
CHANGED
@@ -25,6 +25,9 @@ module Raykit
|
|
25
25
|
normalize_path(ENV['HOME'])
|
26
26
|
end
|
27
27
|
|
28
|
+
def self.log_dir
|
29
|
+
return get_dev_dir('log')
|
30
|
+
end
|
28
31
|
# Get, and create if it does not exist, a specific development directory
|
29
32
|
def self.get_dev_dir(name)
|
30
33
|
dir = Pathname.new("#{Environment::root_dir}/#{name}")
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'json'
|
2
|
+
module Raykit
|
3
|
+
# :verbose, :debug, :information, :error, :fatal
|
4
|
+
class LogEvent < Hash
|
5
|
+
def initialize(level,messageTemplate,properties)
|
6
|
+
self["Timestamp"] = DateTime.now.iso8601
|
7
|
+
self["Level"] = level
|
8
|
+
self["Message"] = messageTemplate
|
9
|
+
self["MessageTemplate"] = messageTemplate
|
10
|
+
properties["SourceContext"] = "Raykit" if !properties.has_key?('SourceContext')
|
11
|
+
properties["MachineName"] = Raykit::Environment::machine if !properties.has_key?('MachineName')
|
12
|
+
properties["UserName"] = Raykit::Environment::user if !properties.has_key?('UserName')
|
13
|
+
self["Properties"] = properties
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
#{
|
20
|
+
# "Timestamp": "2021-10-06T06:09:25.5275817-06:00",
|
21
|
+
# "Level": "Information",
|
22
|
+
# "MessageTemplate": "MachineName {machine}",
|
23
|
+
# "Properties": {
|
24
|
+
# "machine": "BLUEFIN",
|
25
|
+
# "SourceContext": "cslogging.Program",
|
26
|
+
# "ThreadId": 1,
|
27
|
+
# "ProcessId": 16764,
|
28
|
+
# "ProcessName": "cs-logging",
|
29
|
+
# "MachineName": "\"BLUEFIN\"",
|
30
|
+
# "UserName": "\"loupa\"",
|
31
|
+
# "OS": "Windows_NT"
|
32
|
+
# }
|
33
|
+
#}
|
data/lib/raykit/vstest.rb
CHANGED
@@ -2,6 +2,7 @@ module Raykit
|
|
2
2
|
class VsTest
|
3
3
|
def self.vstest_path
|
4
4
|
['2019/Community/Common7/IDE/CommonExtensions/Microsoft',
|
5
|
+
'2019/Professional/Common7/IDE/CommonExtensions/Microsoft/TestPlatform',
|
5
6
|
'2019/Community/Common7/IDE/Extensions',
|
6
7
|
'2019\Community\Common7\IDE\Extensions\TestPlatform',
|
7
8
|
'2022/Preview/Common7/IDE/Extensions/TestPlatform'].each{|relative_path|
|
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.288
|
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-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- lib/raykit/git/repositories.rb
|
89
89
|
- lib/raykit/git/repository.rb
|
90
90
|
- lib/raykit/log.rb
|
91
|
+
- lib/raykit/logevent.rb
|
91
92
|
- lib/raykit/logging.rb
|
92
93
|
- lib/raykit/msbuild.rb
|
93
94
|
- lib/raykit/nugetpackage.rb
|