fluent_command_builder 0.5.6 → 0.6.0
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.
- data/lib/command_version_detector.rb +1 -0
- data/lib/fluent_command_builder/command_base.rb +20 -11
- data/lib/fluent_command_builder/command_builders/appcfg_python.rb +17 -0
- data/lib/fluent_command_builder/command_builders/appcfg_python_16.rb +1059 -1059
- data/lib/fluent_command_builder/command_builders/appcfg_python_17.rb +1055 -1055
- data/lib/fluent_command_builder/command_builders/aspnet_compiler.rb +17 -0
- data/lib/fluent_command_builder/command_builders/aspnet_compiler_20.rb +46 -46
- data/lib/fluent_command_builder/command_builders/aspnet_compiler_40.rb +46 -46
- data/lib/fluent_command_builder/command_builders/bundle.rb +17 -0
- data/lib/fluent_command_builder/command_builders/bundle_11.rb +140 -140
- data/lib/fluent_command_builder/command_builders/cucumber.rb +17 -0
- data/lib/fluent_command_builder/command_builders/cucumber_11.rb +76 -76
- data/lib/fluent_command_builder/command_builders/cucumber_12.rb +78 -78
- data/lib/fluent_command_builder/command_builders/dev_appserver_python.rb +17 -0
- data/lib/fluent_command_builder/command_builders/dev_appserver_python_16.rb +91 -86
- data/lib/fluent_command_builder/command_builders/dev_appserver_python_17.rb +91 -86
- data/lib/fluent_command_builder/command_builders/dotcover.rb +17 -0
- data/lib/fluent_command_builder/command_builders/dotcover_10.rb +33 -33
- data/lib/fluent_command_builder/command_builders/dotcover_11.rb +133 -133
- data/lib/fluent_command_builder/command_builders/dotcover_12.rb +133 -133
- data/lib/fluent_command_builder/command_builders/dotcover_20.rb +137 -137
- data/lib/fluent_command_builder/command_builders/installutil.rb +17 -0
- data/lib/fluent_command_builder/command_builders/installutil_11.rb +31 -31
- data/lib/fluent_command_builder/command_builders/installutil_20.rb +33 -33
- data/lib/fluent_command_builder/command_builders/installutil_35.rb +33 -33
- data/lib/fluent_command_builder/command_builders/installutil_40.rb +36 -36
- data/lib/fluent_command_builder/command_builders/msbuild.rb +17 -0
- data/lib/fluent_command_builder/command_builders/msbuild_20.rb +43 -43
- data/lib/fluent_command_builder/command_builders/msbuild_30.rb +43 -43
- data/lib/fluent_command_builder/command_builders/msbuild_35.rb +59 -59
- data/lib/fluent_command_builder/command_builders/msbuild_40.rb +62 -62
- data/lib/fluent_command_builder/command_builders/msdeploy.rb +17 -0
- data/lib/fluent_command_builder/command_builders/msdeploy_71.rb +177 -0
- data/lib/fluent_command_builder/command_builders/mstest.rb +17 -0
- data/lib/fluent_command_builder/command_builders/mstest_100.rb +127 -0
- data/lib/fluent_command_builder/command_builders/mstest_80.rb +107 -0
- data/lib/fluent_command_builder/command_builders/mstest_90.rb +112 -0
- data/lib/fluent_command_builder/command_builders/netsh.rb +17 -0
- data/lib/fluent_command_builder/command_builders/netsh_61.rb +408 -0
- data/lib/fluent_command_builder/command_builders/nunit.rb +17 -0
- data/lib/fluent_command_builder/command_builders/nunit_25.rb +69 -64
- data/lib/fluent_command_builder/command_builders/nunit_26.rb +85 -80
- data/lib/fluent_command_builder/command_builders/rake.rb +17 -0
- data/lib/fluent_command_builder/command_builders/rake_09.rb +64 -64
- data/lib/fluent_command_builder/command_builders/security_osx.rb +17 -0
- data/lib/fluent_command_builder/command_builders/security_osx_107.rb +82 -82
- data/lib/fluent_command_builder/command_builders/sevenzip.rb +17 -0
- data/lib/fluent_command_builder/command_builders/sevenzip_92.rb +243 -243
- data/lib/fluent_command_builder/command_builders/simian.rb +17 -0
- data/lib/fluent_command_builder/command_builders/simian_23.rb +63 -63
- data/lib/fluent_command_builder/command_builders/team_foundation.rb +17 -0
- data/lib/fluent_command_builder/command_builders/team_foundation_100.rb +2155 -0
- data/lib/fluent_command_builder/command_builders/team_foundation_tee.rb +17 -0
- data/lib/fluent_command_builder/command_builders/team_foundation_tee_100.rb +1978 -0
- data/lib/fluent_command_builder/command_builders/xcodebuild.rb +17 -0
- data/lib/fluent_command_builder/command_builders/xcodebuild_43.rb +112 -112
- data/lib/fluent_command_builder/command_builders/xcodebuild_44.rb +132 -132
- data/lib/fluent_command_builder/{command_builder.rb → underlying_builder.rb} +2 -2
- data/lib/fluent_command_builder/util.rb +18 -0
- data/lib/fluent_command_builder/version_detectors/appcfg_python.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/aspnet_compiler.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/bundle.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/cucumber.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/dev_appserver_python.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/dotcover.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/installutil.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/lib/appengine_python_version_detector.rb +16 -0
- data/lib/fluent_command_builder/version_detectors/lib/path_finder.rb +43 -0
- data/lib/fluent_command_builder/version_detectors/lib/standard_version_detector.rb +14 -0
- data/lib/fluent_command_builder/version_detectors/msbuild.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/msdeploy.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/mstest.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/nuget.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/nunit.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/rake.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/security_osx.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/sevenzip.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/team_foundation.rb +9 -0
- data/lib/fluent_command_builder/version_detectors/xcodebuild.rb +9 -0
- data/lib/fluent_command_builder.rb +26 -7
- metadata +53 -12
- data/lib/fluent_command_builder/command_builders/msdeploy_40.rb +0 -177
- data/lib/fluent_command_builder/command_builders/mstest_2005.rb +0 -107
- data/lib/fluent_command_builder/command_builders/mstest_2008.rb +0 -112
- data/lib/fluent_command_builder/command_builders/mstest_2010.rb +0 -127
- data/lib/fluent_command_builder/command_builders/netsh_2008.rb +0 -408
- data/lib/fluent_command_builder/command_builders/tf_2010.rb +0 -2155
- data/lib/fluent_command_builder/command_builders/tf_tee_2010.rb +0 -1978
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../command_base')
|
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../command_builder')
|
|
3
|
-
|
|
4
|
-
module FluentCommandBuilder
|
|
5
|
-
module MSTest
|
|
6
|
-
module V2010
|
|
7
|
-
COMMAND_NAME = 'MSTest'
|
|
8
|
-
class MSTest < CommandBase
|
|
9
|
-
def initialize(builder)
|
|
10
|
-
super builder
|
|
11
|
-
end
|
|
12
|
-
def test_container(file_name)
|
|
13
|
-
@builder.append " /testContainer:#{@builder.format file_name}"
|
|
14
|
-
yield @builder if block_given?
|
|
15
|
-
self
|
|
16
|
-
end
|
|
17
|
-
def test_metadata(file_name)
|
|
18
|
-
@builder.append " /testMetadata:#{@builder.format file_name}"
|
|
19
|
-
yield @builder if block_given?
|
|
20
|
-
self
|
|
21
|
-
end
|
|
22
|
-
def test_list(test_list_path)
|
|
23
|
-
@builder.append " /testList:#{@builder.format test_list_path}"
|
|
24
|
-
yield @builder if block_given?
|
|
25
|
-
self
|
|
26
|
-
end
|
|
27
|
-
def category(test_category_filter)
|
|
28
|
-
@builder.append " /category:#{@builder.format test_category_filter}"
|
|
29
|
-
yield @builder if block_given?
|
|
30
|
-
self
|
|
31
|
-
end
|
|
32
|
-
def test(test_name)
|
|
33
|
-
@builder.append " /test:#{@builder.format test_name}"
|
|
34
|
-
yield @builder if block_given?
|
|
35
|
-
self
|
|
36
|
-
end
|
|
37
|
-
def no_isolation
|
|
38
|
-
@builder.append ' /noIsolation'
|
|
39
|
-
yield @builder if block_given?
|
|
40
|
-
self
|
|
41
|
-
end
|
|
42
|
-
def test_settings(file_name)
|
|
43
|
-
@builder.append " /testSettings:#{@builder.format file_name}"
|
|
44
|
-
yield @builder if block_given?
|
|
45
|
-
self
|
|
46
|
-
end
|
|
47
|
-
def run_config(file_name)
|
|
48
|
-
@builder.append " /runConfig:#{@builder.format file_name}"
|
|
49
|
-
yield @builder if block_given?
|
|
50
|
-
self
|
|
51
|
-
end
|
|
52
|
-
def results_file(file_name)
|
|
53
|
-
@builder.append " /resultsFile:#{@builder.format file_name}"
|
|
54
|
-
yield @builder if block_given?
|
|
55
|
-
self
|
|
56
|
-
end
|
|
57
|
-
def unique
|
|
58
|
-
@builder.append ' /unique'
|
|
59
|
-
yield @builder if block_given?
|
|
60
|
-
self
|
|
61
|
-
end
|
|
62
|
-
def detail(property_id)
|
|
63
|
-
@builder.append " /detail:#{@builder.format property_id}"
|
|
64
|
-
yield @builder if block_given?
|
|
65
|
-
self
|
|
66
|
-
end
|
|
67
|
-
def help
|
|
68
|
-
@builder.append ' /help'
|
|
69
|
-
yield @builder if block_given?
|
|
70
|
-
self
|
|
71
|
-
end
|
|
72
|
-
def no_logo
|
|
73
|
-
@builder.append ' /noLogo'
|
|
74
|
-
yield @builder if block_given?
|
|
75
|
-
self
|
|
76
|
-
end
|
|
77
|
-
def use_std_err
|
|
78
|
-
@builder.append ' /useStdErr'
|
|
79
|
-
yield @builder if block_given?
|
|
80
|
-
self
|
|
81
|
-
end
|
|
82
|
-
def publish(server_name)
|
|
83
|
-
@builder.append " /publish:#{@builder.format server_name}"
|
|
84
|
-
yield @builder if block_given?
|
|
85
|
-
self
|
|
86
|
-
end
|
|
87
|
-
def publish_results_file(file_name)
|
|
88
|
-
@builder.append " /publishResultsFile:#{@builder.format file_name}"
|
|
89
|
-
yield @builder if block_given?
|
|
90
|
-
self
|
|
91
|
-
end
|
|
92
|
-
def publish_build(build_id)
|
|
93
|
-
@builder.append " /publishBuild:#{@builder.format build_id}"
|
|
94
|
-
yield @builder if block_given?
|
|
95
|
-
self
|
|
96
|
-
end
|
|
97
|
-
def team_project(team_project_name)
|
|
98
|
-
@builder.append " /teamProject:#{@builder.format team_project_name}"
|
|
99
|
-
yield @builder if block_given?
|
|
100
|
-
self
|
|
101
|
-
end
|
|
102
|
-
def platform(platform)
|
|
103
|
-
@builder.append " /platform:#{@builder.format platform}"
|
|
104
|
-
yield @builder if block_given?
|
|
105
|
-
self
|
|
106
|
-
end
|
|
107
|
-
def flavor(flavor)
|
|
108
|
-
@builder.append " /flavor:#{@builder.format flavor}"
|
|
109
|
-
yield @builder if block_given?
|
|
110
|
-
self
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
def mstest
|
|
114
|
-
builder = CommandBuilder.new COMMAND_NAME
|
|
115
|
-
command = MSTest.new builder
|
|
116
|
-
yield builder if block_given?
|
|
117
|
-
command
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
def mstest_2010
|
|
122
|
-
builder = CommandBuilder.new MSTest::V2010::COMMAND_NAME
|
|
123
|
-
command = MSTest::V2010::MSTest.new builder
|
|
124
|
-
yield builder if block_given?
|
|
125
|
-
command
|
|
126
|
-
end
|
|
127
|
-
end
|
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../command_base')
|
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../command_builder')
|
|
3
|
-
|
|
4
|
-
module FluentCommandBuilder
|
|
5
|
-
module Netsh
|
|
6
|
-
module V2008
|
|
7
|
-
COMMAND_NAME = 'netsh'
|
|
8
|
-
class Netsh < CommandBase
|
|
9
|
-
def initialize(builder)
|
|
10
|
-
super builder
|
|
11
|
-
end
|
|
12
|
-
def advfirewall
|
|
13
|
-
Advfirewall.new @builder
|
|
14
|
-
end
|
|
15
|
-
def http
|
|
16
|
-
Http.new @builder
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
class Advfirewall < CommandBase
|
|
20
|
-
def initialize(builder)
|
|
21
|
-
super builder
|
|
22
|
-
@builder.append ' advfirewall'
|
|
23
|
-
end
|
|
24
|
-
def firewall
|
|
25
|
-
Firewall.new @builder
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
class Firewall < CommandBase
|
|
29
|
-
def initialize(builder)
|
|
30
|
-
super builder
|
|
31
|
-
@builder.append ' firewall'
|
|
32
|
-
end
|
|
33
|
-
def add_rule(rule_name, direction, action)
|
|
34
|
-
AddRule.new @builder, rule_name, direction, action
|
|
35
|
-
end
|
|
36
|
-
def delete_rule(rule_name)
|
|
37
|
-
DeleteRule.new @builder, rule_name
|
|
38
|
-
end
|
|
39
|
-
def set_rule
|
|
40
|
-
SetRule.new @builder
|
|
41
|
-
end
|
|
42
|
-
def show_rule(rule_name)
|
|
43
|
-
ShowRule.new @builder, rule_name
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
class AddRule < CommandBase
|
|
47
|
-
def initialize(builder, rule_name, direction, action)
|
|
48
|
-
super builder
|
|
49
|
-
@builder.append " add rule name=#{@builder.format rule_name} dir=#{@builder.format direction} action=#{@builder.format action}"
|
|
50
|
-
end
|
|
51
|
-
def program(path)
|
|
52
|
-
@builder.append " program=#{@builder.format path}"
|
|
53
|
-
yield @builder if block_given?
|
|
54
|
-
self
|
|
55
|
-
end
|
|
56
|
-
def service(service_short_name)
|
|
57
|
-
@builder.append " service=#{@builder.format service_short_name}"
|
|
58
|
-
yield @builder if block_given?
|
|
59
|
-
self
|
|
60
|
-
end
|
|
61
|
-
def description(rule_description)
|
|
62
|
-
@builder.append " description=#{@builder.format rule_description}"
|
|
63
|
-
yield @builder if block_given?
|
|
64
|
-
self
|
|
65
|
-
end
|
|
66
|
-
def enable(enable)
|
|
67
|
-
@builder.append " enable=#{@builder.format enable}"
|
|
68
|
-
yield @builder if block_given?
|
|
69
|
-
self
|
|
70
|
-
end
|
|
71
|
-
def profile(profile)
|
|
72
|
-
@builder.append " profile=#{@builder.format profile}"
|
|
73
|
-
yield @builder if block_given?
|
|
74
|
-
self
|
|
75
|
-
end
|
|
76
|
-
def local_ip(address)
|
|
77
|
-
@builder.append " localIp=#{@builder.format address, ','}"
|
|
78
|
-
yield @builder if block_given?
|
|
79
|
-
self
|
|
80
|
-
end
|
|
81
|
-
def remote_ip(address)
|
|
82
|
-
@builder.append " remoteIp=#{@builder.format address, ','}"
|
|
83
|
-
yield @builder if block_given?
|
|
84
|
-
self
|
|
85
|
-
end
|
|
86
|
-
def local_port(port)
|
|
87
|
-
@builder.append " localPort=#{@builder.format port, ','}"
|
|
88
|
-
yield @builder if block_given?
|
|
89
|
-
self
|
|
90
|
-
end
|
|
91
|
-
def remote_port(port)
|
|
92
|
-
@builder.append " remotePort=#{@builder.format port, ','}"
|
|
93
|
-
yield @builder if block_given?
|
|
94
|
-
self
|
|
95
|
-
end
|
|
96
|
-
def protocol(protocol)
|
|
97
|
-
@builder.append " protocol=#{@builder.format protocol}"
|
|
98
|
-
yield @builder if block_given?
|
|
99
|
-
self
|
|
100
|
-
end
|
|
101
|
-
def interface_type(type)
|
|
102
|
-
@builder.append " interfaceType=#{@builder.format type}"
|
|
103
|
-
yield @builder if block_given?
|
|
104
|
-
self
|
|
105
|
-
end
|
|
106
|
-
def remote_computer_group(sddl_string)
|
|
107
|
-
@builder.append " rmtcomputergrp=#{@builder.format sddl_string}"
|
|
108
|
-
yield @builder if block_given?
|
|
109
|
-
self
|
|
110
|
-
end
|
|
111
|
-
def remote_user_group(sddl_string)
|
|
112
|
-
@builder.append " rmtusgrp=#{@builder.format sddl_string}"
|
|
113
|
-
yield @builder if block_given?
|
|
114
|
-
self
|
|
115
|
-
end
|
|
116
|
-
def edge(edge)
|
|
117
|
-
@builder.append " edge=#{@builder.format edge}"
|
|
118
|
-
yield @builder if block_given?
|
|
119
|
-
self
|
|
120
|
-
end
|
|
121
|
-
def security(security)
|
|
122
|
-
@builder.append " security=#{@builder.format security}"
|
|
123
|
-
yield @builder if block_given?
|
|
124
|
-
self
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
class DeleteRule < CommandBase
|
|
128
|
-
def initialize(builder, rule_name)
|
|
129
|
-
super builder
|
|
130
|
-
@builder.append " delete rule name=#{@builder.format rule_name}"
|
|
131
|
-
end
|
|
132
|
-
def dir(direction)
|
|
133
|
-
@builder.append " dir=#{@builder.format direction}"
|
|
134
|
-
yield @builder if block_given?
|
|
135
|
-
self
|
|
136
|
-
end
|
|
137
|
-
def profile(profile)
|
|
138
|
-
@builder.append " profile=#{@builder.format profile}"
|
|
139
|
-
yield @builder if block_given?
|
|
140
|
-
self
|
|
141
|
-
end
|
|
142
|
-
def program(path)
|
|
143
|
-
@builder.append " program=#{@builder.format path}"
|
|
144
|
-
yield @builder if block_given?
|
|
145
|
-
self
|
|
146
|
-
end
|
|
147
|
-
def service(service_short_name)
|
|
148
|
-
@builder.append " service=#{@builder.format service_short_name}"
|
|
149
|
-
yield @builder if block_given?
|
|
150
|
-
self
|
|
151
|
-
end
|
|
152
|
-
def local_ip(address)
|
|
153
|
-
@builder.append " localIp=#{@builder.format address, ','}"
|
|
154
|
-
yield @builder if block_given?
|
|
155
|
-
self
|
|
156
|
-
end
|
|
157
|
-
def remote_ip(address)
|
|
158
|
-
@builder.append " remoteIp=#{@builder.format address, ','}"
|
|
159
|
-
yield @builder if block_given?
|
|
160
|
-
self
|
|
161
|
-
end
|
|
162
|
-
def local_port(port)
|
|
163
|
-
@builder.append " localPort=#{@builder.format port, ','}"
|
|
164
|
-
yield @builder if block_given?
|
|
165
|
-
self
|
|
166
|
-
end
|
|
167
|
-
def remote_port(port)
|
|
168
|
-
@builder.append " remotePort=#{@builder.format port, ','}"
|
|
169
|
-
yield @builder if block_given?
|
|
170
|
-
self
|
|
171
|
-
end
|
|
172
|
-
def protocol(protocol)
|
|
173
|
-
@builder.append " protocol=#{@builder.format protocol}"
|
|
174
|
-
yield @builder if block_given?
|
|
175
|
-
self
|
|
176
|
-
end
|
|
177
|
-
end
|
|
178
|
-
class SetRule < CommandBase
|
|
179
|
-
def initialize(builder)
|
|
180
|
-
super builder
|
|
181
|
-
@builder.append ' set rule'
|
|
182
|
-
end
|
|
183
|
-
def group(group_name)
|
|
184
|
-
@builder.append " group=#{@builder.format group_name}"
|
|
185
|
-
yield @builder if block_given?
|
|
186
|
-
self
|
|
187
|
-
end
|
|
188
|
-
def dir(direction)
|
|
189
|
-
@builder.append " dir=#{@builder.format direction}"
|
|
190
|
-
yield @builder if block_given?
|
|
191
|
-
self
|
|
192
|
-
end
|
|
193
|
-
def profile(profile)
|
|
194
|
-
@builder.append " profile=#{@builder.format profile}"
|
|
195
|
-
yield @builder if block_given?
|
|
196
|
-
self
|
|
197
|
-
end
|
|
198
|
-
def program(path)
|
|
199
|
-
@builder.append " program=#{@builder.format path}"
|
|
200
|
-
yield @builder if block_given?
|
|
201
|
-
self
|
|
202
|
-
end
|
|
203
|
-
def service(service_short_name)
|
|
204
|
-
@builder.append " service=#{@builder.format service_short_name}"
|
|
205
|
-
yield @builder if block_given?
|
|
206
|
-
self
|
|
207
|
-
end
|
|
208
|
-
def local_ip(address)
|
|
209
|
-
@builder.append " localIp=#{@builder.format address, ','}"
|
|
210
|
-
yield @builder if block_given?
|
|
211
|
-
self
|
|
212
|
-
end
|
|
213
|
-
def remote_ip(address)
|
|
214
|
-
@builder.append " remoteIp=#{@builder.format address, ','}"
|
|
215
|
-
yield @builder if block_given?
|
|
216
|
-
self
|
|
217
|
-
end
|
|
218
|
-
def local_port(port)
|
|
219
|
-
@builder.append " localPort=#{@builder.format port, ','}"
|
|
220
|
-
yield @builder if block_given?
|
|
221
|
-
self
|
|
222
|
-
end
|
|
223
|
-
def remote_port(port)
|
|
224
|
-
@builder.append " remotePort=#{@builder.format port, ','}"
|
|
225
|
-
yield @builder if block_given?
|
|
226
|
-
self
|
|
227
|
-
end
|
|
228
|
-
def protocol(protocol)
|
|
229
|
-
@builder.append " protocol=#{@builder.format protocol}"
|
|
230
|
-
yield @builder if block_given?
|
|
231
|
-
self
|
|
232
|
-
end
|
|
233
|
-
def new
|
|
234
|
-
New.new @builder
|
|
235
|
-
end
|
|
236
|
-
end
|
|
237
|
-
class New < CommandBase
|
|
238
|
-
def initialize(builder)
|
|
239
|
-
super builder
|
|
240
|
-
@builder.append ' new'
|
|
241
|
-
end
|
|
242
|
-
def name(rule_name)
|
|
243
|
-
@builder.append " name=#{@builder.format rule_name}"
|
|
244
|
-
yield @builder if block_given?
|
|
245
|
-
self
|
|
246
|
-
end
|
|
247
|
-
def dir(direction)
|
|
248
|
-
@builder.append " dir=#{@builder.format direction}"
|
|
249
|
-
yield @builder if block_given?
|
|
250
|
-
self
|
|
251
|
-
end
|
|
252
|
-
def program(path)
|
|
253
|
-
@builder.append " program=#{@builder.format path}"
|
|
254
|
-
yield @builder if block_given?
|
|
255
|
-
self
|
|
256
|
-
end
|
|
257
|
-
def service(service_short_name)
|
|
258
|
-
@builder.append " service=#{@builder.format service_short_name}"
|
|
259
|
-
yield @builder if block_given?
|
|
260
|
-
self
|
|
261
|
-
end
|
|
262
|
-
def action(action)
|
|
263
|
-
@builder.append " action=#{@builder.format action}"
|
|
264
|
-
yield @builder if block_given?
|
|
265
|
-
self
|
|
266
|
-
end
|
|
267
|
-
def description(rule_description)
|
|
268
|
-
@builder.append " description=#{@builder.format rule_description}"
|
|
269
|
-
yield @builder if block_given?
|
|
270
|
-
self
|
|
271
|
-
end
|
|
272
|
-
def enable(enable)
|
|
273
|
-
@builder.append " enable=#{@builder.format enable}"
|
|
274
|
-
yield @builder if block_given?
|
|
275
|
-
self
|
|
276
|
-
end
|
|
277
|
-
def profile(profile)
|
|
278
|
-
@builder.append " profile=#{@builder.format profile}"
|
|
279
|
-
yield @builder if block_given?
|
|
280
|
-
self
|
|
281
|
-
end
|
|
282
|
-
def local_ip(address)
|
|
283
|
-
@builder.append " localIp=#{@builder.format address, ','}"
|
|
284
|
-
yield @builder if block_given?
|
|
285
|
-
self
|
|
286
|
-
end
|
|
287
|
-
def remote_ip(address)
|
|
288
|
-
@builder.append " remoteIp=#{@builder.format address, ','}"
|
|
289
|
-
yield @builder if block_given?
|
|
290
|
-
self
|
|
291
|
-
end
|
|
292
|
-
def local_port(port)
|
|
293
|
-
@builder.append " localPort=#{@builder.format port, ','}"
|
|
294
|
-
yield @builder if block_given?
|
|
295
|
-
self
|
|
296
|
-
end
|
|
297
|
-
def remote_port(port)
|
|
298
|
-
@builder.append " remotePort=#{@builder.format port, ','}"
|
|
299
|
-
yield @builder if block_given?
|
|
300
|
-
self
|
|
301
|
-
end
|
|
302
|
-
def protocol(protocol)
|
|
303
|
-
@builder.append " protocol=#{@builder.format protocol}"
|
|
304
|
-
yield @builder if block_given?
|
|
305
|
-
self
|
|
306
|
-
end
|
|
307
|
-
def interface_type(type)
|
|
308
|
-
@builder.append " interfaceType=#{@builder.format type}"
|
|
309
|
-
yield @builder if block_given?
|
|
310
|
-
self
|
|
311
|
-
end
|
|
312
|
-
def remote_computer_group(sddl_string)
|
|
313
|
-
@builder.append " rmtcomputergrp=#{@builder.format sddl_string}"
|
|
314
|
-
yield @builder if block_given?
|
|
315
|
-
self
|
|
316
|
-
end
|
|
317
|
-
def remote_user_group(sddl_string)
|
|
318
|
-
@builder.append " rmtusgrp=#{@builder.format sddl_string}"
|
|
319
|
-
yield @builder if block_given?
|
|
320
|
-
self
|
|
321
|
-
end
|
|
322
|
-
def edge(edge)
|
|
323
|
-
@builder.append " edge=#{@builder.format edge}"
|
|
324
|
-
yield @builder if block_given?
|
|
325
|
-
self
|
|
326
|
-
end
|
|
327
|
-
def security(security)
|
|
328
|
-
@builder.append " security=#{@builder.format security}"
|
|
329
|
-
yield @builder if block_given?
|
|
330
|
-
self
|
|
331
|
-
end
|
|
332
|
-
end
|
|
333
|
-
class ShowRule < CommandBase
|
|
334
|
-
def initialize(builder, rule_name)
|
|
335
|
-
super builder
|
|
336
|
-
@builder.append " show rule name=#{@builder.format rule_name}"
|
|
337
|
-
end
|
|
338
|
-
def profile(profile)
|
|
339
|
-
@builder.append " profile=#{@builder.format profile}"
|
|
340
|
-
yield @builder if block_given?
|
|
341
|
-
self
|
|
342
|
-
end
|
|
343
|
-
def type(type)
|
|
344
|
-
@builder.append " type=#{@builder.format type}"
|
|
345
|
-
yield @builder if block_given?
|
|
346
|
-
self
|
|
347
|
-
end
|
|
348
|
-
def verbose
|
|
349
|
-
@builder.append ' verbose'
|
|
350
|
-
yield @builder if block_given?
|
|
351
|
-
self
|
|
352
|
-
end
|
|
353
|
-
end
|
|
354
|
-
class Http < CommandBase
|
|
355
|
-
def initialize(builder)
|
|
356
|
-
super builder
|
|
357
|
-
@builder.append ' http'
|
|
358
|
-
end
|
|
359
|
-
def add_url_acl(url)
|
|
360
|
-
AddUrlAcl.new @builder, url
|
|
361
|
-
end
|
|
362
|
-
def delete_url_acl(url)
|
|
363
|
-
@builder.append " delete urlacl url=#{@builder.format url}"
|
|
364
|
-
yield @builder if block_given?
|
|
365
|
-
self
|
|
366
|
-
end
|
|
367
|
-
end
|
|
368
|
-
class AddUrlAcl < CommandBase
|
|
369
|
-
def initialize(builder, url)
|
|
370
|
-
super builder
|
|
371
|
-
@builder.append " add urlacl url=#{@builder.format url}"
|
|
372
|
-
end
|
|
373
|
-
def user(user)
|
|
374
|
-
@builder.append " user=#{@builder.format user}"
|
|
375
|
-
yield @builder if block_given?
|
|
376
|
-
self
|
|
377
|
-
end
|
|
378
|
-
def listen(listen)
|
|
379
|
-
@builder.append " listen=#{@builder.format listen}"
|
|
380
|
-
yield @builder if block_given?
|
|
381
|
-
self
|
|
382
|
-
end
|
|
383
|
-
def delegate(delegate)
|
|
384
|
-
@builder.append " delegate=#{@builder.format delegate}"
|
|
385
|
-
yield @builder if block_given?
|
|
386
|
-
self
|
|
387
|
-
end
|
|
388
|
-
def sddl(sddl)
|
|
389
|
-
@builder.append " sddl=#{@builder.format sddl}"
|
|
390
|
-
yield @builder if block_given?
|
|
391
|
-
self
|
|
392
|
-
end
|
|
393
|
-
end
|
|
394
|
-
def netsh
|
|
395
|
-
builder = CommandBuilder.new COMMAND_NAME
|
|
396
|
-
command = Netsh.new builder
|
|
397
|
-
yield builder if block_given?
|
|
398
|
-
command
|
|
399
|
-
end
|
|
400
|
-
end
|
|
401
|
-
end
|
|
402
|
-
def netsh_2008
|
|
403
|
-
builder = CommandBuilder.new Netsh::V2008::COMMAND_NAME
|
|
404
|
-
command = Netsh::V2008::Netsh.new builder
|
|
405
|
-
yield builder if block_given?
|
|
406
|
-
command
|
|
407
|
-
end
|
|
408
|
-
end
|