esscee 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/Manifest +10 -0
- data/README +9 -0
- data/Rakefile +12 -0
- data/esscee.gemspec +32 -0
- data/lib/esscee.rb +3 -0
- data/lib/host.rb +19 -0
- data/lib/response_parser.rb +44 -0
- data/lib/service.rb +18 -0
- data/spec/localhost.query.all +1791 -0
- data/spec/response_parser_spec.rb +30 -0
- metadata +107 -0
- metadata.gz.sig +3 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rspec'
|
3
|
+
|
4
|
+
require File.dirname(__FILE__) + '/../lib/response_parser.rb'
|
5
|
+
require File.dirname(__FILE__) + '/../lib/service.rb'
|
6
|
+
|
7
|
+
describe EssCee::ResponseParser do
|
8
|
+
before(:each) do
|
9
|
+
@mock_response = ""
|
10
|
+
file = File.open(File.dirname(__FILE__) + '/localhost.query.all')
|
11
|
+
file.each_line {|line| @mock_response += line}
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should know how many services are running on a host" do
|
15
|
+
services = EssCee::ResponseParser.get_services(@mock_response)
|
16
|
+
services.count.should == 191
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should know the details of the application experience service" do
|
20
|
+
services = EssCee::ResponseParser.get_services(@mock_response)
|
21
|
+
ae_service = services.first
|
22
|
+
|
23
|
+
ae_service[:name].should == "AeLookupSvc"
|
24
|
+
ae_service[:display_name].should == "Application Experience"
|
25
|
+
ae_service[:type][:code].should == 20
|
26
|
+
ae_service[:type][:message].should == "WIN32_SHARE_PROCESS"
|
27
|
+
ae_service[:state][:code].should == 1
|
28
|
+
ae_service[:state][:message].should == "STOPPED"
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: esscee
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 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AQEA
|
31
|
+
4iDz7F50EtnSeFZktJW3qkttBpeMzOmtAyXNL7Zijop1y1n8KAc9LF2T9RHj32h1
|
32
|
+
hVLRSE35lXK3+zu++OEQlXXOGwphGo2deKZSMGzDvZ3dBxc24O6sYvYX70Lt1n9b
|
33
|
+
xqZPZ4mcTZI2OHFO63RV7ngtA0SvhovKFWfTAjeFvTlRk2KC7rc7KbEKtj9WTTZR
|
34
|
+
+rzRLKsk5krXSX7d9ckrjB0awc5c4Sew6t7m9rioY//W8wIxHZeR6wRglhs6t3Zq
|
35
|
+
XwEuLDtAwXlUs2uqZk9cZAiXo7fOH0qtwZ+ZT0flc/5y7+KPPfwSX9AsfYZ4Si9p
|
36
|
+
/ljIcAPzO2ipxUgtav/S+A==
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
|
39
|
+
date: 2011-03-07 00:00:00 +00:00
|
40
|
+
default_executable:
|
41
|
+
dependencies: []
|
42
|
+
|
43
|
+
description: A wrapper for the Windows SC command-line utility for managing services.
|
44
|
+
email: baris.balic@uswitch.com
|
45
|
+
executables: []
|
46
|
+
|
47
|
+
extensions: []
|
48
|
+
|
49
|
+
extra_rdoc_files:
|
50
|
+
- README
|
51
|
+
- lib/esscee.rb
|
52
|
+
- lib/host.rb
|
53
|
+
- lib/response_parser.rb
|
54
|
+
- lib/service.rb
|
55
|
+
files:
|
56
|
+
- Manifest
|
57
|
+
- README
|
58
|
+
- Rakefile
|
59
|
+
- esscee.gemspec
|
60
|
+
- lib/esscee.rb
|
61
|
+
- lib/host.rb
|
62
|
+
- lib/response_parser.rb
|
63
|
+
- lib/service.rb
|
64
|
+
- spec/localhost.query.all
|
65
|
+
- spec/response_parser_spec.rb
|
66
|
+
has_rdoc: true
|
67
|
+
homepage: http://github.com/barisbalic/EssCee
|
68
|
+
licenses: []
|
69
|
+
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options:
|
72
|
+
- --line-numbers
|
73
|
+
- --inline-source
|
74
|
+
- --title
|
75
|
+
- Esscee
|
76
|
+
- --main
|
77
|
+
- README
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
hash: 11
|
95
|
+
segments:
|
96
|
+
- 1
|
97
|
+
- 2
|
98
|
+
version: "1.2"
|
99
|
+
requirements: []
|
100
|
+
|
101
|
+
rubyforge_project: esscee
|
102
|
+
rubygems_version: 1.3.7
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: A wrapper for the Windows SC command-line utility for managing services.
|
106
|
+
test_files: []
|
107
|
+
|
metadata.gz.sig
ADDED