fluent_command_builder 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fluent_command_builder.rb +1 -1
- data/lib/fluent_command_builder/command_builders/appcfg_python.rb +9 -1
- data/lib/fluent_command_builder/command_builders/aspnet_compiler.rb +9 -1
- data/lib/fluent_command_builder/command_builders/bundle.rb +9 -1
- data/lib/fluent_command_builder/command_builders/cucumber.rb +9 -1
- data/lib/fluent_command_builder/command_builders/dev_appserver_python.rb +9 -1
- data/lib/fluent_command_builder/command_builders/dotcover.rb +9 -1
- data/lib/fluent_command_builder/command_builders/installutil.rb +9 -1
- data/lib/fluent_command_builder/command_builders/msbuild.rb +9 -1
- data/lib/fluent_command_builder/command_builders/msdeploy.rb +9 -1
- data/lib/fluent_command_builder/command_builders/mstest.rb +9 -1
- data/lib/fluent_command_builder/command_builders/netsh.rb +9 -1
- data/lib/fluent_command_builder/command_builders/nuget.rb +9 -1
- data/lib/fluent_command_builder/command_builders/nunit.rb +9 -1
- data/lib/fluent_command_builder/command_builders/nunit_25.rb +23 -23
- data/lib/fluent_command_builder/command_builders/nunit_26.rb +31 -31
- data/lib/fluent_command_builder/command_builders/rake.rb +9 -1
- data/lib/fluent_command_builder/command_builders/security_osx.rb +9 -1
- data/lib/fluent_command_builder/command_builders/sevenzip.rb +9 -1
- data/lib/fluent_command_builder/command_builders/{sevenzip_92.rb → sevenzip_920.rb} +5 -5
- data/lib/fluent_command_builder/command_builders/simian.rb +9 -1
- data/lib/fluent_command_builder/command_builders/team_foundation.rb +9 -1
- data/lib/fluent_command_builder/command_builders/team_foundation_tee.rb +9 -1
- data/lib/fluent_command_builder/command_builders/team_foundation_tee_100.rb +5 -118
- data/lib/fluent_command_builder/command_builders/team_foundation_tee_101.rb +5 -0
- data/lib/fluent_command_builder/command_builders/xcodebuild.rb +9 -1
- data/lib/fluent_command_builder/version.rb +2 -1
- data/lib/fluent_command_builder/version_detectors/{lib/appengine_python_version_detector.rb → appengine_python_version_detector.rb} +18 -14
- data/lib/fluent_command_builder/version_detectors/default_version_detector.rb +32 -0
- data/lib/fluent_command_builder/version_detectors/osx_version_detector.rb +12 -0
- data/lib/fluent_command_builder/version_detectors/standard_version_detector.rb +22 -0
- data/lib/fluent_command_builder/version_detectors/version_detector_init.rb +24 -0
- data/lib/fluent_command_builder/version_detectors/windows_version_detector.rb +12 -0
- metadata +13 -27
- data/lib/fluent_command_builder/version_detectors/appcfg_python.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/aspnet_compiler.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/bundle.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/cucumber.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/dev_appserver_python.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/dotcover.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/installutil.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/lib/standard_version_detector.rb +0 -14
- data/lib/fluent_command_builder/version_detectors/msbuild.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/msdeploy.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/mstest.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/nuget.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/nunit.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/rake.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/security_osx.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/sevenzip.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/team_foundation.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/team_foundation_tee.rb +0 -9
- data/lib/fluent_command_builder/version_detectors/xcodebuild.rb +0 -9
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def rake(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module Rake
|
9
8
|
COMMAND_NAME = 'rake'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= StandardVersionDetector.new COMMAND_NAME, '--version'
|
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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(Rake).create &block
|
12
20
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def security_osx(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module SecurityOSX
|
9
8
|
COMMAND_NAME = 'security'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= OsxVersionDetector.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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(SecurityOSX).create &block
|
12
20
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def sevenzip(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module SevenZip
|
9
8
|
COMMAND_NAME = '7za'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= StandardVersionDetector.new COMMAND_NAME
|
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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(SevenZip).create &block
|
12
20
|
end
|
@@ -3,12 +3,12 @@ require File.expand_path(File.dirname(__FILE__) + '/../printer')
|
|
3
3
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
4
4
|
|
5
5
|
module FluentCommandBuilder
|
6
|
-
def
|
7
|
-
FluentCommandBuilder::SevenZip::
|
6
|
+
def sevenzip_920
|
7
|
+
FluentCommandBuilder::SevenZip::V920.create { |b| yield b if block_given? }
|
8
8
|
end
|
9
9
|
module SevenZip
|
10
|
-
module
|
11
|
-
VERSION = '9.
|
10
|
+
module V920
|
11
|
+
VERSION = '9.20'
|
12
12
|
def self.default_path
|
13
13
|
@default_path ||= nil
|
14
14
|
end
|
@@ -29,7 +29,7 @@ module FluentCommandBuilder
|
|
29
29
|
c
|
30
30
|
end
|
31
31
|
def sevenzip
|
32
|
-
FluentCommandBuilder::SevenZip::
|
32
|
+
FluentCommandBuilder::SevenZip::V920.create { |b| yield b if block_given? }
|
33
33
|
end
|
34
34
|
class SevenZip < CommandBase
|
35
35
|
def initialize(underlying_builder)
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def simian(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module Simian
|
9
8
|
COMMAND_NAME = 'simian'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= DefaultVersionDetector.new COMMAND_NAME
|
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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(Simian).create &block
|
12
20
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def team_foundation(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module TeamFoundation
|
9
8
|
COMMAND_NAME = 'tf'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= StandardVersionDetector.new COMMAND_NAME
|
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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(TeamFoundation).create &block
|
12
20
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def team_foundation_tee(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module TeamFoundationTEE
|
9
8
|
COMMAND_NAME = 'tf'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= StandardVersionDetector.new COMMAND_NAME
|
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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(TeamFoundationTEE).create &block
|
12
20
|
end
|
@@ -140,18 +140,6 @@ module FluentCommandBuilder
|
|
140
140
|
def properties(item_spec)
|
141
141
|
Properties.new @b, item_spec
|
142
142
|
end
|
143
|
-
def reconcile
|
144
|
-
Reconcile.new @b
|
145
|
-
end
|
146
|
-
def reconcile_build(build_name, item_spec=nil)
|
147
|
-
ReconcileBuild.new @b, build_name, item_spec
|
148
|
-
end
|
149
|
-
def reconcile_changeset(changeset_name, item_spec=nil)
|
150
|
-
ReconcileChangeset.new @b, changeset_name, item_spec
|
151
|
-
end
|
152
|
-
def reconcile_forget_build(build_name, item_spec=nil)
|
153
|
-
ReconcileForgetBuild.new @b, build_name, item_spec
|
154
|
-
end
|
155
143
|
def rename(old_item, new_item)
|
156
144
|
Rename.new @b, old_item, new_item
|
157
145
|
end
|
@@ -412,22 +400,12 @@ module FluentCommandBuilder
|
|
412
400
|
yield @b if block_given?
|
413
401
|
self
|
414
402
|
end
|
415
|
-
def bypass
|
416
|
-
@b.append ' -bypass'
|
417
|
-
yield @b if block_given?
|
418
|
-
self
|
419
|
-
end
|
420
403
|
def login(username, password=nil)
|
421
404
|
@b.append " -login:#{@b.format username}"
|
422
405
|
@b.append ",#{@b.format password}" unless password.nil?
|
423
406
|
yield @b if block_given?
|
424
407
|
self
|
425
408
|
end
|
426
|
-
def force
|
427
|
-
@b.append ' -force'
|
428
|
-
yield @b if block_given?
|
429
|
-
self
|
430
|
-
end
|
431
409
|
end
|
432
410
|
class CheckinShelveset < CommandBase
|
433
411
|
def initialize(underlying_builder, shelveset_name, shelveset_owner=nil)
|
@@ -435,11 +413,6 @@ module FluentCommandBuilder
|
|
435
413
|
@b.append " checkin -shelveset:#{@b.format shelveset_name}"
|
436
414
|
@b.append ";#{@b.format shelveset_owner}" unless shelveset_owner.nil?
|
437
415
|
end
|
438
|
-
def bypass
|
439
|
-
@b.append ' -bypass'
|
440
|
-
yield @b if block_given?
|
441
|
-
self
|
442
|
-
end
|
443
416
|
def no_prompt
|
444
417
|
@b.append ' -noPrompt'
|
445
418
|
yield @b if block_given?
|
@@ -461,11 +434,6 @@ module FluentCommandBuilder
|
|
461
434
|
yield @b if block_given?
|
462
435
|
self
|
463
436
|
end
|
464
|
-
def force
|
465
|
-
@b.append ' -force'
|
466
|
-
yield @b if block_given?
|
467
|
-
self
|
468
|
-
end
|
469
437
|
end
|
470
438
|
class Checkout < CommandBase
|
471
439
|
def initialize(underlying_builder, item_spec=nil)
|
@@ -547,6 +515,11 @@ module FluentCommandBuilder
|
|
547
515
|
yield @b if block_given?
|
548
516
|
self
|
549
517
|
end
|
518
|
+
def force
|
519
|
+
@b.append ' -force'
|
520
|
+
yield @b if block_given?
|
521
|
+
self
|
522
|
+
end
|
550
523
|
def silent
|
551
524
|
@b.append ' -silent'
|
552
525
|
yield @b if block_given?
|
@@ -1275,92 +1248,6 @@ module FluentCommandBuilder
|
|
1275
1248
|
self
|
1276
1249
|
end
|
1277
1250
|
end
|
1278
|
-
class Reconcile < CommandBase
|
1279
|
-
def initialize(underlying_builder)
|
1280
|
-
super underlying_builder
|
1281
|
-
@b.append ' reconcile'
|
1282
|
-
end
|
1283
|
-
def team_project(team_project_name)
|
1284
|
-
@b.append " -teamProject:#{@b.format team_project_name}"
|
1285
|
-
yield @b if block_given?
|
1286
|
-
self
|
1287
|
-
end
|
1288
|
-
def workspace(workspace_name, workspace_owner=nil)
|
1289
|
-
@b.append " -workspace:#{@b.format workspace_name}"
|
1290
|
-
@b.append ";#{@b.format workspace_owner}" unless workspace_owner.nil?
|
1291
|
-
yield @b if block_given?
|
1292
|
-
self
|
1293
|
-
end
|
1294
|
-
end
|
1295
|
-
class ReconcileBuild < CommandBase
|
1296
|
-
def initialize(underlying_builder, build_name, item_spec=nil)
|
1297
|
-
super underlying_builder
|
1298
|
-
@b.append " reconcile -buildName:#{@b.format build_name}"
|
1299
|
-
@b.append " #{@b.format item_spec}" unless item_spec.nil?
|
1300
|
-
end
|
1301
|
-
def team_project(team_project_name)
|
1302
|
-
@b.append " -teamProject:#{@b.format team_project_name}"
|
1303
|
-
yield @b if block_given?
|
1304
|
-
self
|
1305
|
-
end
|
1306
|
-
def workspace(workspace_name, workspace_owner=nil)
|
1307
|
-
@b.append " -workspace:#{@b.format workspace_name}"
|
1308
|
-
@b.append ";#{@b.format workspace_owner}" unless workspace_owner.nil?
|
1309
|
-
yield @b if block_given?
|
1310
|
-
self
|
1311
|
-
end
|
1312
|
-
def recursive
|
1313
|
-
@b.append ' -recursive'
|
1314
|
-
yield @b if block_given?
|
1315
|
-
self
|
1316
|
-
end
|
1317
|
-
end
|
1318
|
-
class ReconcileChangeset < CommandBase
|
1319
|
-
def initialize(underlying_builder, changeset_name, item_spec=nil)
|
1320
|
-
super underlying_builder
|
1321
|
-
@b.append " reconcile -changeset:#{@b.format changeset_name}"
|
1322
|
-
@b.append " #{@b.format item_spec}" unless item_spec.nil?
|
1323
|
-
end
|
1324
|
-
def team_project(team_project_name)
|
1325
|
-
@b.append " -teamProject:#{@b.format team_project_name}"
|
1326
|
-
yield @b if block_given?
|
1327
|
-
self
|
1328
|
-
end
|
1329
|
-
def workspace(workspace_name, workspace_owner=nil)
|
1330
|
-
@b.append " -workspace:#{@b.format workspace_name}"
|
1331
|
-
@b.append ";#{@b.format workspace_owner}" unless workspace_owner.nil?
|
1332
|
-
yield @b if block_given?
|
1333
|
-
self
|
1334
|
-
end
|
1335
|
-
def recursive
|
1336
|
-
@b.append ' -recursive'
|
1337
|
-
yield @b if block_given?
|
1338
|
-
self
|
1339
|
-
end
|
1340
|
-
end
|
1341
|
-
class ReconcileForgetBuild < CommandBase
|
1342
|
-
def initialize(underlying_builder, build_name, item_spec=nil)
|
1343
|
-
super underlying_builder
|
1344
|
-
@b.append " reconcile -forgetBuild:#{@b.format build_name}"
|
1345
|
-
@b.append " #{@b.format item_spec}" unless item_spec.nil?
|
1346
|
-
end
|
1347
|
-
def team_project(team_project_name)
|
1348
|
-
@b.append " -teamProject:#{@b.format team_project_name}"
|
1349
|
-
yield @b if block_given?
|
1350
|
-
self
|
1351
|
-
end
|
1352
|
-
def workspace(workspace_name, workspace_owner=nil)
|
1353
|
-
@b.append " -workspace:#{@b.format workspace_name}"
|
1354
|
-
@b.append ";#{@b.format workspace_owner}" unless workspace_owner.nil?
|
1355
|
-
yield @b if block_given?
|
1356
|
-
self
|
1357
|
-
end
|
1358
|
-
def recursive
|
1359
|
-
@b.append ' -recursive'
|
1360
|
-
yield @b if block_given?
|
1361
|
-
self
|
1362
|
-
end
|
1363
|
-
end
|
1364
1251
|
class Rename < CommandBase
|
1365
1252
|
def initialize(underlying_builder, old_item, new_item)
|
1366
1253
|
super underlying_builder
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
3
2
|
|
4
3
|
module FluentCommandBuilder
|
5
4
|
def xcodebuild(&block)
|
@@ -7,6 +6,15 @@ module FluentCommandBuilder
|
|
7
6
|
end
|
8
7
|
module XCodeBuild
|
9
8
|
COMMAND_NAME = 'xcodebuild'
|
9
|
+
def self.version_detector
|
10
|
+
@version_detector ||= StandardVersionDetector.new COMMAND_NAME, '-version'
|
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
|
10
18
|
def self.create(&block)
|
11
19
|
version_module(XCodeBuild).create &block
|
12
20
|
end
|
@@ -1,15 +1,19 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
module FluentCommandBuilder
|
4
|
-
class AppEnginePythonVersionDetector
|
5
|
-
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module FluentCommandBuilder
|
4
|
+
class AppEnginePythonVersionDetector
|
5
|
+
|
6
|
+
def initialize(command_name)
|
7
|
+
@command_name = command_name
|
8
|
+
end
|
9
|
+
|
10
|
+
def version(path=nil)
|
11
|
+
path ||= FluentCommandBuilder.path_finder.find_path @command_name
|
12
|
+
return unless path
|
13
|
+
version_file = File.join path, 'VERSION'
|
14
|
+
version_hash = YAML::load_file version_file
|
15
|
+
version_hash['release']
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
15
19
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../version')
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/standard_version_detector')
|
3
|
+
|
4
|
+
module FluentCommandBuilder
|
5
|
+
class DefaultVersionDetector
|
6
|
+
|
7
|
+
def initialize(command_name)
|
8
|
+
@command_name = command_name
|
9
|
+
@command_args = %w(--version -version /version --help -help /help version help)
|
10
|
+
end
|
11
|
+
|
12
|
+
def version(path=nil)
|
13
|
+
path ||= FluentCommandBuilder.path_finder.find_path @command_name
|
14
|
+
return unless path
|
15
|
+
|
16
|
+
@command_args.each do |command_arg|
|
17
|
+
version = try_get_version command_arg
|
18
|
+
return version if version
|
19
|
+
end
|
20
|
+
|
21
|
+
try_get_version
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def try_get_version(command_arg=nil)
|
27
|
+
d = StandardVersionDetector.new @command_name, command_arg
|
28
|
+
d.version
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/standard_version_detector')
|
2
|
+
|
3
|
+
module FluentCommandBuilder
|
4
|
+
class OsxVersionDetector
|
5
|
+
|
6
|
+
def version(path=nil)
|
7
|
+
d = StandardVersionDetector.new 'sw_vers', '-productVersion'
|
8
|
+
d.version
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
12
|
+
end
|