albacore 0.1.1 → 0.1.2
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/EULA.txt +1 -1
- data/VERSION +1 -1
- data/lib/albacore.rb +4 -4
- data/lib/albacore/ncoverconsole.rb +4 -4
- data/lib/albacore/ncoverreport.rb +3 -3
- data/lib/albacore/ndepend.rb +3 -3
- data/lib/albacore/nunittestrunner.rb +1 -1
- data/lib/albacore/plink.rb +4 -3
- data/lib/albacore/renamer.rb +17 -0
- data/lib/albacore/sqlcmd.rb +3 -3
- data/lib/albacore/support/failure.rb +1 -8
- data/lib/rake/assemblyinfotask.rb +2 -16
- data/lib/rake/docutask.rb +2 -16
- data/lib/rake/exectask.rb +3 -18
- data/lib/rake/expandtemplatestask.rb +2 -15
- data/lib/rake/msbuildtask.rb +2 -17
- data/lib/rake/mspectask.rb +2 -16
- data/lib/rake/nanttask.rb +2 -16
- data/lib/rake/ncoverconsoletask.rb +3 -17
- data/lib/rake/ncoverreporttask.rb +3 -17
- data/lib/rake/ndependtask.rb +3 -21
- data/lib/rake/nunittask.rb +3 -17
- data/lib/rake/plinktask.rb +3 -23
- data/lib/rake/renametask.rb +2 -19
- data/lib/rake/sftptask.rb +3 -16
- data/lib/rake/sqlcmdtask.rb +2 -16
- data/lib/rake/sshtask.rb +2 -15
- data/lib/rake/support/albacoretask.rb +16 -6
- data/lib/rake/support/createtask.rb +20 -0
- data/lib/rake/unziptask.rb +2 -16
- data/lib/rake/xbuildtask.rb +4 -19
- data/lib/rake/xunittask.rb +2 -16
- data/lib/rake/ziptask.rb +2 -16
- data/rakefile.rb +6 -6
- data/spec/assemblyinfo_spec.rb +2 -0
- data/spec/assemblyinfotask_spec.rb +13 -12
- data/spec/createtask_spec.rb +70 -0
- data/spec/docutask_spec.rb +34 -21
- data/spec/exec_spec.rb +2 -1
- data/spec/exectask_spec.rb +25 -10
- data/spec/expandtemplatestask_spec.rb +25 -10
- data/spec/msbuild_spec.rb +2 -1
- data/spec/msbuildtask_spec.rb +25 -10
- data/spec/mspectask_spec.rb +25 -10
- data/spec/nant_spec.rb +2 -1
- data/spec/nanttask_spec.rb +24 -9
- data/spec/ncoverconsole_spec.rb +16 -8
- data/spec/ncoverconsoletask_spec.rb +25 -10
- data/spec/ncoverreport_spec.rb +27 -13
- data/spec/ncoverreporttask_spec.rb +25 -10
- data/spec/ndepend_spec.rb +3 -1
- data/spec/ndependtask_spec.rb +37 -22
- data/spec/nunittask_spec.rb +25 -10
- data/spec/nunittestrunner_spec.rb +3 -3
- data/spec/patches/fail_patch.rb +9 -0
- data/spec/plink_spec.rb +1 -0
- data/spec/plinktask_spec.rb +37 -22
- data/spec/renametask_spec.rb +13 -11
- data/spec/sftptask_spec.rb +11 -10
- data/spec/sqlcmd_spec.rb +4 -2
- data/spec/sqlcmdtask_spec.rb +11 -10
- data/spec/sshtask_spec.rb +11 -10
- data/spec/support/spec_helper.rb +2 -1
- data/spec/xunit_spec.rb +2 -2
- data/spec/xunittask_spec.rb +11 -10
- data/spec/ziptask_spec.rb +12 -11
- metadata +10 -7
- data/spec/patches/tasklib_patch.rb +0 -12
data/spec/ncoverreport_spec.rb
CHANGED
@@ -5,11 +5,12 @@ require 'ncoverreporttestdata'
|
|
5
5
|
describe NCoverReport, "when runnign without the ncover report location specified" do
|
6
6
|
before :all do
|
7
7
|
@ncover = NCoverReport.new
|
8
|
+
@ncover.extend(FailPatch)
|
8
9
|
@ncover.run
|
9
10
|
end
|
10
11
|
|
11
12
|
it "should fail execution" do
|
12
|
-
|
13
|
+
$task_failed.should be_true
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
@@ -112,6 +113,7 @@ describe NCoverReport, "when running a report with a specified minimum symbol co
|
|
112
113
|
|
113
114
|
@ncover = NCoverReport.new
|
114
115
|
@ncover.extend(SystemPatch)
|
116
|
+
@ncover.extend(FailPatch)
|
115
117
|
@ncover.log_level = :verbose
|
116
118
|
|
117
119
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -133,7 +135,7 @@ describe NCoverReport, "when running a report with a specified minimum symbol co
|
|
133
135
|
end
|
134
136
|
|
135
137
|
it "should not fail the execution" do
|
136
|
-
|
138
|
+
$task_failed.should be_false
|
137
139
|
end
|
138
140
|
|
139
141
|
it "should produce the report" do
|
@@ -147,6 +149,7 @@ describe NCoverReport, "when running a report with a specified minimum symbol co
|
|
147
149
|
|
148
150
|
@ncover = NCoverReport.new
|
149
151
|
@ncover.extend(SystemPatch)
|
152
|
+
@ncover.extend(FailPatch)
|
150
153
|
@ncover.log_level = :verbose
|
151
154
|
|
152
155
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -168,7 +171,7 @@ describe NCoverReport, "when running a report with a specified minimum symbol co
|
|
168
171
|
end
|
169
172
|
|
170
173
|
it "should fail the execution" do
|
171
|
-
|
174
|
+
$task_failed.should be_true
|
172
175
|
end
|
173
176
|
|
174
177
|
it "should produce the report" do
|
@@ -182,6 +185,7 @@ describe NCoverReport, "when specifying the coverage item type to check" do
|
|
182
185
|
|
183
186
|
@ncover = NCoverReport.new
|
184
187
|
@ncover.extend(SystemPatch)
|
188
|
+
@ncover.extend(FailPatch)
|
185
189
|
@ncover.log_level = :verbose
|
186
190
|
|
187
191
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -214,6 +218,7 @@ describe NCoverReport, "when checking more than one type of coverage and all fai
|
|
214
218
|
|
215
219
|
@ncover = NCoverReport.new
|
216
220
|
@ncover.extend(SystemPatch)
|
221
|
+
@ncover.extend(FailPatch)
|
217
222
|
@ncover.log_level = :verbose
|
218
223
|
|
219
224
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -249,7 +254,7 @@ describe NCoverReport, "when checking more than one type of coverage and all fai
|
|
249
254
|
end
|
250
255
|
|
251
256
|
it "should fail the execution" do
|
252
|
-
|
257
|
+
$task_failed.should be_true
|
253
258
|
end
|
254
259
|
end
|
255
260
|
|
@@ -259,6 +264,7 @@ describe NCoverReport, "when checking more than one type of coverage and all pas
|
|
259
264
|
|
260
265
|
@ncover = NCoverReport.new
|
261
266
|
@ncover.extend(SystemPatch)
|
267
|
+
@ncover.extend(FailPatch)
|
262
268
|
@ncover.log_level = :verbose
|
263
269
|
|
264
270
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -294,7 +300,7 @@ describe NCoverReport, "when checking more than one type of coverage and all pas
|
|
294
300
|
end
|
295
301
|
|
296
302
|
it "should not fail the execution" do
|
297
|
-
|
303
|
+
$task_failed.should be_false
|
298
304
|
end
|
299
305
|
end
|
300
306
|
|
@@ -304,6 +310,7 @@ describe NCoverReport, "when checking more than one type of coverage and one fai
|
|
304
310
|
|
305
311
|
@ncover = NCoverReport.new
|
306
312
|
@ncover.extend(SystemPatch)
|
313
|
+
@ncover.extend(FailPatch)
|
307
314
|
@ncover.log_level = :verbose
|
308
315
|
|
309
316
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -334,7 +341,7 @@ describe NCoverReport, "when checking more than one type of coverage and one fai
|
|
334
341
|
end
|
335
342
|
|
336
343
|
it "should fail the execution" do
|
337
|
-
|
344
|
+
$task_failed.should be_true
|
338
345
|
end
|
339
346
|
end
|
340
347
|
|
@@ -344,6 +351,7 @@ describe NCoverReport, "when running a report with a cyclomatic complexity highe
|
|
344
351
|
|
345
352
|
@ncover = NCoverReport.new
|
346
353
|
@ncover.extend(SystemPatch)
|
354
|
+
@ncover.extend(FailPatch)
|
347
355
|
@ncover.log_level = :verbose
|
348
356
|
|
349
357
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -364,7 +372,7 @@ describe NCoverReport, "when running a report with a cyclomatic complexity highe
|
|
364
372
|
end
|
365
373
|
|
366
374
|
it "should fail the execution" do
|
367
|
-
|
375
|
+
$task_failed.should be_true
|
368
376
|
end
|
369
377
|
|
370
378
|
it "should produce the report" do
|
@@ -378,6 +386,7 @@ describe NCoverReport, "when running a report with a cyclomatic complexity under
|
|
378
386
|
|
379
387
|
@ncover = NCoverReport.new
|
380
388
|
@ncover.extend(SystemPatch)
|
389
|
+
@ncover.extend(FailPatch)
|
381
390
|
@ncover.log_level = :verbose
|
382
391
|
|
383
392
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -398,7 +407,7 @@ describe NCoverReport, "when running a report with a cyclomatic complexity under
|
|
398
407
|
end
|
399
408
|
|
400
409
|
it "should not fail the execution" do
|
401
|
-
|
410
|
+
$task_failed.should be_false
|
402
411
|
end
|
403
412
|
|
404
413
|
it "should produce the report" do
|
@@ -412,6 +421,7 @@ describe NCoverReport, "when filtering on Assembly coverage data" do
|
|
412
421
|
|
413
422
|
@ncover = NCoverReport.new
|
414
423
|
@ncover.extend(SystemPatch)
|
424
|
+
@ncover.extend(FailPatch)
|
415
425
|
@ncover.log_level = :verbose
|
416
426
|
|
417
427
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -439,7 +449,7 @@ describe NCoverReport, "when filtering on Assembly coverage data" do
|
|
439
449
|
end
|
440
450
|
|
441
451
|
it "should not fail" do
|
442
|
-
|
452
|
+
$task_failed.should be_false
|
443
453
|
end
|
444
454
|
end
|
445
455
|
|
@@ -449,6 +459,7 @@ describe NCoverReport, "when filtering on Namespace coverage data" do
|
|
449
459
|
|
450
460
|
@ncover = NCoverReport.new
|
451
461
|
@ncover.extend(SystemPatch)
|
462
|
+
@ncover.extend(FailPatch)
|
452
463
|
@ncover.log_level = :verbose
|
453
464
|
|
454
465
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -476,7 +487,7 @@ describe NCoverReport, "when filtering on Namespace coverage data" do
|
|
476
487
|
end
|
477
488
|
|
478
489
|
it "should not fail" do
|
479
|
-
|
490
|
+
$task_failed.should be_false
|
480
491
|
end
|
481
492
|
end
|
482
493
|
|
@@ -486,6 +497,7 @@ describe NCoverReport, "when filtering on Class coverage data" do
|
|
486
497
|
|
487
498
|
@ncover = NCoverReport.new
|
488
499
|
@ncover.extend(SystemPatch)
|
500
|
+
@ncover.extend(FailPatch)
|
489
501
|
@ncover.log_level = :verbose
|
490
502
|
|
491
503
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -513,7 +525,7 @@ describe NCoverReport, "when filtering on Class coverage data" do
|
|
513
525
|
end
|
514
526
|
|
515
527
|
it "should not fail" do
|
516
|
-
|
528
|
+
$task_failed.should be_false
|
517
529
|
end
|
518
530
|
end
|
519
531
|
|
@@ -523,6 +535,7 @@ describe NCoverReport, "when filtering on Method coverage data" do
|
|
523
535
|
|
524
536
|
@ncover = NCoverReport.new
|
525
537
|
@ncover.extend(SystemPatch)
|
538
|
+
@ncover.extend(FailPatch)
|
526
539
|
@ncover.log_level = :verbose
|
527
540
|
|
528
541
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -550,7 +563,7 @@ describe NCoverReport, "when filtering on Method coverage data" do
|
|
550
563
|
end
|
551
564
|
|
552
565
|
it "should not fail" do
|
553
|
-
|
566
|
+
$task_failed.should be_false
|
554
567
|
end
|
555
568
|
end
|
556
569
|
|
@@ -560,6 +573,7 @@ describe NCoverReport, "when filtering on Document coverage data" do
|
|
560
573
|
|
561
574
|
@ncover = NCoverReport.new
|
562
575
|
@ncover.extend(SystemPatch)
|
576
|
+
@ncover.extend(FailPatch)
|
563
577
|
@ncover.log_level = :verbose
|
564
578
|
|
565
579
|
@ncover.path_to_command = NCoverReportTestData.path_to_command
|
@@ -587,6 +601,6 @@ describe NCoverReport, "when filtering on Document coverage data" do
|
|
587
601
|
end
|
588
602
|
|
589
603
|
it "should not fail" do
|
590
|
-
|
604
|
+
$task_failed.should be_false
|
591
605
|
end
|
592
606
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
2
|
require 'albacore/ncoverreport'
|
3
3
|
require 'rake/ncoverreporttask'
|
4
|
-
require '
|
4
|
+
require 'fail_patch'
|
5
5
|
|
6
|
-
describe
|
6
|
+
describe "when running" do
|
7
7
|
before :all do
|
8
|
-
|
8
|
+
ncoverreport :ncoverreport do |t|
|
9
|
+
t.extend(FailPatch)
|
9
10
|
@yielded_object = t
|
10
11
|
end
|
11
|
-
task.extend(TasklibPatch)
|
12
12
|
Rake::Task[:ncoverreport].invoke
|
13
13
|
end
|
14
14
|
|
@@ -17,15 +17,30 @@ describe Albacore::NCoverReportTask, "when running" do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
describe
|
20
|
+
describe "when execution fails" do
|
21
21
|
before :all do
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
ncoverreport :ncoverreport_fail do |t|
|
23
|
+
t.extend(FailPatch)
|
24
|
+
t.fail
|
25
|
+
end
|
26
|
+
Rake::Task[:ncoverreport_fail].invoke
|
26
27
|
end
|
27
28
|
|
28
29
|
it "should fail the rake task" do
|
29
|
-
|
30
|
+
$task_failed.should == true
|
30
31
|
end
|
31
32
|
end
|
33
|
+
|
34
|
+
describe "when task args are used" do
|
35
|
+
before :all do
|
36
|
+
ncoverreport :ncoverreporttask_withargs, [:arg1] do |t, args|
|
37
|
+
t.extend(FailPatch)
|
38
|
+
@args = args
|
39
|
+
end
|
40
|
+
Rake::Task[:ncoverreporttask_withargs].invoke("test")
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should provide the task args" do
|
44
|
+
@args.arg1.should == "test"
|
45
|
+
end
|
46
|
+
end
|
data/spec/ndepend_spec.rb
CHANGED
@@ -36,13 +36,15 @@ describe "when executing Ndepend console" do
|
|
36
36
|
|
37
37
|
it "should fail when the project file is not given" do
|
38
38
|
@ndepend.project_file = nil
|
39
|
+
@ndepend.extend(FailPatch)
|
39
40
|
@ndepend.run
|
40
|
-
|
41
|
+
$task_failed.should be_true
|
41
42
|
end
|
42
43
|
|
43
44
|
it "should accept other parameters" do
|
44
45
|
expected_params = "/ViewReport /Silent /Help"
|
45
46
|
@ndepend.parameters expected_params
|
47
|
+
@ndepend.extend(FailPatch)
|
46
48
|
@ndepend.run
|
47
49
|
@log_data.should include(expected_params)
|
48
50
|
end
|
data/spec/ndependtask_spec.rb
CHANGED
@@ -1,31 +1,46 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
2
|
require 'albacore/ndepend'
|
3
3
|
require 'rake/ndependtask'
|
4
|
-
require '
|
4
|
+
require 'fail_patch'
|
5
5
|
|
6
|
-
describe
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
describe "when running" do
|
7
|
+
before :all do
|
8
|
+
ndepend :ndepend do |t|
|
9
|
+
t.extend(FailPatch)
|
10
|
+
@yielded_object = t
|
11
|
+
end
|
12
|
+
Rake::Task[:ndepend].invoke
|
13
|
+
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
it "should yield the command api" do
|
16
|
+
@yielded_object.kind_of?(NDepend).should == true
|
17
|
+
end
|
18
18
|
end
|
19
19
|
|
20
|
-
describe
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
describe "when execution fails" do
|
21
|
+
before :all do
|
22
|
+
ndepend :ndepend_fail do |t|
|
23
|
+
t.extend(FailPatch)
|
24
|
+
t.fail
|
25
|
+
end
|
26
|
+
Rake::Task[:ndepend_fail].invoke
|
27
|
+
end
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
it "should fail the rake task" do
|
30
|
+
$task_failed.should be_true
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "when task args are used" do
|
35
|
+
before :all do
|
36
|
+
ndepend :ndependtask_withargs, [:arg1] do |t, args|
|
37
|
+
t.extend(FailPatch)
|
38
|
+
@args = args
|
39
|
+
end
|
40
|
+
Rake::Task[:ndependtask_withargs].invoke("test")
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should provide the task args" do
|
44
|
+
@args.arg1.should == "test"
|
45
|
+
end
|
31
46
|
end
|
data/spec/nunittask_spec.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
2
|
require 'albacore/nunittestrunner'
|
3
3
|
require 'rake/nunittask'
|
4
|
-
require '
|
4
|
+
require 'fail_patch'
|
5
5
|
|
6
|
-
describe
|
6
|
+
describe "when running" do
|
7
7
|
before :all do
|
8
|
-
|
8
|
+
nunit :nunit do |t|
|
9
|
+
t.extend(FailPatch)
|
9
10
|
@yielded_object = t
|
10
11
|
end
|
11
|
-
task.extend(TasklibPatch)
|
12
12
|
Rake::Task[:nunit].invoke
|
13
13
|
end
|
14
14
|
|
@@ -17,15 +17,30 @@ describe Albacore::NUnitTask, "when running" do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
describe
|
20
|
+
describe "when execution fails" do
|
21
21
|
before :all do
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
nunit :nunit_fail do |t|
|
23
|
+
t.extend(FailPatch)
|
24
|
+
t.fail
|
25
|
+
end
|
26
|
+
Rake::Task[:nunit_fail].invoke
|
26
27
|
end
|
27
28
|
|
28
29
|
it "should fail the rake task" do
|
29
|
-
|
30
|
+
$task_failed.should == true
|
30
31
|
end
|
31
32
|
end
|
33
|
+
|
34
|
+
describe "when task args are used" do
|
35
|
+
before :all do
|
36
|
+
nunit :nunittask_withargs, [:arg1] do |t, args|
|
37
|
+
t.extend(FailPatch)
|
38
|
+
@args = args
|
39
|
+
end
|
40
|
+
Rake::Task[:nunittask_withargs].invoke("test")
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should provide the task args" do
|
44
|
+
@args.arg1.should == "test"
|
45
|
+
end
|
46
|
+
end
|
@@ -20,7 +20,7 @@ describe NUnitTestRunner, "the command parameters for an nunit runner" do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should include the list of assemblies" do
|
23
|
-
@command_parameters.should include("#{@@test_assembly} #{@@failing_test_assembly}")
|
23
|
+
@command_parameters.should include("\"#{@@test_assembly}\" \"#{@@failing_test_assembly}\"")
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should include the list of options" do
|
@@ -51,14 +51,14 @@ end
|
|
51
51
|
describe NUnitTestRunner, "when configured correctly" do
|
52
52
|
before :all do
|
53
53
|
nunit = NUnitTestRunner.new(@@nunitpath)
|
54
|
+
nunit.extend(FailPatch)
|
54
55
|
nunit.assemblies @@test_assembly
|
55
56
|
nunit.options '/noshadow'
|
56
57
|
|
57
58
|
nunit.execute
|
58
|
-
@failed = nunit.failed
|
59
59
|
end
|
60
60
|
|
61
61
|
it "should execute" do
|
62
|
-
|
62
|
+
$task_failed.should be_false
|
63
63
|
end
|
64
64
|
end
|