fluent_command_builder 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fluent_command_builder.rb +3 -0
- data/lib/fluent_command_builder/command_base.rb +21 -10
- data/lib/fluent_command_builder/command_builders/appcfg_python.rb +1 -1
- data/lib/fluent_command_builder/command_builders/appcfg_python_16.rb +995 -994
- data/lib/fluent_command_builder/command_builders/appcfg_python_17.rb +991 -990
- data/lib/fluent_command_builder/command_builders/aspnet_compiler.rb +1 -1
- data/lib/fluent_command_builder/command_builders/aspnet_compiler_20.rb +30 -29
- data/lib/fluent_command_builder/command_builders/aspnet_compiler_40.rb +30 -29
- data/lib/fluent_command_builder/command_builders/bundle.rb +1 -1
- data/lib/fluent_command_builder/command_builders/bundle_11.rb +102 -101
- data/lib/fluent_command_builder/command_builders/cucumber.rb +1 -1
- data/lib/fluent_command_builder/command_builders/cucumber_11.rb +60 -59
- data/lib/fluent_command_builder/command_builders/cucumber_12.rb +62 -61
- data/lib/fluent_command_builder/command_builders/dev_appserver_python.rb +1 -1
- data/lib/fluent_command_builder/command_builders/dev_appserver_python_16.rb +72 -71
- data/lib/fluent_command_builder/command_builders/dev_appserver_python_17.rb +72 -71
- data/lib/fluent_command_builder/command_builders/dotcover.rb +1 -1
- data/lib/fluent_command_builder/command_builders/dotcover_10.rb +17 -16
- data/lib/fluent_command_builder/command_builders/dotcover_11.rb +101 -100
- data/lib/fluent_command_builder/command_builders/dotcover_12.rb +101 -100
- data/lib/fluent_command_builder/command_builders/dotcover_20.rb +105 -104
- data/lib/fluent_command_builder/command_builders/installutil.rb +1 -1
- data/lib/fluent_command_builder/command_builders/installutil_11.rb +15 -14
- data/lib/fluent_command_builder/command_builders/installutil_20.rb +17 -16
- data/lib/fluent_command_builder/command_builders/installutil_35.rb +17 -16
- data/lib/fluent_command_builder/command_builders/installutil_40.rb +20 -19
- data/lib/fluent_command_builder/command_builders/msbuild.rb +1 -1
- data/lib/fluent_command_builder/command_builders/msbuild_20.rb +27 -26
- data/lib/fluent_command_builder/command_builders/msbuild_30.rb +27 -26
- data/lib/fluent_command_builder/command_builders/msbuild_35.rb +43 -42
- data/lib/fluent_command_builder/command_builders/msbuild_40.rb +46 -45
- data/lib/fluent_command_builder/command_builders/msdeploy.rb +1 -1
- data/lib/fluent_command_builder/command_builders/msdeploy_71.rb +61 -60
- data/lib/fluent_command_builder/command_builders/mstest.rb +1 -1
- data/lib/fluent_command_builder/command_builders/mstest_100.rb +41 -40
- data/lib/fluent_command_builder/command_builders/mstest_80.rb +33 -32
- data/lib/fluent_command_builder/command_builders/mstest_90.rb +35 -34
- data/lib/fluent_command_builder/command_builders/netsh.rb +1 -1
- data/lib/fluent_command_builder/command_builders/netsh_61.rb +139 -138
- data/lib/fluent_command_builder/command_builders/nuget.rb +17 -0
- data/lib/fluent_command_builder/command_builders/nuget_20.rb +433 -0
- data/lib/fluent_command_builder/command_builders/nunit.rb +1 -1
- data/lib/fluent_command_builder/command_builders/nunit_25.rb +50 -49
- data/lib/fluent_command_builder/command_builders/nunit_26.rb +66 -65
- data/lib/fluent_command_builder/command_builders/rake.rb +1 -1
- data/lib/fluent_command_builder/command_builders/rake_09.rb +48 -47
- data/lib/fluent_command_builder/command_builders/security_osx.rb +1 -1
- data/lib/fluent_command_builder/command_builders/security_osx_107.rb +55 -54
- data/lib/fluent_command_builder/command_builders/sevenzip.rb +1 -1
- data/lib/fluent_command_builder/command_builders/sevenzip_92.rb +211 -210
- data/lib/fluent_command_builder/command_builders/simian.rb +1 -1
- data/lib/fluent_command_builder/command_builders/simian_23.rb +47 -46
- data/lib/fluent_command_builder/command_builders/team_foundation.rb +1 -1
- data/lib/fluent_command_builder/command_builders/team_foundation_100.rb +822 -821
- data/lib/fluent_command_builder/command_builders/team_foundation_tee.rb +1 -1
- data/lib/fluent_command_builder/command_builders/team_foundation_tee_100.rb +744 -743
- data/lib/fluent_command_builder/command_builders/xcodebuild.rb +1 -1
- data/lib/fluent_command_builder/command_builders/xcodebuild_43.rb +103 -87
- data/lib/fluent_command_builder/command_builders/xcodebuild_44.rb +123 -107
- data/lib/fluent_command_builder/executor.rb +44 -0
- data/lib/fluent_command_builder/executors/backticks_executor.rb +7 -0
- data/lib/fluent_command_builder/executors/dry_run_executor.rb +7 -0
- data/lib/fluent_command_builder/executors/rake_sh_executor.rb +10 -0
- data/lib/fluent_command_builder/executors/system_executor.rb +7 -0
- data/lib/fluent_command_builder/path_finder.rb +20 -0
- data/lib/fluent_command_builder/path_finders/unix_path_finder.rb +13 -0
- data/lib/fluent_command_builder/path_finders/windows_path_finder.rb +14 -0
- data/lib/fluent_command_builder/underlying_builder.rb +75 -59
- data/lib/fluent_command_builder/version.rb +40 -0
- data/lib/fluent_command_builder/version_detectors/lib/appengine_python_version_detector.rb +1 -2
- data/lib/fluent_command_builder/version_detectors/lib/standard_version_detector.rb +13 -13
- data/lib/fluent_command_builder/version_validator.rb +37 -0
- metadata +16 -7
- data/lib/command_version_detector.rb +0 -1
- data/lib/fluent_command_builder/util.rb +0 -18
- data/lib/fluent_command_builder/version_detectors/lib/path_finder.rb +0 -43
@@ -7,6 +7,7 @@ module FluentCommandBuilder
|
|
7
7
|
end
|
8
8
|
module SecurityOSX
|
9
9
|
module V107
|
10
|
+
VERSION = '10.7'
|
10
11
|
def self.create
|
11
12
|
b = UnderlyingBuilder.new FluentCommandBuilder::SecurityOSX::COMMAND_NAME
|
12
13
|
c = SecurityOSX.new(b)
|
@@ -21,154 +22,154 @@ module FluentCommandBuilder
|
|
21
22
|
super underlying_builder
|
22
23
|
end
|
23
24
|
def delete_certificate
|
24
|
-
DeleteCertificate.new b
|
25
|
+
DeleteCertificate.new @b
|
25
26
|
end
|
26
27
|
def find_certificate
|
27
|
-
FindCertificate.new b
|
28
|
+
FindCertificate.new @b
|
28
29
|
end
|
29
30
|
def import(input_file)
|
30
|
-
Import.new b, input_file
|
31
|
+
Import.new @b, input_file
|
31
32
|
end
|
32
33
|
def unlock_keychain
|
33
|
-
UnlockKeychain.new b
|
34
|
+
UnlockKeychain.new @b
|
34
35
|
end
|
35
36
|
end
|
36
37
|
class DeleteCertificate < CommandBase
|
37
38
|
def initialize(underlying_builder)
|
38
39
|
super underlying_builder
|
39
|
-
b.append ' delete-certificate'
|
40
|
+
@b.append ' delete-certificate'
|
40
41
|
end
|
41
42
|
def common_name(name)
|
42
|
-
b.append " -c #{b.format name}"
|
43
|
-
yield b if block_given?
|
43
|
+
@b.append " -c #{@b.format name}"
|
44
|
+
yield @b if block_given?
|
44
45
|
self
|
45
46
|
end
|
46
47
|
def hash(hash)
|
47
|
-
b.append " -Z #{b.format hash}"
|
48
|
-
yield b if block_given?
|
48
|
+
@b.append " -Z #{@b.format hash}"
|
49
|
+
yield @b if block_given?
|
49
50
|
self
|
50
51
|
end
|
51
52
|
def delete_user_trust_settings
|
52
|
-
b.append ' -t'
|
53
|
-
yield b if block_given?
|
53
|
+
@b.append ' -t'
|
54
|
+
yield @b if block_given?
|
54
55
|
self
|
55
56
|
end
|
56
57
|
def keychain(keychain)
|
57
|
-
b.append " #{b.format keychain}"
|
58
|
-
yield b if block_given?
|
58
|
+
@b.append " #{@b.format keychain}"
|
59
|
+
yield @b if block_given?
|
59
60
|
self
|
60
61
|
end
|
61
62
|
end
|
62
63
|
class FindCertificate < CommandBase
|
63
64
|
def initialize(underlying_builder)
|
64
65
|
super underlying_builder
|
65
|
-
b.append ' find-certificate'
|
66
|
+
@b.append ' find-certificate'
|
66
67
|
end
|
67
68
|
def all
|
68
|
-
b.append ' -a'
|
69
|
-
yield b if block_given?
|
69
|
+
@b.append ' -a'
|
70
|
+
yield @b if block_given?
|
70
71
|
self
|
71
72
|
end
|
72
73
|
def name(name)
|
73
|
-
b.append " -c #{b.format name}"
|
74
|
-
yield b if block_given?
|
74
|
+
@b.append " -c #{@b.format name}"
|
75
|
+
yield @b if block_given?
|
75
76
|
self
|
76
77
|
end
|
77
78
|
def email_address(email_address)
|
78
|
-
b.append " -e #{b.format email_address}"
|
79
|
-
yield b if block_given?
|
79
|
+
@b.append " -e #{@b.format email_address}"
|
80
|
+
yield @b if block_given?
|
80
81
|
self
|
81
82
|
end
|
82
83
|
def show_email_addresses
|
83
|
-
b.append ' -m'
|
84
|
-
yield b if block_given?
|
84
|
+
@b.append ' -m'
|
85
|
+
yield @b if block_given?
|
85
86
|
self
|
86
87
|
end
|
87
88
|
def output_pem_format
|
88
|
-
b.append ' -p'
|
89
|
-
yield b if block_given?
|
89
|
+
@b.append ' -p'
|
90
|
+
yield @b if block_given?
|
90
91
|
self
|
91
92
|
end
|
92
93
|
def print_sha1_hash
|
93
|
-
b.append ' -Z'
|
94
|
-
yield b if block_given?
|
94
|
+
@b.append ' -Z'
|
95
|
+
yield @b if block_given?
|
95
96
|
self
|
96
97
|
end
|
97
98
|
def keychain(keychain)
|
98
|
-
b.append " #{b.format keychain}"
|
99
|
-
yield b if block_given?
|
99
|
+
@b.append " #{@b.format keychain}"
|
100
|
+
yield @b if block_given?
|
100
101
|
self
|
101
102
|
end
|
102
103
|
end
|
103
104
|
class Import < CommandBase
|
104
105
|
def initialize(underlying_builder, input_file)
|
105
106
|
super underlying_builder
|
106
|
-
b.append " import #{b.format input_file}"
|
107
|
+
@b.append " import #{@b.format input_file}"
|
107
108
|
end
|
108
109
|
def keychain(keychain)
|
109
|
-
b.append " -k #{b.format keychain}"
|
110
|
-
yield b if block_given?
|
110
|
+
@b.append " -k #{@b.format keychain}"
|
111
|
+
yield @b if block_given?
|
111
112
|
self
|
112
113
|
end
|
113
114
|
def type(type)
|
114
|
-
b.append " -t #{b.format type}"
|
115
|
-
yield b if block_given?
|
115
|
+
@b.append " -t #{@b.format type}"
|
116
|
+
yield @b if block_given?
|
116
117
|
self
|
117
118
|
end
|
118
119
|
def format(format)
|
119
|
-
b.append " -f #{b.format format}"
|
120
|
-
yield b if block_given?
|
120
|
+
@b.append " -f #{@b.format format}"
|
121
|
+
yield @b if block_given?
|
121
122
|
self
|
122
123
|
end
|
123
124
|
def wrapped
|
124
|
-
b.append ' -w'
|
125
|
-
yield b if block_given?
|
125
|
+
@b.append ' -w'
|
126
|
+
yield @b if block_given?
|
126
127
|
self
|
127
128
|
end
|
128
129
|
def not_extractable
|
129
|
-
b.append ' -x'
|
130
|
-
yield b if block_given?
|
130
|
+
@b.append ' -x'
|
131
|
+
yield @b if block_given?
|
131
132
|
self
|
132
133
|
end
|
133
134
|
def passphrase(passphrase)
|
134
|
-
b.append " -P #{b.format passphrase}"
|
135
|
-
yield b if block_given?
|
135
|
+
@b.append " -P #{@b.format passphrase}"
|
136
|
+
yield @b if block_given?
|
136
137
|
self
|
137
138
|
end
|
138
139
|
def attribute(name, value)
|
139
|
-
b.append " -a #{b.format name} #{b.format value}"
|
140
|
-
yield b if block_given?
|
140
|
+
@b.append " -a #{@b.format name} #{@b.format value}"
|
141
|
+
yield @b if block_given?
|
141
142
|
self
|
142
143
|
end
|
143
144
|
def allow_without_warning
|
144
|
-
b.append ' -A'
|
145
|
-
yield b if block_given?
|
145
|
+
@b.append ' -A'
|
146
|
+
yield @b if block_given?
|
146
147
|
self
|
147
148
|
end
|
148
149
|
def allow_application(app_path)
|
149
|
-
b.append " -T #{b.format app_path}"
|
150
|
-
yield b if block_given?
|
150
|
+
@b.append " -T #{@b.format app_path}"
|
151
|
+
yield @b if block_given?
|
151
152
|
self
|
152
153
|
end
|
153
154
|
end
|
154
155
|
class UnlockKeychain < CommandBase
|
155
156
|
def initialize(underlying_builder)
|
156
157
|
super underlying_builder
|
157
|
-
b.append ' unlock-keychain'
|
158
|
+
@b.append ' unlock-keychain'
|
158
159
|
end
|
159
160
|
def no_password
|
160
|
-
b.append ' -u'
|
161
|
-
yield b if block_given?
|
161
|
+
@b.append ' -u'
|
162
|
+
yield @b if block_given?
|
162
163
|
self
|
163
164
|
end
|
164
165
|
def password(password)
|
165
|
-
b.append " -p #{b.format password}"
|
166
|
-
yield b if block_given?
|
166
|
+
@b.append " -p #{@b.format password}"
|
167
|
+
yield @b if block_given?
|
167
168
|
self
|
168
169
|
end
|
169
170
|
def keychain(keychain)
|
170
|
-
b.append " #{b.format keychain}"
|
171
|
-
yield b if block_given?
|
171
|
+
@b.append " #{@b.format keychain}"
|
172
|
+
yield @b if block_given?
|
172
173
|
self
|
173
174
|
end
|
174
175
|
end
|
@@ -7,6 +7,7 @@ module FluentCommandBuilder
|
|
7
7
|
end
|
8
8
|
module SevenZip
|
9
9
|
module V92
|
10
|
+
VERSION = '9.2'
|
10
11
|
def self.create
|
11
12
|
b = UnderlyingBuilder.new FluentCommandBuilder::SevenZip::COMMAND_NAME
|
12
13
|
c = SevenZip.new(b)
|
@@ -21,494 +22,494 @@ module FluentCommandBuilder
|
|
21
22
|
super underlying_builder
|
22
23
|
end
|
23
24
|
def add(archive, file_ref)
|
24
|
-
Add.new b, archive, file_ref
|
25
|
+
Add.new @b, archive, file_ref
|
25
26
|
end
|
26
27
|
def bench(number_of_iterations)
|
27
|
-
Bench.new b, number_of_iterations
|
28
|
+
Bench.new @b, number_of_iterations
|
28
29
|
end
|
29
30
|
def delete(archive, files)
|
30
|
-
Delete.new b, archive, files
|
31
|
+
Delete.new @b, archive, files
|
31
32
|
end
|
32
33
|
def extract(archive, files)
|
33
|
-
Extract.new b, archive, files
|
34
|
+
Extract.new @b, archive, files
|
34
35
|
end
|
35
36
|
def list(archive)
|
36
|
-
List.new b, archive
|
37
|
+
List.new @b, archive
|
37
38
|
end
|
38
39
|
def test(archive, files)
|
39
|
-
Test.new b, archive, files
|
40
|
+
Test.new @b, archive, files
|
40
41
|
end
|
41
42
|
def update(archive, files)
|
42
|
-
Update.new b, archive, files
|
43
|
+
Update.new @b, archive, files
|
43
44
|
end
|
44
45
|
def extract_with_full_paths(archive, files=nil)
|
45
|
-
ExtractWithFullPaths.new b, archive, files
|
46
|
+
ExtractWithFullPaths.new @b, archive, files
|
46
47
|
end
|
47
48
|
end
|
48
49
|
class Add < CommandBase
|
49
50
|
def initialize(underlying_builder, archive, file_ref)
|
50
51
|
super underlying_builder
|
51
|
-
b.append " a #{b.format archive} #{b.format file_ref}"
|
52
|
+
@b.append " a #{@b.format archive} #{@b.format file_ref}"
|
52
53
|
end
|
53
54
|
def include(file_ref, recurse_type=nil)
|
54
|
-
b.append ' -i'
|
55
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
56
|
-
b.append "#{b.format file_ref}"
|
57
|
-
yield b if block_given?
|
55
|
+
@b.append ' -i'
|
56
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
57
|
+
@b.append "#{@b.format file_ref}"
|
58
|
+
yield @b if block_given?
|
58
59
|
self
|
59
60
|
end
|
60
61
|
def set_compression_method(method_parameters)
|
61
|
-
b.append " -m#{b.format method_parameters}"
|
62
|
-
yield b if block_given?
|
62
|
+
@b.append " -m#{@b.format method_parameters}"
|
63
|
+
yield @b if block_given?
|
63
64
|
self
|
64
65
|
end
|
65
66
|
def password(password)
|
66
|
-
b.append " -p#{b.format password}"
|
67
|
-
yield b if block_given?
|
67
|
+
@b.append " -p#{@b.format password}"
|
68
|
+
yield @b if block_given?
|
68
69
|
self
|
69
70
|
end
|
70
71
|
def recursive(modifier=nil)
|
71
|
-
b.append ' -r'
|
72
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
73
|
-
yield b if block_given?
|
72
|
+
@b.append ' -r'
|
73
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
74
|
+
yield @b if block_given?
|
74
75
|
self
|
75
76
|
end
|
76
77
|
def create_sfx_archive(sfx_module=nil)
|
77
|
-
b.append ' -sfx'
|
78
|
-
b.append "#{b.format sfx_module}" unless sfx_module.nil?
|
79
|
-
yield b if block_given?
|
78
|
+
@b.append ' -sfx'
|
79
|
+
@b.append "#{@b.format sfx_module}" unless sfx_module.nil?
|
80
|
+
yield @b if block_given?
|
80
81
|
self
|
81
82
|
end
|
82
83
|
def read_data_from_stdin(file_name=nil)
|
83
|
-
b.append ' -si'
|
84
|
-
b.append "#{b.format file_name}" unless file_name.nil?
|
85
|
-
yield b if block_given?
|
84
|
+
@b.append ' -si'
|
85
|
+
@b.append "#{@b.format file_name}" unless file_name.nil?
|
86
|
+
yield @b if block_given?
|
86
87
|
self
|
87
88
|
end
|
88
89
|
def write_data_to_stdout
|
89
|
-
b.append ' -so'
|
90
|
-
yield b if block_given?
|
90
|
+
@b.append ' -so'
|
91
|
+
yield @b if block_given?
|
91
92
|
self
|
92
93
|
end
|
93
94
|
def compress_files_open_for_writing
|
94
|
-
b.append ' -ssw'
|
95
|
-
yield b if block_given?
|
95
|
+
@b.append ' -ssw'
|
96
|
+
yield @b if block_given?
|
96
97
|
self
|
97
98
|
end
|
98
99
|
def type(archive_type)
|
99
|
-
b.append " -t#{b.format archive_type}"
|
100
|
-
yield b if block_given?
|
100
|
+
@b.append " -t#{@b.format archive_type}"
|
101
|
+
yield @b if block_given?
|
101
102
|
self
|
102
103
|
end
|
103
104
|
def update_options(args)
|
104
|
-
b.append " -u#{b.format args}"
|
105
|
-
yield b if block_given?
|
105
|
+
@b.append " -u#{@b.format args}"
|
106
|
+
yield @b if block_given?
|
106
107
|
self
|
107
108
|
end
|
108
109
|
def create_volumes(size, unit_of_measure=nil)
|
109
|
-
b.append " -v#{b.format size}"
|
110
|
-
b.append "#{b.format unit_of_measure}" unless unit_of_measure.nil?
|
111
|
-
yield b if block_given?
|
110
|
+
@b.append " -v#{@b.format size}"
|
111
|
+
@b.append "#{@b.format unit_of_measure}" unless unit_of_measure.nil?
|
112
|
+
yield @b if block_given?
|
112
113
|
self
|
113
114
|
end
|
114
115
|
def working_dir(dir_path=nil)
|
115
|
-
b.append ' -w'
|
116
|
-
b.append "#{b.format dir_path}" unless dir_path.nil?
|
117
|
-
yield b if block_given?
|
116
|
+
@b.append ' -w'
|
117
|
+
@b.append "#{@b.format dir_path}" unless dir_path.nil?
|
118
|
+
yield @b if block_given?
|
118
119
|
self
|
119
120
|
end
|
120
121
|
def exclude(file_ref, recurse_type=nil)
|
121
|
-
b.append ' -x'
|
122
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
123
|
-
b.append "#{b.format file_ref}"
|
124
|
-
yield b if block_given?
|
122
|
+
@b.append ' -x'
|
123
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
124
|
+
@b.append "#{@b.format file_ref}"
|
125
|
+
yield @b if block_given?
|
125
126
|
self
|
126
127
|
end
|
127
128
|
end
|
128
129
|
class Bench < CommandBase
|
129
130
|
def initialize(underlying_builder, number_of_iterations)
|
130
131
|
super underlying_builder
|
131
|
-
b.append " b #{b.format number_of_iterations}"
|
132
|
+
@b.append " b #{@b.format number_of_iterations}"
|
132
133
|
end
|
133
134
|
def mmt(n)
|
134
|
-
b.append " -mmt#{b.format n}"
|
135
|
-
yield b if block_given?
|
135
|
+
@b.append " -mmt#{@b.format n}"
|
136
|
+
yield @b if block_given?
|
136
137
|
self
|
137
138
|
end
|
138
139
|
def md(n)
|
139
|
-
b.append " -md#{b.format n}"
|
140
|
-
yield b if block_given?
|
140
|
+
@b.append " -md#{@b.format n}"
|
141
|
+
yield @b if block_given?
|
141
142
|
self
|
142
143
|
end
|
143
144
|
def mm(method)
|
144
|
-
b.append " -mm=#{b.format method}"
|
145
|
-
yield b if block_given?
|
145
|
+
@b.append " -mm=#{@b.format method}"
|
146
|
+
yield @b if block_given?
|
146
147
|
self
|
147
148
|
end
|
148
149
|
end
|
149
150
|
class Delete < CommandBase
|
150
151
|
def initialize(underlying_builder, archive, files)
|
151
152
|
super underlying_builder
|
152
|
-
b.append " d #{b.format archive} #{b.format files}"
|
153
|
+
@b.append " d #{@b.format archive} #{@b.format files}"
|
153
154
|
end
|
154
155
|
def include(file_ref, recurse_type=nil)
|
155
|
-
b.append ' -i'
|
156
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
157
|
-
b.append "#{b.format file_ref}"
|
158
|
-
yield b if block_given?
|
156
|
+
@b.append ' -i'
|
157
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
158
|
+
@b.append "#{@b.format file_ref}"
|
159
|
+
yield @b if block_given?
|
159
160
|
self
|
160
161
|
end
|
161
162
|
def set_compression_method(method_parameters)
|
162
|
-
b.append " -m#{b.format method_parameters}"
|
163
|
-
yield b if block_given?
|
163
|
+
@b.append " -m#{@b.format method_parameters}"
|
164
|
+
yield @b if block_given?
|
164
165
|
self
|
165
166
|
end
|
166
167
|
def password(password)
|
167
|
-
b.append " -p#{b.format password}"
|
168
|
-
yield b if block_given?
|
168
|
+
@b.append " -p#{@b.format password}"
|
169
|
+
yield @b if block_given?
|
169
170
|
self
|
170
171
|
end
|
171
172
|
def recursive(modifier=nil)
|
172
|
-
b.append ' -r'
|
173
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
174
|
-
yield b if block_given?
|
173
|
+
@b.append ' -r'
|
174
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
175
|
+
yield @b if block_given?
|
175
176
|
self
|
176
177
|
end
|
177
178
|
def update_options(args)
|
178
|
-
b.append " -u#{b.format args}"
|
179
|
-
yield b if block_given?
|
179
|
+
@b.append " -u#{@b.format args}"
|
180
|
+
yield @b if block_given?
|
180
181
|
self
|
181
182
|
end
|
182
183
|
def working_dir(dir_path=nil)
|
183
|
-
b.append ' -w'
|
184
|
-
b.append "#{b.format dir_path}" unless dir_path.nil?
|
185
|
-
yield b if block_given?
|
184
|
+
@b.append ' -w'
|
185
|
+
@b.append "#{@b.format dir_path}" unless dir_path.nil?
|
186
|
+
yield @b if block_given?
|
186
187
|
self
|
187
188
|
end
|
188
189
|
def exclude(file_ref, recurse_type=nil)
|
189
|
-
b.append ' -x'
|
190
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
191
|
-
b.append "#{b.format file_ref}"
|
192
|
-
yield b if block_given?
|
190
|
+
@b.append ' -x'
|
191
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
192
|
+
@b.append "#{@b.format file_ref}"
|
193
|
+
yield @b if block_given?
|
193
194
|
self
|
194
195
|
end
|
195
196
|
end
|
196
197
|
class Extract < CommandBase
|
197
198
|
def initialize(underlying_builder, archive, files)
|
198
199
|
super underlying_builder
|
199
|
-
b.append " e #{b.format archive} #{b.format files}"
|
200
|
+
@b.append " e #{@b.format archive} #{@b.format files}"
|
200
201
|
end
|
201
202
|
def ai
|
202
|
-
b.append ' -ai'
|
203
|
-
yield b if block_given?
|
203
|
+
@b.append ' -ai'
|
204
|
+
yield @b if block_given?
|
204
205
|
self
|
205
206
|
end
|
206
207
|
def an
|
207
|
-
b.append ' -an'
|
208
|
-
yield b if block_given?
|
208
|
+
@b.append ' -an'
|
209
|
+
yield @b if block_given?
|
209
210
|
self
|
210
211
|
end
|
211
212
|
def ao
|
212
|
-
b.append ' -ao'
|
213
|
-
yield b if block_given?
|
213
|
+
@b.append ' -ao'
|
214
|
+
yield @b if block_given?
|
214
215
|
self
|
215
216
|
end
|
216
217
|
def ax
|
217
|
-
b.append ' -ax'
|
218
|
-
yield b if block_given?
|
218
|
+
@b.append ' -ax'
|
219
|
+
yield @b if block_given?
|
219
220
|
self
|
220
221
|
end
|
221
222
|
def include(file_ref, recurse_type=nil)
|
222
|
-
b.append ' -i'
|
223
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
224
|
-
b.append "#{b.format file_ref}"
|
225
|
-
yield b if block_given?
|
223
|
+
@b.append ' -i'
|
224
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
225
|
+
@b.append "#{@b.format file_ref}"
|
226
|
+
yield @b if block_given?
|
226
227
|
self
|
227
228
|
end
|
228
229
|
def output(dir_path)
|
229
|
-
b.append " -o#{b.format dir_path}"
|
230
|
-
yield b if block_given?
|
230
|
+
@b.append " -o#{@b.format dir_path}"
|
231
|
+
yield @b if block_given?
|
231
232
|
self
|
232
233
|
end
|
233
234
|
def password(password)
|
234
|
-
b.append " -p#{b.format password}"
|
235
|
-
yield b if block_given?
|
235
|
+
@b.append " -p#{@b.format password}"
|
236
|
+
yield @b if block_given?
|
236
237
|
self
|
237
238
|
end
|
238
239
|
def recursive(modifier=nil)
|
239
|
-
b.append ' -r'
|
240
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
241
|
-
yield b if block_given?
|
240
|
+
@b.append ' -r'
|
241
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
242
|
+
yield @b if block_given?
|
242
243
|
self
|
243
244
|
end
|
244
245
|
def write_data_to_stdout
|
245
|
-
b.append ' -so'
|
246
|
-
yield b if block_given?
|
246
|
+
@b.append ' -so'
|
247
|
+
yield @b if block_given?
|
247
248
|
self
|
248
249
|
end
|
249
250
|
def type(archive_type)
|
250
|
-
b.append " -t#{b.format archive_type}"
|
251
|
-
yield b if block_given?
|
251
|
+
@b.append " -t#{@b.format archive_type}"
|
252
|
+
yield @b if block_given?
|
252
253
|
self
|
253
254
|
end
|
254
255
|
def exclude(file_ref, recurse_type=nil)
|
255
|
-
b.append ' -x'
|
256
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
257
|
-
b.append "#{b.format file_ref}"
|
258
|
-
yield b if block_given?
|
256
|
+
@b.append ' -x'
|
257
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
258
|
+
@b.append "#{@b.format file_ref}"
|
259
|
+
yield @b if block_given?
|
259
260
|
self
|
260
261
|
end
|
261
262
|
def y
|
262
|
-
b.append ' -y'
|
263
|
-
yield b if block_given?
|
263
|
+
@b.append ' -y'
|
264
|
+
yield @b if block_given?
|
264
265
|
self
|
265
266
|
end
|
266
267
|
end
|
267
268
|
class List < CommandBase
|
268
269
|
def initialize(underlying_builder, archive)
|
269
270
|
super underlying_builder
|
270
|
-
b.append " l #{b.format archive}"
|
271
|
+
@b.append " l #{@b.format archive}"
|
271
272
|
end
|
272
273
|
def ai
|
273
|
-
b.append ' -ai'
|
274
|
-
yield b if block_given?
|
274
|
+
@b.append ' -ai'
|
275
|
+
yield @b if block_given?
|
275
276
|
self
|
276
277
|
end
|
277
278
|
def an
|
278
|
-
b.append ' -an'
|
279
|
-
yield b if block_given?
|
279
|
+
@b.append ' -an'
|
280
|
+
yield @b if block_given?
|
280
281
|
self
|
281
282
|
end
|
282
283
|
def ax
|
283
|
-
b.append ' -ax'
|
284
|
-
yield b if block_given?
|
284
|
+
@b.append ' -ax'
|
285
|
+
yield @b if block_given?
|
285
286
|
self
|
286
287
|
end
|
287
288
|
def include(file_ref, recurse_type=nil)
|
288
|
-
b.append ' -i'
|
289
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
290
|
-
b.append "#{b.format file_ref}"
|
291
|
-
yield b if block_given?
|
289
|
+
@b.append ' -i'
|
290
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
291
|
+
@b.append "#{@b.format file_ref}"
|
292
|
+
yield @b if block_given?
|
292
293
|
self
|
293
294
|
end
|
294
295
|
def slt
|
295
|
-
b.append ' -slt'
|
296
|
-
yield b if block_given?
|
296
|
+
@b.append ' -slt'
|
297
|
+
yield @b if block_given?
|
297
298
|
self
|
298
299
|
end
|
299
300
|
def password(password)
|
300
|
-
b.append " -p#{b.format password}"
|
301
|
-
yield b if block_given?
|
301
|
+
@b.append " -p#{@b.format password}"
|
302
|
+
yield @b if block_given?
|
302
303
|
self
|
303
304
|
end
|
304
305
|
def recursive(modifier=nil)
|
305
|
-
b.append ' -r'
|
306
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
307
|
-
yield b if block_given?
|
306
|
+
@b.append ' -r'
|
307
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
308
|
+
yield @b if block_given?
|
308
309
|
self
|
309
310
|
end
|
310
311
|
def type(archive_type)
|
311
|
-
b.append " -t#{b.format archive_type}"
|
312
|
-
yield b if block_given?
|
312
|
+
@b.append " -t#{@b.format archive_type}"
|
313
|
+
yield @b if block_given?
|
313
314
|
self
|
314
315
|
end
|
315
316
|
def exclude(file_ref, recurse_type=nil)
|
316
|
-
b.append ' -x'
|
317
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
318
|
-
b.append "#{b.format file_ref}"
|
319
|
-
yield b if block_given?
|
317
|
+
@b.append ' -x'
|
318
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
319
|
+
@b.append "#{@b.format file_ref}"
|
320
|
+
yield @b if block_given?
|
320
321
|
self
|
321
322
|
end
|
322
323
|
end
|
323
324
|
class Test < CommandBase
|
324
325
|
def initialize(underlying_builder, archive, files)
|
325
326
|
super underlying_builder
|
326
|
-
b.append " t #{b.format archive} #{b.format files}"
|
327
|
+
@b.append " t #{@b.format archive} #{@b.format files}"
|
327
328
|
end
|
328
329
|
def ai
|
329
|
-
b.append ' -ai'
|
330
|
-
yield b if block_given?
|
330
|
+
@b.append ' -ai'
|
331
|
+
yield @b if block_given?
|
331
332
|
self
|
332
333
|
end
|
333
334
|
def an
|
334
|
-
b.append ' -an'
|
335
|
-
yield b if block_given?
|
335
|
+
@b.append ' -an'
|
336
|
+
yield @b if block_given?
|
336
337
|
self
|
337
338
|
end
|
338
339
|
def ax
|
339
|
-
b.append ' -ax'
|
340
|
-
yield b if block_given?
|
340
|
+
@b.append ' -ax'
|
341
|
+
yield @b if block_given?
|
341
342
|
self
|
342
343
|
end
|
343
344
|
def include(file_ref, recurse_type=nil)
|
344
|
-
b.append ' -i'
|
345
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
346
|
-
b.append "#{b.format file_ref}"
|
347
|
-
yield b if block_given?
|
345
|
+
@b.append ' -i'
|
346
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
347
|
+
@b.append "#{@b.format file_ref}"
|
348
|
+
yield @b if block_given?
|
348
349
|
self
|
349
350
|
end
|
350
351
|
def password(password)
|
351
|
-
b.append " -p#{b.format password}"
|
352
|
-
yield b if block_given?
|
352
|
+
@b.append " -p#{@b.format password}"
|
353
|
+
yield @b if block_given?
|
353
354
|
self
|
354
355
|
end
|
355
356
|
def recursive(modifier=nil)
|
356
|
-
b.append ' -r'
|
357
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
358
|
-
yield b if block_given?
|
357
|
+
@b.append ' -r'
|
358
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
359
|
+
yield @b if block_given?
|
359
360
|
self
|
360
361
|
end
|
361
362
|
def exclude(file_ref, recurse_type=nil)
|
362
|
-
b.append ' -x'
|
363
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
364
|
-
b.append "#{b.format file_ref}"
|
365
|
-
yield b if block_given?
|
363
|
+
@b.append ' -x'
|
364
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
365
|
+
@b.append "#{@b.format file_ref}"
|
366
|
+
yield @b if block_given?
|
366
367
|
self
|
367
368
|
end
|
368
369
|
end
|
369
370
|
class Update < CommandBase
|
370
371
|
def initialize(underlying_builder, archive, files)
|
371
372
|
super underlying_builder
|
372
|
-
b.append " u #{b.format archive} #{b.format files}"
|
373
|
+
@b.append " u #{@b.format archive} #{@b.format files}"
|
373
374
|
end
|
374
375
|
def include(file_ref, recurse_type=nil)
|
375
|
-
b.append ' -i'
|
376
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
377
|
-
b.append "#{b.format file_ref}"
|
378
|
-
yield b if block_given?
|
376
|
+
@b.append ' -i'
|
377
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
378
|
+
@b.append "#{@b.format file_ref}"
|
379
|
+
yield @b if block_given?
|
379
380
|
self
|
380
381
|
end
|
381
382
|
def set_compression_method(method_parameters)
|
382
|
-
b.append " -m#{b.format method_parameters}"
|
383
|
-
yield b if block_given?
|
383
|
+
@b.append " -m#{@b.format method_parameters}"
|
384
|
+
yield @b if block_given?
|
384
385
|
self
|
385
386
|
end
|
386
387
|
def password(password)
|
387
|
-
b.append " -p#{b.format password}"
|
388
|
-
yield b if block_given?
|
388
|
+
@b.append " -p#{@b.format password}"
|
389
|
+
yield @b if block_given?
|
389
390
|
self
|
390
391
|
end
|
391
392
|
def recursive(modifier=nil)
|
392
|
-
b.append ' -r'
|
393
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
394
|
-
yield b if block_given?
|
393
|
+
@b.append ' -r'
|
394
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
395
|
+
yield @b if block_given?
|
395
396
|
self
|
396
397
|
end
|
397
398
|
def create_sfx_archive(sfx_module=nil)
|
398
|
-
b.append ' -sfx'
|
399
|
-
b.append "#{b.format sfx_module}" unless sfx_module.nil?
|
400
|
-
yield b if block_given?
|
399
|
+
@b.append ' -sfx'
|
400
|
+
@b.append "#{@b.format sfx_module}" unless sfx_module.nil?
|
401
|
+
yield @b if block_given?
|
401
402
|
self
|
402
403
|
end
|
403
404
|
def read_data_from_stdin(file_name=nil)
|
404
|
-
b.append ' -si'
|
405
|
-
b.append "#{b.format file_name}" unless file_name.nil?
|
406
|
-
yield b if block_given?
|
405
|
+
@b.append ' -si'
|
406
|
+
@b.append "#{@b.format file_name}" unless file_name.nil?
|
407
|
+
yield @b if block_given?
|
407
408
|
self
|
408
409
|
end
|
409
410
|
def write_data_to_stdout
|
410
|
-
b.append ' -so'
|
411
|
-
yield b if block_given?
|
411
|
+
@b.append ' -so'
|
412
|
+
yield @b if block_given?
|
412
413
|
self
|
413
414
|
end
|
414
415
|
def compress_files_open_for_writing
|
415
|
-
b.append ' -ssw'
|
416
|
-
yield b if block_given?
|
416
|
+
@b.append ' -ssw'
|
417
|
+
yield @b if block_given?
|
417
418
|
self
|
418
419
|
end
|
419
420
|
def type(archive_type)
|
420
|
-
b.append " -t#{b.format archive_type}"
|
421
|
-
yield b if block_given?
|
421
|
+
@b.append " -t#{@b.format archive_type}"
|
422
|
+
yield @b if block_given?
|
422
423
|
self
|
423
424
|
end
|
424
425
|
def update_options(args)
|
425
|
-
b.append " -u#{b.format args}"
|
426
|
-
yield b if block_given?
|
426
|
+
@b.append " -u#{@b.format args}"
|
427
|
+
yield @b if block_given?
|
427
428
|
self
|
428
429
|
end
|
429
430
|
def working_dir(dir_path=nil)
|
430
|
-
b.append ' -w'
|
431
|
-
b.append "#{b.format dir_path}" unless dir_path.nil?
|
432
|
-
yield b if block_given?
|
431
|
+
@b.append ' -w'
|
432
|
+
@b.append "#{@b.format dir_path}" unless dir_path.nil?
|
433
|
+
yield @b if block_given?
|
433
434
|
self
|
434
435
|
end
|
435
436
|
def exclude(file_ref, recurse_type=nil)
|
436
|
-
b.append ' -x'
|
437
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
438
|
-
b.append "#{b.format file_ref}"
|
439
|
-
yield b if block_given?
|
437
|
+
@b.append ' -x'
|
438
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
439
|
+
@b.append "#{@b.format file_ref}"
|
440
|
+
yield @b if block_given?
|
440
441
|
self
|
441
442
|
end
|
442
443
|
end
|
443
444
|
class ExtractWithFullPaths < CommandBase
|
444
445
|
def initialize(underlying_builder, archive, files=nil)
|
445
446
|
super underlying_builder
|
446
|
-
b.append " x #{b.format archive}"
|
447
|
-
b.append " #{b.format files}" unless files.nil?
|
447
|
+
@b.append " x #{@b.format archive}"
|
448
|
+
@b.append " #{@b.format files}" unless files.nil?
|
448
449
|
end
|
449
450
|
def ai
|
450
|
-
b.append ' -ai'
|
451
|
-
yield b if block_given?
|
451
|
+
@b.append ' -ai'
|
452
|
+
yield @b if block_given?
|
452
453
|
self
|
453
454
|
end
|
454
455
|
def an
|
455
|
-
b.append ' -an'
|
456
|
-
yield b if block_given?
|
456
|
+
@b.append ' -an'
|
457
|
+
yield @b if block_given?
|
457
458
|
self
|
458
459
|
end
|
459
460
|
def ao
|
460
|
-
b.append ' -ao'
|
461
|
-
yield b if block_given?
|
461
|
+
@b.append ' -ao'
|
462
|
+
yield @b if block_given?
|
462
463
|
self
|
463
464
|
end
|
464
465
|
def ax
|
465
|
-
b.append ' -ax'
|
466
|
-
yield b if block_given?
|
466
|
+
@b.append ' -ax'
|
467
|
+
yield @b if block_given?
|
467
468
|
self
|
468
469
|
end
|
469
470
|
def include(file_ref, recurse_type=nil)
|
470
|
-
b.append ' -i'
|
471
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
472
|
-
b.append "#{b.format file_ref}"
|
473
|
-
yield b if block_given?
|
471
|
+
@b.append ' -i'
|
472
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
473
|
+
@b.append "#{@b.format file_ref}"
|
474
|
+
yield @b if block_given?
|
474
475
|
self
|
475
476
|
end
|
476
477
|
def output(dir_path)
|
477
|
-
b.append " -o#{b.format dir_path}"
|
478
|
-
yield b if block_given?
|
478
|
+
@b.append " -o#{@b.format dir_path}"
|
479
|
+
yield @b if block_given?
|
479
480
|
self
|
480
481
|
end
|
481
482
|
def password(password)
|
482
|
-
b.append " -p#{b.format password}"
|
483
|
-
yield b if block_given?
|
483
|
+
@b.append " -p#{@b.format password}"
|
484
|
+
yield @b if block_given?
|
484
485
|
self
|
485
486
|
end
|
486
487
|
def recursive(modifier=nil)
|
487
|
-
b.append ' -r'
|
488
|
-
b.append "#{b.format modifier}" unless modifier.nil?
|
489
|
-
yield b if block_given?
|
488
|
+
@b.append ' -r'
|
489
|
+
@b.append "#{@b.format modifier}" unless modifier.nil?
|
490
|
+
yield @b if block_given?
|
490
491
|
self
|
491
492
|
end
|
492
493
|
def write_data_to_stdout
|
493
|
-
b.append ' -so'
|
494
|
-
yield b if block_given?
|
494
|
+
@b.append ' -so'
|
495
|
+
yield @b if block_given?
|
495
496
|
self
|
496
497
|
end
|
497
498
|
def type(archive_type)
|
498
|
-
b.append " -t#{b.format archive_type}"
|
499
|
-
yield b if block_given?
|
499
|
+
@b.append " -t#{@b.format archive_type}"
|
500
|
+
yield @b if block_given?
|
500
501
|
self
|
501
502
|
end
|
502
503
|
def exclude(file_ref, recurse_type=nil)
|
503
|
-
b.append ' -x'
|
504
|
-
b.append "#{b.format recurse_type}" unless recurse_type.nil?
|
505
|
-
b.append "#{b.format file_ref}"
|
506
|
-
yield b if block_given?
|
504
|
+
@b.append ' -x'
|
505
|
+
@b.append "#{@b.format recurse_type}" unless recurse_type.nil?
|
506
|
+
@b.append "#{@b.format file_ref}"
|
507
|
+
yield @b if block_given?
|
507
508
|
self
|
508
509
|
end
|
509
510
|
def y
|
510
|
-
b.append ' -y'
|
511
|
-
yield b if block_given?
|
511
|
+
@b.append ' -y'
|
512
|
+
yield @b if block_given?
|
512
513
|
self
|
513
514
|
end
|
514
515
|
end
|