marshmallow 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +36 -36
- data/lib/marshmallow.rb +31 -28
- data/lib/marshmallow/version.rb +1 -1
- data/marshmallow-0.1.3.gem +0 -0
- data/marshmallow.gemspec +1 -1
- metadata +17 -17
- data/marshmallow-0.1.2.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0933879f9a785b1d48db4fd6c9f32bfc78d6c573'
|
4
|
+
data.tar.gz: d88b1eabfee5ca7c998c7a836857efc4b4bc0b60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ee48bd07c21157ad6b22531a3e8300a1c8b5a4081d9193a27d8962bda488ec9e5b0e51d1c313a5a5f5347487ce4b9b44ced24baa22e78df9485ba9dba4a1b03
|
7
|
+
data.tar.gz: c07ee7124d667382ac238c2722de873d7b76f6e92c616d87bc95754ff5b6174578f58f8daddbc90caa9e5a3556a2f1c023d52e7ff7a00390e77129effdccdf5e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.2.0 (5.20.2019)
|
2
|
+
- fixed issues with the return vaules for memory, smc, and uuid
|
3
|
+
- provided better error messages if no vaules existed in ard info fields
|
4
|
+
|
1
5
|
## 0.1.3 (2.8.2017)
|
2
6
|
- added options for: profiles_installed, profiles_all, domain_check, firewall_check, fastuserswitch_check, loginwindow_check, user_launchagents, userlaunchdaemons, and options
|
3
7
|
- fixed code for ardinfo's to use 'CFPropertyList'
|
data/README.md
CHANGED
@@ -10,42 +10,42 @@ To see a list of availible options for Marshmallow, require 'Marshmallow' in fil
|
|
10
10
|
|
11
11
|
output should be similar to this:
|
12
12
|
***
|
13
|
-
apps_installed
|
14
|
-
ard_info1
|
15
|
-
ard_info2
|
16
|
-
ard_info3
|
17
|
-
ard_info4
|
18
|
-
boot_rom
|
19
|
-
boot_volume
|
20
|
-
build
|
21
|
-
computer_name
|
22
|
-
cores
|
23
|
-
domain_check
|
24
|
-
fastuserswitch_check
|
25
|
-
firewall_check
|
26
|
-
free_space
|
27
|
-
graphics
|
28
|
-
hd_size
|
29
|
-
listoflocaladmins
|
30
|
-
loginwindow_check
|
31
|
-
memory
|
32
|
-
model
|
33
|
-
model_id
|
34
|
-
options
|
35
|
-
os_version
|
36
|
-
processor_name
|
37
|
-
processor_number
|
38
|
-
processor_speed
|
39
|
-
profiles_all
|
40
|
-
profiles_installed
|
41
|
-
serial
|
42
|
-
smc
|
43
|
-
system_launchagents
|
44
|
-
system_launchdaemons
|
45
|
-
user_launchagents
|
46
|
-
user_launchdaemons
|
47
|
-
users
|
48
|
-
uuid
|
13
|
+
- apps_installed
|
14
|
+
- ard_info1
|
15
|
+
- ard_info2
|
16
|
+
- ard_info3
|
17
|
+
- ard_info4
|
18
|
+
- boot_rom
|
19
|
+
- boot_volume
|
20
|
+
- build
|
21
|
+
- computer_name
|
22
|
+
- cores
|
23
|
+
- domain_check
|
24
|
+
- fastuserswitch_check
|
25
|
+
- firewall_check
|
26
|
+
- free_space
|
27
|
+
- graphics
|
28
|
+
- hd_size
|
29
|
+
- listoflocaladmins
|
30
|
+
- loginwindow_check
|
31
|
+
- memory
|
32
|
+
- model
|
33
|
+
- model_id
|
34
|
+
- options
|
35
|
+
- os_version
|
36
|
+
- processor_name
|
37
|
+
- processor_number
|
38
|
+
- processor_speed
|
39
|
+
- profiles_all
|
40
|
+
- profiles_installed
|
41
|
+
- serial
|
42
|
+
- smc
|
43
|
+
- system_launchagents
|
44
|
+
- system_launchdaemons
|
45
|
+
- user_launchagents
|
46
|
+
- user_launchdaemons
|
47
|
+
- users
|
48
|
+
- uuid
|
49
49
|
|
50
50
|
## Examples:
|
51
51
|
|
data/lib/marshmallow.rb
CHANGED
@@ -83,8 +83,9 @@ module Marshmallow
|
|
83
83
|
|
84
84
|
def self.memory
|
85
85
|
memory = `system_profiler SPHardwareDataType`.split("\n")
|
86
|
-
|
87
|
-
|
86
|
+
memory = memory.grep(/Memory:/).join(":").strip.split(":")
|
87
|
+
memory = memory[1].strip
|
88
|
+
return memory
|
88
89
|
end
|
89
90
|
|
90
91
|
def self.boot_rom
|
@@ -95,16 +96,18 @@ module Marshmallow
|
|
95
96
|
|
96
97
|
def self.smc
|
97
98
|
smc = `system_profiler SPHardwareDataType`.split("\n")
|
98
|
-
|
99
|
-
|
99
|
+
smc = smc.grep(/SMC/).join(":").strip.split(":")
|
100
|
+
smc = smc[1].strip
|
101
|
+
return smc
|
100
102
|
end
|
101
103
|
|
102
104
|
def self.uuid
|
103
105
|
uuid = `system_profiler SPHardwareDataType`.split("\n")
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
106
|
+
results = uuid.grep(/UUID:/).join(":").strip.split(":")
|
107
|
+
results = results[1].strip
|
108
|
+
return results
|
109
|
+
end
|
110
|
+
|
108
111
|
def self.graphics
|
109
112
|
graphics = `system_profiler SPDisplaysDataType`.split("\n")
|
110
113
|
graphics = graphics[2].split(":")
|
@@ -198,41 +201,41 @@ module Marshmallow
|
|
198
201
|
def self.ard_info1
|
199
202
|
plist = CFPropertyList::List.new(:file => "/Library/Preferences/com.apple.RemoteDesktop.plist")
|
200
203
|
results = CFPropertyList.native_types(plist.value)
|
201
|
-
if results
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
204
|
+
if results.key?('Text1')
|
205
|
+
return results['Text1']
|
206
|
+
else
|
207
|
+
return "Error: plist does not contain key for 'Text1'"
|
208
|
+
end
|
206
209
|
end
|
207
210
|
|
208
211
|
def self.ard_info2
|
209
212
|
plist = CFPropertyList::List.new(:file => "/Library/Preferences/com.apple.RemoteDesktop.plist")
|
210
213
|
results = CFPropertyList.native_types(plist.value)
|
211
|
-
if results
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
214
|
+
if results.key?('Text2')
|
215
|
+
return results['Text2']
|
216
|
+
else
|
217
|
+
return "Error: plist does not contain key for 'Text2'"
|
218
|
+
end
|
216
219
|
end
|
217
220
|
|
218
221
|
def self.ard_info3
|
219
222
|
plist = CFPropertyList::List.new(:file => "/Library/Preferences/com.apple.RemoteDesktop.plist")
|
220
223
|
results = CFPropertyList.native_types(plist.value)
|
221
|
-
if results
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
224
|
+
if results.key?('Text3')
|
225
|
+
return results['Text3']
|
226
|
+
else
|
227
|
+
return "Error: plist does not contain key for 'Text3'"
|
228
|
+
end
|
226
229
|
end
|
227
230
|
|
228
231
|
def self.ard_info4
|
229
232
|
plist = CFPropertyList::List.new(:file => "/Library/Preferences/com.apple.RemoteDesktop.plist")
|
230
233
|
results = CFPropertyList.native_types(plist.value)
|
231
|
-
if results
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
234
|
+
if results.key?('Text4')
|
235
|
+
return results['Text4']
|
236
|
+
else
|
237
|
+
return "Error: plist does not contain key for 'Text4'"
|
238
|
+
end
|
236
239
|
end
|
237
240
|
|
238
241
|
def self.profiles_installed
|
data/lib/marshmallow/version.rb
CHANGED
Binary file
|
data/marshmallow.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "marshmallow"
|
8
8
|
spec.version = Marshmallow::VERSION
|
9
9
|
spec.authors = ["Nic Scott"]
|
10
|
-
spec.email = ["
|
10
|
+
spec.email = ["nls.inbox@gmail.com"]
|
11
11
|
spec.summary = %q{A collection of macOS facts and useful information for MacAdmins}
|
12
12
|
spec.homepage = "https://github.com/nlscott/marshmallow"
|
13
13
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,80 +1,80 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marshmallow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
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: 2019-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.13'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.13'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '5.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: CFPropertyList
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 2.0.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.0.0
|
69
69
|
description:
|
70
70
|
email:
|
71
|
-
-
|
71
|
+
- nls.inbox@gmail.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
77
|
-
- .travis.yml
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
78
78
|
- CHANGELOG.md
|
79
79
|
- Gemfile
|
80
80
|
- LICENSE.txt
|
@@ -84,7 +84,7 @@ files:
|
|
84
84
|
- bin/setup
|
85
85
|
- lib/marshmallow.rb
|
86
86
|
- lib/marshmallow/version.rb
|
87
|
-
- marshmallow-0.1.
|
87
|
+
- marshmallow-0.1.3.gem
|
88
88
|
- marshmallow.gemspec
|
89
89
|
homepage: https://github.com/nlscott/marshmallow
|
90
90
|
licenses:
|
@@ -96,17 +96,17 @@ require_paths:
|
|
96
96
|
- lib
|
97
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
|
-
- -
|
104
|
+
- - ">="
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.5.2.3
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: A collection of macOS facts and useful information for MacAdmins
|
data/marshmallow-0.1.2.gem
DELETED
Binary file
|