fluent_command_builder 0.9.7 → 0.9.8

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