rdp-ruby-wmi 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +44 -0
- data/Manifest.txt +14 -0
- data/README.txt +66 -0
- data/Rakefile +17 -0
- data/VERSION +1 -0
- data/lib/ruby-wmi.rb +6 -0
- data/lib/ruby-wmi/base.rb +213 -0
- data/lib/ruby-wmi/constants.rb +94 -0
- data/lib/ruby-wmi/core_ext.rb +1 -0
- data/lib/ruby-wmi/core_ext/time_ext.rb +9 -0
- data/lib/ruby-wmi/core_ext/win32ole_ext.rb +11 -0
- data/samples/disk.rb +9 -0
- data/samples/disk2.rb +5 -0
- data/samples/logoff.rb +8 -0
- data/samples/memory.rb +11 -0
- data/test/test_ruby-wmi.rb +2 -0
- data/web/public/css/active4d.css +114 -0
- data/web/public/css/all_hallows_eve.css +72 -0
- data/web/public/css/amy.css +147 -0
- data/web/public/css/blackboard.css +88 -0
- data/web/public/css/brilliance_black.css +605 -0
- data/web/public/css/brilliance_dull.css +599 -0
- data/web/public/css/cobalt.css +149 -0
- data/web/public/css/dawn.css +121 -0
- data/web/public/css/eiffel.css +121 -0
- data/web/public/css/espresso_libre.css +109 -0
- data/web/public/css/idle.css +62 -0
- data/web/public/css/iplastic.css +80 -0
- data/web/public/css/lazy.css +73 -0
- data/web/public/css/mac_classic.css +123 -0
- data/web/public/css/magicwb_amiga.css +104 -0
- data/web/public/css/pastels_on_dark.css +188 -0
- data/web/public/css/rspec.css +118 -0
- data/web/public/css/slush_poppies.css +85 -0
- data/web/public/css/spacecadet.css +51 -0
- data/web/public/css/sunburst.css +180 -0
- data/web/public/css/toader.css +285 -0
- data/web/public/css/twilight.css +137 -0
- data/web/public/css/zenburnesque.css +91 -0
- data/web/public/images/bg.gif +0 -0
- data/web/public/images/bullet.gif +0 -0
- data/web/public/images/footer_pic.gif +0 -0
- data/web/public/images/green_vr.gif +0 -0
- data/web/public/images/hr.gif +0 -0
- data/web/public/images/main.gif +0 -0
- data/web/public/images/nav_over.gif +0 -0
- data/web/public/images/nav_over_left.gif +0 -0
- data/web/public/images/nav_over_right.gif +0 -0
- data/web/public/images/nav_under.gif +0 -0
- data/web/public/images/your-face.gif +0 -0
- data/web/public/images/your-picture.gif +0 -0
- data/web/templates/index.html.erb +76 -0
- data/web/templates/template-1109.zip +0 -0
- metadata +178 -0
@@ -0,0 +1 @@
|
|
1
|
+
Dir[File.dirname(__FILE__) + "/core_ext/*.rb"].each { |file| require(file) }
|
data/samples/disk.rb
ADDED
data/samples/disk2.rb
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
# example from http://msdn.microsoft.com/en-us/library/ms974615.aspx
|
2
|
+
require 'ruby-wmi'
|
3
|
+
|
4
|
+
c_drive = WMI::Win32_PerfRawData_PerfDisk_LogicalDisk.find :first, :conditions => {'Name' => 'C:'}
|
5
|
+
puts 'C percent free:', c_drive.PercentFreeSpace.to_f*100/c_drive.PercentFreeSpace_Base
|
data/samples/logoff.rb
ADDED
data/samples/memory.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'ruby-wmi'
|
2
|
+
|
3
|
+
properties = ['Description','MaxCapacity','MemoryDevices','MemoryErrorCorrection']
|
4
|
+
|
5
|
+
|
6
|
+
mem = WMI::Win32_PhysicalMemoryArray.find(:all, :host => 'server1')
|
7
|
+
mem.each{|i| puts properties.map{|p| "#{p}: #{i[p]}"}}
|
8
|
+
|
9
|
+
mem2 = WMI::Win32_PhysicalMemoryArray.find(:all, {:host => 'server2', :user => 'domain\\gordon', :passwd => 'password'} )
|
10
|
+
mem2.each{|i| puts properties.map{|p| "#{p}: #{i[p]}"}}
|
11
|
+
|
@@ -0,0 +1,114 @@
|
|
1
|
+
pre.active4d .DiffHeader {
|
2
|
+
background-color: #656565;
|
3
|
+
color: #FFFFFF;
|
4
|
+
}
|
5
|
+
pre.active4d .Operator {
|
6
|
+
}
|
7
|
+
pre.active4d .InheritedClass {
|
8
|
+
}
|
9
|
+
pre.active4d .TypeName {
|
10
|
+
color: #21439C;
|
11
|
+
}
|
12
|
+
pre.active4d .Number {
|
13
|
+
color: #A8017E;
|
14
|
+
}
|
15
|
+
pre.active4d .EmbeddedSource {
|
16
|
+
background-color: #ECF1FF;
|
17
|
+
}
|
18
|
+
pre.active4d {
|
19
|
+
background-color: #FFFFFF;
|
20
|
+
color: #000000;
|
21
|
+
}
|
22
|
+
pre.active4d .DiffInsertedLine {
|
23
|
+
background-color: #98FF9A;
|
24
|
+
color: #000000;
|
25
|
+
}
|
26
|
+
pre.active4d .LibraryVariable {
|
27
|
+
color: #A535AE;
|
28
|
+
}
|
29
|
+
pre.active4d .Storage {
|
30
|
+
color: #FF5600;
|
31
|
+
}
|
32
|
+
pre.active4d .InterpolatedEntity {
|
33
|
+
font-weight: bold;
|
34
|
+
color: #66CCFF;
|
35
|
+
}
|
36
|
+
pre.active4d .line-numbers {
|
37
|
+
background-color: #BAD6FD;
|
38
|
+
color: #000000;
|
39
|
+
}
|
40
|
+
pre.active4d .LocalVariable {
|
41
|
+
font-weight: bold;
|
42
|
+
color: #6392FF;
|
43
|
+
}
|
44
|
+
pre.active4d .DiffLineRange {
|
45
|
+
background-color: #1B63FF;
|
46
|
+
color: #FFFFFF;
|
47
|
+
}
|
48
|
+
pre.active4d .BlockComment {
|
49
|
+
color: #D33435;
|
50
|
+
}
|
51
|
+
pre.active4d .TagName {
|
52
|
+
color: #016CFF;
|
53
|
+
}
|
54
|
+
pre.active4d .FunctionArgument {
|
55
|
+
}
|
56
|
+
pre.active4d .BuiltInConstant {
|
57
|
+
color: #A535AE;
|
58
|
+
}
|
59
|
+
pre.active4d .LineComment {
|
60
|
+
color: #D33535;
|
61
|
+
}
|
62
|
+
pre.active4d .DiffDeletedLine {
|
63
|
+
background-color: #FF7880;
|
64
|
+
color: #000000;
|
65
|
+
}
|
66
|
+
pre.active4d .NamedConstant {
|
67
|
+
color: #B7734C;
|
68
|
+
}
|
69
|
+
pre.active4d .CommandMethod {
|
70
|
+
font-weight: bold;
|
71
|
+
color: #45AE34;
|
72
|
+
}
|
73
|
+
pre.active4d .TableField {
|
74
|
+
color: #0BB600;
|
75
|
+
}
|
76
|
+
pre.active4d .PlainXmlText {
|
77
|
+
color: #000000;
|
78
|
+
}
|
79
|
+
pre.active4d .Invalid {
|
80
|
+
background-color: #990000;
|
81
|
+
color: #FFFFFF;
|
82
|
+
}
|
83
|
+
pre.active4d .LibraryClassType {
|
84
|
+
color: #A535AE;
|
85
|
+
}
|
86
|
+
pre.active4d .TagAttribute {
|
87
|
+
color: #963DFF;
|
88
|
+
}
|
89
|
+
pre.active4d .Keyword {
|
90
|
+
font-weight: bold;
|
91
|
+
color: #006699;
|
92
|
+
}
|
93
|
+
pre.active4d .UserDefinedConstant {
|
94
|
+
}
|
95
|
+
pre.active4d .String {
|
96
|
+
color: #666666;
|
97
|
+
}
|
98
|
+
pre.active4d .DiffUnchangedLine {
|
99
|
+
color: #5E5E5E;
|
100
|
+
}
|
101
|
+
pre.active4d .TagContainer {
|
102
|
+
color: #7A7A7A;
|
103
|
+
}
|
104
|
+
pre.active4d .FunctionName {
|
105
|
+
color: #21439C;
|
106
|
+
}
|
107
|
+
pre.active4d .Variable {
|
108
|
+
font-weight: bold;
|
109
|
+
color: #0053FF;
|
110
|
+
}
|
111
|
+
pre.active4d .DateTimeLiteral {
|
112
|
+
font-weight: bold;
|
113
|
+
color: #66CCFF;
|
114
|
+
}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
pre.all_hallows_eve .ClassInheritance {
|
2
|
+
font-style: italic;
|
3
|
+
}
|
4
|
+
pre.all_hallows_eve .Constant {
|
5
|
+
color: #3387CC;
|
6
|
+
}
|
7
|
+
pre.all_hallows_eve .TypeName {
|
8
|
+
text-decoration: underline;
|
9
|
+
}
|
10
|
+
pre.all_hallows_eve .TextBase {
|
11
|
+
background-color: #434242;
|
12
|
+
color: #FFFFFF;
|
13
|
+
}
|
14
|
+
pre.all_hallows_eve {
|
15
|
+
background-color: #000000;
|
16
|
+
color: #FFFFFF;
|
17
|
+
}
|
18
|
+
pre.all_hallows_eve .StringEscapesExecuted {
|
19
|
+
color: #555555;
|
20
|
+
}
|
21
|
+
pre.all_hallows_eve .line-numbers {
|
22
|
+
background-color: #73597E;
|
23
|
+
color: #FFFFFF;
|
24
|
+
}
|
25
|
+
pre.all_hallows_eve .StringExecuted {
|
26
|
+
background-color: #CCCC33;
|
27
|
+
color: #000000;
|
28
|
+
}
|
29
|
+
pre.all_hallows_eve .BlockComment {
|
30
|
+
background-color: #9B9B9B;
|
31
|
+
color: #FFFFFF;
|
32
|
+
}
|
33
|
+
pre.all_hallows_eve .TagName {
|
34
|
+
text-decoration: underline;
|
35
|
+
}
|
36
|
+
pre.all_hallows_eve .PreProcessorLine {
|
37
|
+
color: #D0D0FF;
|
38
|
+
}
|
39
|
+
pre.all_hallows_eve .SupportFunction {
|
40
|
+
color: #C83730;
|
41
|
+
}
|
42
|
+
pre.all_hallows_eve .FunctionArgument {
|
43
|
+
font-style: italic;
|
44
|
+
}
|
45
|
+
pre.all_hallows_eve .PreProcessorDirective {
|
46
|
+
}
|
47
|
+
pre.all_hallows_eve .StringEscapes {
|
48
|
+
color: #AAAAAA;
|
49
|
+
}
|
50
|
+
pre.all_hallows_eve .SourceBase {
|
51
|
+
background-color: #000000;
|
52
|
+
color: #FFFFFF;
|
53
|
+
}
|
54
|
+
pre.all_hallows_eve .TagAttribute {
|
55
|
+
}
|
56
|
+
pre.all_hallows_eve .StringLiteral {
|
57
|
+
color: #CCCC33;
|
58
|
+
}
|
59
|
+
pre.all_hallows_eve .String {
|
60
|
+
color: #66CC33;
|
61
|
+
}
|
62
|
+
pre.all_hallows_eve .Keyword {
|
63
|
+
color: #CC7833;
|
64
|
+
}
|
65
|
+
pre.all_hallows_eve .RegularExpression {
|
66
|
+
color: #CCCC33;
|
67
|
+
}
|
68
|
+
pre.all_hallows_eve .FunctionName {
|
69
|
+
}
|
70
|
+
pre.all_hallows_eve .Comment {
|
71
|
+
color: #9933CC;
|
72
|
+
}
|
@@ -0,0 +1,147 @@
|
|
1
|
+
pre.amy .PolymorphicVariants {
|
2
|
+
color: #60B0FF;
|
3
|
+
font-style: italic;
|
4
|
+
}
|
5
|
+
pre.amy .KeywordDecorator {
|
6
|
+
color: #D0D0FF;
|
7
|
+
}
|
8
|
+
pre.amy .Punctuation {
|
9
|
+
color: #805080;
|
10
|
+
}
|
11
|
+
pre.amy .InheritedClass {
|
12
|
+
}
|
13
|
+
pre.amy .InvalidDepricated {
|
14
|
+
background-color: #CC66FF;
|
15
|
+
color: #200020;
|
16
|
+
}
|
17
|
+
pre.amy .LibraryVariable {
|
18
|
+
}
|
19
|
+
pre.amy .TokenReferenceOcamlyacc {
|
20
|
+
color: #3CB0D0;
|
21
|
+
}
|
22
|
+
pre.amy .Storage {
|
23
|
+
color: #B0FFF0;
|
24
|
+
}
|
25
|
+
pre.amy .KeywordOperator {
|
26
|
+
color: #A0A0FF;
|
27
|
+
}
|
28
|
+
pre.amy .CharacterConstant {
|
29
|
+
color: #666666;
|
30
|
+
}
|
31
|
+
pre.amy .line-numbers {
|
32
|
+
background-color: #800000;
|
33
|
+
color: #000000;
|
34
|
+
}
|
35
|
+
pre.amy .ClassName {
|
36
|
+
color: #70E080;
|
37
|
+
}
|
38
|
+
pre.amy .Int64Constant {
|
39
|
+
font-style: italic;
|
40
|
+
}
|
41
|
+
pre.amy .NonTerminalReferenceOcamlyacc {
|
42
|
+
color: #C0F0F0;
|
43
|
+
}
|
44
|
+
pre.amy .TokenDefinitionOcamlyacc {
|
45
|
+
color: #3080A0;
|
46
|
+
}
|
47
|
+
pre.amy .ClassType {
|
48
|
+
color: #70E0A0;
|
49
|
+
}
|
50
|
+
pre.amy .ControlKeyword {
|
51
|
+
color: #80A0FF;
|
52
|
+
}
|
53
|
+
pre.amy .LineNumberDirectives {
|
54
|
+
text-decoration: underline;
|
55
|
+
color: #C080C0;
|
56
|
+
}
|
57
|
+
pre.amy .FloatingPointConstant {
|
58
|
+
text-decoration: underline;
|
59
|
+
}
|
60
|
+
pre.amy .Int32Constant {
|
61
|
+
font-weight: bold;
|
62
|
+
}
|
63
|
+
pre.amy .TagName {
|
64
|
+
color: #009090;
|
65
|
+
}
|
66
|
+
pre.amy .ModuleTypeDefinitions {
|
67
|
+
text-decoration: underline;
|
68
|
+
color: #B000B0;
|
69
|
+
}
|
70
|
+
pre.amy .Integer {
|
71
|
+
color: #7090B0;
|
72
|
+
}
|
73
|
+
pre.amy .Camlp4TempParser {
|
74
|
+
}
|
75
|
+
pre.amy .InvalidIllegal {
|
76
|
+
font-weight: bold;
|
77
|
+
background-color: #FFFF00;
|
78
|
+
color: #400080;
|
79
|
+
}
|
80
|
+
pre.amy .LibraryConstant {
|
81
|
+
background-color: #200020;
|
82
|
+
}
|
83
|
+
pre.amy .ModuleDefinitions {
|
84
|
+
color: #B000B0;
|
85
|
+
}
|
86
|
+
pre.amy .Variants {
|
87
|
+
color: #60B0FF;
|
88
|
+
}
|
89
|
+
pre.amy .CompilerDirectives {
|
90
|
+
color: #C080C0;
|
91
|
+
}
|
92
|
+
pre.amy .FloatingPointInfixOperator {
|
93
|
+
text-decoration: underline;
|
94
|
+
}
|
95
|
+
pre.amy .BuiltInConstant1 {
|
96
|
+
}
|
97
|
+
pre.amy {
|
98
|
+
background-color: #200020;
|
99
|
+
color: #D0D0FF;
|
100
|
+
}
|
101
|
+
pre.amy .FunctionArgument {
|
102
|
+
color: #80B0B0;
|
103
|
+
}
|
104
|
+
pre.amy .FloatingPointPrefixOperator {
|
105
|
+
text-decoration: underline;
|
106
|
+
}
|
107
|
+
pre.amy .NativeintConstant {
|
108
|
+
font-weight: bold;
|
109
|
+
}
|
110
|
+
pre.amy .BuiltInConstant {
|
111
|
+
color: #707090;
|
112
|
+
}
|
113
|
+
pre.amy .BooleanConstant {
|
114
|
+
color: #8080A0;
|
115
|
+
}
|
116
|
+
pre.amy .LibraryClassType {
|
117
|
+
}
|
118
|
+
pre.amy .TagAttribute {
|
119
|
+
}
|
120
|
+
pre.amy .Keyword {
|
121
|
+
color: #A080FF;
|
122
|
+
}
|
123
|
+
pre.amy .UserDefinedConstant {
|
124
|
+
}
|
125
|
+
pre.amy .String {
|
126
|
+
color: #999999;
|
127
|
+
}
|
128
|
+
pre.amy .Camlp4Code {
|
129
|
+
background-color: #350060;
|
130
|
+
}
|
131
|
+
pre.amy .NonTerminalDefinitionOcamlyacc {
|
132
|
+
color: #90E0E0;
|
133
|
+
}
|
134
|
+
pre.amy .FunctionName {
|
135
|
+
color: #50A0A0;
|
136
|
+
}
|
137
|
+
pre.amy .SupportModules {
|
138
|
+
color: #A00050;
|
139
|
+
}
|
140
|
+
pre.amy .Variable {
|
141
|
+
color: #008080;
|
142
|
+
}
|
143
|
+
pre.amy .Comment {
|
144
|
+
background-color: #200020;
|
145
|
+
color: #404080;
|
146
|
+
font-style: italic;
|
147
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
pre.blackboard .LatexSupport {
|
2
|
+
color: #FBDE2D;
|
3
|
+
}
|
4
|
+
pre.blackboard .OcamlInfixOperator {
|
5
|
+
color: #8DA6CE;
|
6
|
+
}
|
7
|
+
pre.blackboard .MetaFunctionCallPy {
|
8
|
+
color: #BECDE6;
|
9
|
+
}
|
10
|
+
pre.blackboard .Superclass {
|
11
|
+
color: #FF6400;
|
12
|
+
font-style: italic;
|
13
|
+
}
|
14
|
+
pre.blackboard .Constant {
|
15
|
+
color: #D8FA3C;
|
16
|
+
}
|
17
|
+
pre.blackboard {
|
18
|
+
background-color: #0C1021;
|
19
|
+
color: #F8F8F8;
|
20
|
+
}
|
21
|
+
pre.blackboard .OcamlFPConstant {
|
22
|
+
text-decoration: underline;
|
23
|
+
}
|
24
|
+
pre.blackboard .OcamlFPInfixOperator {
|
25
|
+
text-decoration: underline;
|
26
|
+
}
|
27
|
+
pre.blackboard .Support {
|
28
|
+
color: #8DA6CE;
|
29
|
+
}
|
30
|
+
pre.blackboard .OcamlOperator {
|
31
|
+
color: #F8F8F8;
|
32
|
+
}
|
33
|
+
pre.blackboard .Storage {
|
34
|
+
color: #FBDE2D;
|
35
|
+
}
|
36
|
+
pre.blackboard .line-numbers {
|
37
|
+
background-color: #253B76;
|
38
|
+
color: #FFFFFF;
|
39
|
+
}
|
40
|
+
pre.blackboard .StringInterpolation {
|
41
|
+
color: #FF6400;
|
42
|
+
}
|
43
|
+
pre.blackboard .InvalidIllegal {
|
44
|
+
background-color: #9D1E15;
|
45
|
+
color: #F8F8F8;
|
46
|
+
}
|
47
|
+
pre.blackboard .PlistUnquotedString {
|
48
|
+
color: #FFFFFF;
|
49
|
+
}
|
50
|
+
pre.blackboard .OcamlVariant {
|
51
|
+
color: #D5E0F3;
|
52
|
+
}
|
53
|
+
pre.blackboard .MetaTag {
|
54
|
+
color: #7F90AA;
|
55
|
+
}
|
56
|
+
pre.blackboard .LatexEnvironment {
|
57
|
+
background-color: #F7F7F8;
|
58
|
+
}
|
59
|
+
pre.blackboard .OcamlFPPrefixOperator {
|
60
|
+
text-decoration: underline;
|
61
|
+
}
|
62
|
+
pre.blackboard .OcamlPrefixOperator {
|
63
|
+
color: #8DA6CE;
|
64
|
+
}
|
65
|
+
pre.blackboard .EntityNameSection {
|
66
|
+
color: #FFFFFF;
|
67
|
+
}
|
68
|
+
pre.blackboard .String {
|
69
|
+
color: #61CE3C;
|
70
|
+
}
|
71
|
+
pre.blackboard .Keyword {
|
72
|
+
color: #FBDE2D;
|
73
|
+
}
|
74
|
+
pre.blackboard .LatexEnvironmentNested {
|
75
|
+
background-color: #7691F3;
|
76
|
+
}
|
77
|
+
pre.blackboard .InvalidDeprecated {
|
78
|
+
color: #AB2A1D;
|
79
|
+
font-style: italic;
|
80
|
+
}
|
81
|
+
pre.blackboard .Variable {
|
82
|
+
}
|
83
|
+
pre.blackboard .Entity {
|
84
|
+
color: #FF6400;
|
85
|
+
}
|
86
|
+
pre.blackboard .Comment {
|
87
|
+
color: #AEAEAE;
|
88
|
+
}
|