fluent_command_builder 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,26 @@ module FluentCommandBuilder
|
|
28
28
|
@builder = builder
|
29
29
|
@builder.append ' advfirewall'
|
30
30
|
end
|
31
|
+
def firewall
|
32
|
+
Firewall.new @builder
|
33
|
+
end
|
34
|
+
def to_s
|
35
|
+
@builder.to_s
|
36
|
+
end
|
37
|
+
def execute
|
38
|
+
begin
|
39
|
+
require 'rake'
|
40
|
+
sh to_s
|
41
|
+
rescue LoadError
|
42
|
+
system to_s
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
class Firewall
|
47
|
+
def initialize builder
|
48
|
+
@builder = builder
|
49
|
+
@builder.append ' firewall'
|
50
|
+
end
|
31
51
|
def add_rule
|
32
52
|
AddRule.new @builder
|
33
53
|
end
|