macos-artifacts 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/macos/artifacts/apps.rb +18 -17
- data/lib/macos/artifacts/state.rb +30 -19
- data/lib/macos/artifacts/version.rb +1 -1
- data/lib/macos/artifacts.rb +1 -0
- 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: ff8a46c9c151ddb085fd4c578d90e16aa922722d61728b7803934ef04617184f
|
4
|
+
data.tar.gz: 8ef9df8d3ca88f39c04988d856ae3d9d08cc870999d8b3058a055bec482c48bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09b71859a27f25c9db18c8ace5fcc00bfbae9023a4be65b632e8b3d3a341c4136a26c5c2eb6b445bf10e7727da52031f836af66c315bd29acce70dc697db9718'
|
7
|
+
data.tar.gz: 56786359ec1eca917904786f9171b481f2d5982252542b699dab1068841a9a9f00ff6a8db8db0f334a805cdc5d1613722e0b13c3f8816e1261616e66faee6e96
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
3
|
|
4
|
+
|
5
|
+
---
|
6
|
+
## version 0.6.3
|
7
|
+
- Update: minor syntax change for System Extensions
|
8
|
+
- Fixed: error with Apps::InstallHistory US-ASCII error
|
9
|
+
|
10
|
+
|
4
11
|
---
|
5
12
|
## version 0.6.2
|
6
13
|
- Fixed: workaround for listing files in user directory where listing items in the .Trash resulted in an error
|
data/README.md
CHANGED
data/lib/macos/artifacts/apps.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'json'
|
3
|
+
require 'date'
|
2
4
|
|
3
5
|
module Macos
|
4
6
|
module Artifacts
|
@@ -51,23 +53,22 @@ module Macos
|
|
51
53
|
end
|
52
54
|
|
53
55
|
def self.installHistory
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
end
|
56
|
+
time = DateTime.now
|
57
|
+
installs = `system_profiler -json SPInstallHistoryDataType`.strip
|
58
|
+
data = JSON.parse(installs)
|
59
|
+
|
60
|
+
puts "Software Install History:"
|
61
|
+
data["SPInstallHistoryDataType"].each do |item|
|
62
|
+
date = item["install_date"]
|
63
|
+
parsed_date = DateTime.parse(date)
|
64
|
+
installsDays = (time - parsed_date).to_i
|
65
|
+
|
66
|
+
puts " Name: #{item["_name"]}"
|
67
|
+
puts " Install Days: #{installsDays}"
|
68
|
+
puts " Install Date: #{item["install_date"]}"
|
69
|
+
puts " Version: #{item["install_version"]}"
|
70
|
+
puts " Install Source: #{item["package_source"]}"
|
71
|
+
puts ""
|
71
72
|
end
|
72
73
|
end
|
73
74
|
|
@@ -36,55 +36,66 @@ module Macos
|
|
36
36
|
|
37
37
|
puts "System Extensions:"
|
38
38
|
sysext.each do |line|
|
39
|
-
|
39
|
+
|
40
40
|
if line.start_with?('---')
|
41
41
|
line = line.split(" ")
|
42
|
-
|
42
|
+
$extType = line[1]
|
43
43
|
elsif !line.start_with?("enabled")
|
44
44
|
line = line.split(" ")
|
45
45
|
if line[0] = "*"
|
46
|
-
|
46
|
+
extEnabled = "true"
|
47
47
|
else
|
48
|
-
|
48
|
+
extEnabled = "false"
|
49
49
|
end
|
50
50
|
if line[1] = "*"
|
51
|
-
|
51
|
+
extActive = "true"
|
52
52
|
else
|
53
|
-
|
53
|
+
extActive = "false"
|
54
54
|
end
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
teamID = line[2]
|
56
|
+
bunldeID = line[3]
|
57
|
+
versionExt = line[4]
|
58
|
+
|
59
59
|
if line[5] != "[activated"
|
60
60
|
if line[6] != "[activated"
|
61
61
|
if line[7] != "[activated"
|
62
62
|
if line[8] != "[activated"
|
63
|
-
|
63
|
+
nameExt = "#{line[5]} #{line[6]} #{line[7]} #{line[8]}"
|
64
64
|
else
|
65
|
-
|
65
|
+
nameExt = "#{line[5]} #{line[6]} #{line[7]}"
|
66
66
|
end
|
67
67
|
end
|
68
68
|
else
|
69
|
-
|
69
|
+
nameExt = "#{line[5]}"
|
70
70
|
end
|
71
71
|
else
|
72
|
-
|
72
|
+
nameExt = "#{line[5]}"
|
73
73
|
end
|
74
74
|
|
75
75
|
if line[6] == "[activated"
|
76
|
-
|
76
|
+
stateExt = "#{line[6]} #{line[7]}"
|
77
77
|
elsif line[7] == "[activated"
|
78
|
-
|
78
|
+
stateExt = "#{line[7]} #{line[8]}"
|
79
79
|
elsif line[8] == "[activated"
|
80
|
-
|
80
|
+
stateExt = "#{line[8]} #{line[9]}"
|
81
81
|
elsif line[9] == "[activated"
|
82
|
-
|
82
|
+
stateExt = "#{line[9]} #{line[10]}"
|
83
83
|
else
|
84
|
-
|
84
|
+
stateExt = "#{line[6]} #{line[7]}"
|
85
85
|
end
|
86
|
+
puts " Type: #{$extType}"
|
87
|
+
puts " Enabled: #{extEnabled}"
|
88
|
+
puts " Active: #{extActive}"
|
89
|
+
puts " Team ID: #{teamID}"
|
90
|
+
puts " Bundle ID: #{bunldeID}"
|
91
|
+
puts " Version: #{versionExt}"
|
92
|
+
puts " Name: #{nameExt}"
|
93
|
+
puts " State: #{stateExt}"
|
86
94
|
end
|
95
|
+
|
87
96
|
end
|
97
|
+
|
98
|
+
|
88
99
|
end
|
89
100
|
|
90
101
|
def self.processCPU
|
data/lib/macos/artifacts.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macos-artifacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nic scott
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|