albacore 0.0.9 → 0.1.0
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/README.markdown +84 -81
- data/VERSION +1 -1
- data/install_dependencies.rb +10 -10
- data/lib/albacore.rb +10 -2
- data/lib/albacore/assemblyinfo.rb +100 -100
- data/lib/albacore/assemblyinfolanguages/csharpengine.rb +14 -0
- data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +14 -0
- data/lib/albacore/docu.rb +39 -0
- data/lib/albacore/exec.rb +23 -0
- data/lib/albacore/expandtemplates.rb +73 -71
- data/lib/albacore/msbuild.rb +56 -61
- data/lib/albacore/mspectestrunner.rb +44 -42
- data/lib/albacore/nant.rb +39 -0
- data/lib/albacore/ncoverconsole.rb +68 -61
- data/lib/albacore/ncoverreport.rb +56 -55
- data/lib/albacore/ncoverreports/assemblyfilter.rb +7 -7
- data/lib/albacore/ncoverreports/branchcoverage.rb +7 -7
- data/lib/albacore/ncoverreports/classfilter.rb +5 -5
- data/lib/albacore/ncoverreports/codecoveragebase.rb +22 -22
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +19 -19
- data/lib/albacore/ncoverreports/documentfilter.rb +5 -5
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +17 -17
- data/lib/albacore/ncoverreports/methodcoverage.rb +7 -7
- data/lib/albacore/ncoverreports/methodfilter.rb +5 -5
- data/lib/albacore/ncoverreports/namespacefilter.rb +5 -5
- data/lib/albacore/ncoverreports/reportfilterbase.rb +23 -23
- data/lib/albacore/ncoverreports/summaryreport.rb +18 -18
- data/lib/albacore/ncoverreports/symbolcoverage.rb +6 -7
- data/lib/albacore/ndepend.rb +35 -0
- data/lib/albacore/nunittestrunner.rb +36 -35
- data/lib/albacore/plink.rb +48 -0
- data/lib/albacore/sftp.rb +33 -31
- data/lib/albacore/sqlcmd.rb +54 -51
- data/lib/albacore/ssh.rb +35 -33
- data/lib/albacore/support/albacore_helper.rb +1 -4
- data/lib/albacore/support/attrmethods.rb +25 -0
- data/lib/albacore/support/failure.rb +17 -17
- data/lib/albacore/support/globalconfig.rb +6 -0
- data/lib/albacore/support/logging.rb +30 -28
- data/lib/albacore/support/runcommand.rb +41 -41
- data/lib/albacore/support/yamlconfig.rb +23 -27
- data/lib/albacore/unzip.rb +28 -0
- data/lib/albacore/xbuild.rb +54 -0
- data/lib/albacore/xunittestrunner.rb +40 -43
- data/lib/albacore/zipdirectory.rb +72 -63
- data/lib/rake/assemblyinfotask.rb +12 -11
- data/lib/rake/docutask.rb +17 -0
- data/lib/rake/exectask.rb +18 -0
- data/lib/rake/expandtemplatestask.rb +12 -11
- data/lib/rake/msbuildtask.rb +13 -12
- data/lib/rake/mspectask.rb +12 -11
- data/lib/rake/nanttask.rb +17 -0
- data/lib/rake/ncoverconsoletask.rb +12 -11
- data/lib/rake/ncoverreporttask.rb +12 -11
- data/lib/rake/ndependtask.rb +23 -0
- data/lib/rake/nunittask.rb +12 -11
- data/lib/rake/plinktask.rb +23 -0
- data/lib/rake/renametask.rb +15 -15
- data/lib/rake/sftptask.rb +11 -10
- data/lib/rake/sqlcmdtask.rb +13 -12
- data/lib/rake/sshtask.rb +11 -10
- data/lib/rake/support/albacoretask.rb +16 -15
- data/lib/rake/unziptask.rb +17 -0
- data/lib/rake/xbuildtask.rb +22 -0
- data/lib/rake/xunittask.rb +12 -11
- data/lib/rake/ziptask.rb +12 -11
- data/rakefile.rb +255 -204
- data/spec/assemblyinfo_spec.rb +426 -221
- data/spec/assemblyinfotask_spec.rb +21 -21
- data/spec/docu_spec.rb +70 -0
- data/spec/docutask_spec.rb +39 -0
- data/spec/exec_spec.rb +23 -0
- data/spec/exectask_spec.rb +31 -0
- data/spec/expandtemplates_spec.rb +149 -148
- data/spec/expandtemplatestask_spec.rb +21 -21
- data/spec/msbuild_spec.rb +150 -139
- data/spec/msbuildtask_spec.rb +21 -21
- data/spec/mspectask_spec.rb +21 -21
- data/spec/nant_spec.rb +101 -0
- data/spec/nanttask_spec.rb +31 -0
- data/spec/ncoverconsole_spec.rb +253 -221
- data/spec/ncoverconsoletask_spec.rb +21 -21
- data/spec/ncoverreport_spec.rb +538 -523
- data/spec/ncoverreporttask_spec.rb +21 -21
- data/spec/ndepend_spec.rb +49 -0
- data/spec/{commandtask_spec.rb → ndependtask_spec.rb} +10 -10
- data/spec/nunittask_spec.rb +21 -21
- data/spec/nunittestrunner_spec.rb +6 -6
- data/spec/patches/docu_patch.rb +13 -0
- data/spec/patches/system_patch.rb +18 -18
- data/spec/patches/tasklib_patch.rb +10 -10
- data/spec/plink_spec.rb +61 -0
- data/spec/plinktask_spec.rb +31 -0
- data/spec/renametask_spec.rb +21 -21
- data/spec/sftp_spec.rb +24 -24
- data/spec/sftptask_spec.rb +31 -31
- data/spec/sqlcmd_spec.rb +118 -120
- data/spec/sqlcmdtask_spec.rb +21 -21
- data/spec/ssh_spec.rb +36 -37
- data/spec/sshtask_spec.rb +29 -29
- data/spec/support/TestSolution/NDependProject.xml +315 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +12 -12
- data/spec/support/TestSolution/TestSolution.XUnitTests/FailingTestFixture.cs +14 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +1 -0
- data/spec/support/TestSolution/TestSolution.build +25 -0
- data/spec/support/assemblyinfotester.rb +40 -38
- data/spec/support/expandtemplatestestdata.rb +73 -73
- data/spec/support/msbuildtestdata.rb +28 -28
- data/spec/support/nanttestdata.rb +33 -0
- data/spec/support/ncoverconsoletestdata.rb +18 -0
- data/spec/support/ncoverreporttestdata.rb +24 -24
- data/spec/support/spec_helper.rb +2 -1
- data/spec/support/yamlconfig/msbuild.yml +3 -0
- data/spec/support/yamlconfig/yaml_autoconfig_test.yml +1 -0
- data/spec/support/ziptestdata.rb +11 -6
- data/spec/xunit_spec.rb +63 -0
- data/spec/xunittask_spec.rb +19 -19
- data/spec/yamlconfig_spec.rb +38 -52
- data/spec/zip_spec.rb +56 -11
- data/spec/ziptask_spec.rb +22 -22
- metadata +53 -8
- data/lib/albacore/command.rb +0 -23
- data/lib/rake/commandtask.rb +0 -16
- data/spec/command_spec.rb +0 -23
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
require 'albacore'
|
3
|
+
|
4
|
+
def ndepend(name=:command, *args, &block)
|
5
|
+
Albacore::NDepend.new(name, *args, &block)
|
6
|
+
end
|
7
|
+
|
8
|
+
module Albacore
|
9
|
+
class NDependTask < Albacore::AlbacoreTask
|
10
|
+
attr_accessor :project_file , :parameters
|
11
|
+
|
12
|
+
def execute(name, task_args)
|
13
|
+
cmd = NDepend.new()
|
14
|
+
cmd.load_config_by_task_name(name)
|
15
|
+
@block.call(cmd, *task_args) unless @block.nil?
|
16
|
+
cmd.run
|
17
|
+
fail if cmd.failed
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
|
data/lib/rake/nunittask.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def nunit(name=:nunit, *args, &block)
|
4
|
+
Albacore::NUnitTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
class NUnitTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@nunit = NUnitTestRunner.new
|
11
|
+
@nunit.load_config_by_task_name(name)
|
12
|
+
@block.call(@nunit, *task_args) unless @block.nil?
|
13
|
+
@nunit.execute
|
14
|
+
fail if @nunit.failed
|
15
|
+
end
|
16
|
+
end
|
16
17
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
require 'albacore'
|
3
|
+
|
4
|
+
def plink(name=:command, *args, &block)
|
5
|
+
Albacore::PLinkTask.new(name, *args, &block)
|
6
|
+
end
|
7
|
+
|
8
|
+
module Albacore
|
9
|
+
class PLinkTask < Albacore::AlbacoreTask
|
10
|
+
attr_accessor :remote_parameters, :remote_path_to_command
|
11
|
+
|
12
|
+
def execute(name, task_args)
|
13
|
+
cmd = PLink.new()
|
14
|
+
cmd.load_config_by_task_name(name)
|
15
|
+
@block.call(cmd, *task_args) unless @block.nil?
|
16
|
+
cmd.run
|
17
|
+
fail if cmd.failed
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
|
data/lib/rake/renametask.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def rename(name=:rename, *args, &block)
|
4
|
+
Albacore::RenameTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
8
|
+
class RenameTask < Albacore::AlbacoreTask
|
9
|
+
attr_accessor :actual_name, :target_name
|
10
|
+
|
11
|
+
def execute(name, task_args)
|
12
|
+
@block.call(self, *task_args) unless @block.nil?
|
13
|
+
if (@actual_name.nil? || @target_name.nil?)
|
14
|
+
fail
|
15
|
+
else
|
16
|
+
File.rename(@actual_name, @target_name)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
20
|
end
|
data/lib/rake/sftptask.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def sftp(name=:sftp, *args, &block)
|
4
|
+
Albacore::SftpTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
class SftpTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@sftp = Sftp.new
|
11
|
+
@sftp.load_config_by_task_name(name)
|
12
|
+
@block.call(@sftp, *task_args) unless @block.nil?
|
13
|
+
@sftp.upload
|
14
|
+
end
|
15
|
+
end
|
15
16
|
end
|
data/lib/rake/sqlcmdtask.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def sqlcmd(name=:sqlcmd, *args, &block)
|
4
|
+
Albacore::SQLCmdTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
7
|
-
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
6
|
+
|
7
|
+
module Albacore
|
8
|
+
class SQLCmdTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@sqlcmd = SQLCmd.new
|
11
|
+
@sqlcmd.load_config_by_task_name(name)
|
12
|
+
@block.call(@sqlcmd, *task_args) unless @block.nil?
|
13
|
+
@sqlcmd.run
|
14
|
+
fail if @sqlcmd.failed
|
15
|
+
end
|
16
|
+
end
|
16
17
|
end
|
data/lib/rake/sshtask.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def ssh(name=:ssh, *args, &block)
|
4
|
+
Albacore::SshTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
class SshTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@ssh = Ssh.new
|
11
|
+
@ssh.load_config_by_task_name(name)
|
12
|
+
@block.call(@ssh, *task_args) unless @block.nil?
|
13
|
+
@ssh.execute
|
14
|
+
end
|
15
|
+
end
|
15
16
|
end
|
@@ -1,19 +1,20 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
3
|
module Albacore
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
4
|
+
class AlbacoreTask < ::Rake::TaskLib
|
5
|
+
attr_accessor :name
|
6
|
+
|
7
|
+
def initialize(name, *args, &block)
|
8
|
+
@block = block
|
9
|
+
@args = args.insert(0, name)
|
10
|
+
@name = name
|
11
|
+
define
|
12
|
+
end
|
13
|
+
|
14
|
+
def define
|
15
|
+
task *@args do |task, task_args|
|
16
|
+
execute @name.to_s, task_args
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
19
20
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
def unzip(name=:unzip, *args, &block)
|
4
|
+
Albacore::UnZipTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
7
|
+
module Albacore
|
8
|
+
class UnZipTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@zip = Unzip.new
|
11
|
+
@zip.load_config_by_task_name(name)
|
12
|
+
@block.call(@zip, *task_args) unless @block.nil?
|
13
|
+
@zip.unzip
|
14
|
+
fail if @zip.failed
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
def xbuild(name=:xbuild, *args, &block)
|
4
|
+
Albacore::XBuildTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
7
|
+
def mono(name=:mono, *args, &block)
|
8
|
+
Albacore::XBuildTask.new(name, *args, &block)
|
9
|
+
end
|
10
|
+
|
11
|
+
module Albacore
|
12
|
+
class XBuildTask < Albacore::AlbacoreTask
|
13
|
+
def execute(name, task_args)
|
14
|
+
@xbuild = XBuild.new
|
15
|
+
@xbuild.load_config_by_task_name(name)
|
16
|
+
@block.call(@xbuild, *task_args) unless @block.nil?
|
17
|
+
@xbuild.build
|
18
|
+
fail if @xbuild.failed
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
data/lib/rake/xunittask.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def xunit(name=:xunit, *args, &block)
|
4
|
+
Albacore::XUnitTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
class XUnitTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@xunit = XUnitTestRunner.new
|
11
|
+
@xunit.load_config_by_task_name(name)
|
12
|
+
@block.call(@xunit, *task_args) unless @block.nil?
|
13
|
+
@xunit.execute
|
14
|
+
fail if @xunit.failed
|
15
|
+
end
|
16
|
+
end
|
16
17
|
end
|
data/lib/rake/ziptask.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
-
def
|
4
|
-
|
3
|
+
def zip(name=:zip, *args, &block)
|
4
|
+
Albacore::ZipTask.new(name, *args, &block)
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
module Albacore
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
class ZipTask < Albacore::AlbacoreTask
|
9
|
+
def execute(name, task_args)
|
10
|
+
@zip = ZipDirectory.new
|
11
|
+
@zip.load_config_by_task_name(name)
|
12
|
+
@block.call(@zip, *task_args) unless @block.nil?
|
13
|
+
@zip.package
|
14
|
+
fail if @zip.failed
|
15
|
+
end
|
16
|
+
end
|
16
17
|
end
|
data/rakefile.rb
CHANGED
@@ -1,112 +1,147 @@
|
|
1
1
|
task :default => ['albacore:sample']
|
2
2
|
|
3
3
|
namespace :specs do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
4
|
+
require 'spec/rake/spectask'
|
5
|
+
|
6
|
+
@spec_opts = '--colour --format specdoc'
|
7
|
+
|
8
|
+
desc "Run functional specs for Albacore"
|
9
|
+
Spec::Rake::SpecTask.new :all do |t|
|
10
|
+
t.spec_files = 'spec/**/*_spec.rb'
|
11
|
+
t.spec_opts << @spec_opts
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Run rake task specs for Albacore"
|
15
|
+
Spec::Rake::SpecTask.new :tasks do |t|
|
16
|
+
t.spec_files = 'spec/**/*task_spec.rb'
|
17
|
+
t.spec_opts << @spec_opts
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "Assembly info functional specs"
|
21
|
+
Spec::Rake::SpecTask.new :assemblyinfo do |t|
|
22
|
+
t.spec_files = 'spec/assemblyinfo*_spec.rb'
|
23
|
+
t.spec_opts << @spec_opts
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "MSBuild functional specs"
|
27
|
+
Spec::Rake::SpecTask.new :msbuild do |t|
|
28
|
+
t.spec_files = 'spec/msbuild*_spec.rb'
|
29
|
+
t.spec_opts << @spec_opts
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "SQLServer SQLCmd functional specs"
|
33
|
+
Spec::Rake::SpecTask.new :sqlcmd do |t|
|
34
|
+
t.spec_files = 'spec/sqlcmd*_spec.rb'
|
35
|
+
t.spec_opts << @spec_opts
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
desc "Nant functional specs"
|
40
|
+
Spec::Rake::SpecTask.new :nant do |t|
|
41
|
+
t.spec_files = 'spec/nant*_spec.rb'
|
42
|
+
t.spec_opts << @spec_opts
|
43
|
+
end
|
44
|
+
|
45
|
+
desc "NCover Console functional specs"
|
46
|
+
Spec::Rake::SpecTask.new :ncoverconsole do |t|
|
47
|
+
t.spec_files = 'spec/ncoverconsole*_spec.rb'
|
48
|
+
t.spec_opts << @spec_opts
|
49
|
+
end
|
50
|
+
|
51
|
+
desc "NCover Report functional specs"
|
52
|
+
Spec::Rake::SpecTask.new :ncoverreport do |t|
|
53
|
+
t.spec_files = 'spec/ncoverreport*_spec.rb'
|
54
|
+
t.spec_opts << @spec_opts
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "SSH functional specs"
|
58
|
+
Spec::Rake::SpecTask.new :ssh do |t|
|
59
|
+
t.spec_files = 'spec/ssh*_spec.rb'
|
60
|
+
t.spec_opts << @spec_opts
|
61
|
+
end
|
62
|
+
|
63
|
+
desc "Plink functional specs"
|
64
|
+
Spec::Rake::SpecTask.new :plink do |t|
|
65
|
+
t.spec_files = 'spec/plink*_spec.rb'
|
66
|
+
t.spec_opts << @spec_opts
|
67
|
+
end
|
68
|
+
|
69
|
+
desc "Ndepend functional specs"
|
70
|
+
Spec::Rake::SpecTask.new :ndepend do |t|
|
71
|
+
t.spec_files = 'spec/ndepend*_spec.rb'
|
72
|
+
t.spec_opts << @spec_opts
|
73
|
+
end
|
74
|
+
|
75
|
+
desc "SFTP functional specs"
|
76
|
+
Spec::Rake::SpecTask.new :sftp do |t|
|
77
|
+
t.spec_files = 'spec/sftp*_spec.rb'
|
78
|
+
t.spec_opts << @spec_opts
|
79
|
+
end
|
80
|
+
|
81
|
+
desc "Expand Templates functional specs"
|
82
|
+
Spec::Rake::SpecTask.new :templates do |t|
|
83
|
+
t.spec_files = 'spec/expandtemplates*_spec.rb'
|
84
|
+
t.spec_opts << @spec_opts
|
66
85
|
end
|
67
86
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
87
|
+
desc "Zip functional specs"
|
88
|
+
Spec::Rake::SpecTask.new :zip do |t|
|
89
|
+
t.spec_files = 'spec/zip*_spec.rb'
|
90
|
+
t.spec_opts << @spec_opts
|
72
91
|
end
|
73
92
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
93
|
+
desc "XUnit functional specs"
|
94
|
+
Spec::Rake::SpecTask.new :xunit do |t|
|
95
|
+
t.spec_files = 'spec/xunit*_spec.rb'
|
96
|
+
t.spec_opts << @spec_opts
|
97
|
+
end
|
98
|
+
|
99
|
+
desc "NUnit functional specs"
|
100
|
+
Spec::Rake::SpecTask.new :nunit do |t|
|
101
|
+
t.spec_files = 'spec/nunit*_spec.rb'
|
102
|
+
t.spec_opts << @spec_opts
|
103
|
+
end
|
104
|
+
|
105
|
+
desc "MSpec functional specs"
|
106
|
+
Spec::Rake::SpecTask.new :mspec do |t|
|
107
|
+
t.spec_files = 'spec/mspec*_spec.rb'
|
108
|
+
t.spec_opts << @spec_opts
|
109
|
+
end
|
110
|
+
|
111
|
+
desc "Exec functional specs"
|
112
|
+
Spec::Rake::SpecTask.new :exec do |t|
|
113
|
+
t.spec_files = 'spec/exec*_spec.rb'
|
114
|
+
t.spec_opts << @spec_opts
|
115
|
+
end
|
116
|
+
|
117
|
+
desc "Rename functional specs"
|
118
|
+
Spec::Rake::SpecTask.new :rename do |t|
|
119
|
+
t.spec_files = 'spec/rename*_spec.rb'
|
120
|
+
t.spec_opts << @spec_opts
|
121
|
+
end
|
122
|
+
|
123
|
+
desc "Docu functional specs"
|
124
|
+
Spec::Rake::SpecTask.new :docu do |t|
|
125
|
+
t.spec_files = 'spec/docu*_spec.rb'
|
126
|
+
t.spec_opts << @spec_opts
|
127
|
+
end
|
128
|
+
|
129
|
+
desc "YAML Config functional specs"
|
130
|
+
Spec::Rake::SpecTask.new :yamlconfig do |t|
|
131
|
+
t.spec_files = 'spec/yaml*_spec.rb'
|
132
|
+
t.spec_opts << @spec_opts
|
133
|
+
end
|
103
134
|
end
|
104
135
|
|
105
|
-
namespace :albacore do
|
106
|
-
|
136
|
+
namespace :albacore do
|
137
|
+
require 'lib/albacore'
|
138
|
+
|
139
|
+
#global configuration options
|
140
|
+
Albacore::yaml_config_folder = "spec/support/yamlconfig"
|
141
|
+
Albacore::log_level = :verbose
|
107
142
|
|
108
|
-
|
109
|
-
|
143
|
+
desc "Run a complete Albacore build sample"
|
144
|
+
task :sample => ['albacore:assemblyinfo',
|
110
145
|
'albacore:msbuild',
|
111
146
|
'albacore:ncoverconsole',
|
112
147
|
'albacore:ncoverreport',
|
@@ -114,115 +149,131 @@ namespace :albacore do
|
|
114
149
|
'albacore:mspec',
|
115
150
|
'albacore:nunit',
|
116
151
|
'albacore:xunit']
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
renametask do |rename|
|
173
|
-
FileUtils.touch 'web.uat.config.example'
|
152
|
+
|
153
|
+
desc "Run a sample MSBuild with YAML autoconfig"
|
154
|
+
msbuild
|
155
|
+
|
156
|
+
desc "Run a sample assembly info generator"
|
157
|
+
assemblyinfo do |asm|
|
158
|
+
asm.version = "0.1.2.3"
|
159
|
+
asm.company_name = "a test company"
|
160
|
+
asm.product_name = "a product name goes here"
|
161
|
+
asm.title = "my assembly title"
|
162
|
+
asm.description = "this is the assembly description"
|
163
|
+
asm.copyright = "copyright some year, by some legal entity"
|
164
|
+
asm.custom_attributes :SomeAttribute => "some value goes here", :AnotherAttribute => "with some data"
|
165
|
+
|
166
|
+
asm.output_file = "spec/support/AssemblyInfo/AssemblyInfo.cs"
|
167
|
+
end
|
168
|
+
|
169
|
+
desc "Run a sample NCover Console code coverage"
|
170
|
+
ncoverconsole do |ncc|
|
171
|
+
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
172
|
+
File.delete(@xml_coverage) if File.exist?(@xml_coverage)
|
173
|
+
|
174
|
+
ncc.log_level = :verbose
|
175
|
+
ncc.path_to_command = "spec/support/Tools/NCover-v3.3/NCover.Console.exe"
|
176
|
+
ncc.output :xml => @xml_coverage
|
177
|
+
ncc.working_directory = "spec/support/CodeCoverage/nunit"
|
178
|
+
|
179
|
+
nunit = NUnitTestRunner.new("spec/support/Tools/NUnit-v2.5/nunit-console-x86.exe")
|
180
|
+
nunit.log_level = :verbose
|
181
|
+
nunit.assemblies "assemblies/TestSolution.Tests.dll"
|
182
|
+
nunit.options '/noshadow'
|
183
|
+
|
184
|
+
ncc.testrunner = nunit
|
185
|
+
end
|
186
|
+
|
187
|
+
desc "Run a sample NCover Report to check code coverage"
|
188
|
+
ncoverreport :ncoverreport => :ncoverconsole do |ncr|
|
189
|
+
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
190
|
+
|
191
|
+
ncr.path_to_command = "spec/support/Tools/NCover-v3.3/NCover.Reporting.exe"
|
192
|
+
ncr.coverage_files @xml_coverage
|
193
|
+
|
194
|
+
fullcoveragereport = NCover::FullCoverageReport.new
|
195
|
+
fullcoveragereport.output_path = "spec/support/CodeCoverage/report/output"
|
196
|
+
ncr.reports fullcoveragereport
|
197
|
+
|
198
|
+
ncr.required_coverage(
|
199
|
+
NCover::BranchCoverage.new(:minimum => 10),
|
200
|
+
NCover::CyclomaticComplexity.new(:maximum => 1)
|
201
|
+
)
|
202
|
+
end
|
203
|
+
|
204
|
+
desc "Run the sample for renaming a File"
|
205
|
+
rename do |rename|
|
206
|
+
FileUtils.touch 'web.uat.config.example'
|
174
207
|
|
175
|
-
|
176
|
-
|
177
|
-
|
208
|
+
rename.actual_name = 'web.uat.config.example'
|
209
|
+
rename.target_name = 'web.config.example'
|
210
|
+
end
|
178
211
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
212
|
+
desc "Run ZipDirectory example"
|
213
|
+
zip do |zip|
|
214
|
+
zip.output_path = File.dirname(__FILE__)
|
215
|
+
zip.directories_to_zip = "lib", "spec"
|
216
|
+
zip.additional_files "README.markdown"
|
217
|
+
zip.output_file = 'albacore_example.zip'
|
218
|
+
end
|
219
|
+
|
220
|
+
desc "Run UnZip example"
|
221
|
+
unzip do |zip|
|
222
|
+
zip.unzip_path = File.join File.dirname(__FILE__), 'temp'
|
223
|
+
zip.zip_file = 'albacore_example.zip'
|
224
|
+
end
|
186
225
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
226
|
+
desc "MSpec Test Runner Example"
|
227
|
+
mspec do |mspec|
|
228
|
+
mspec.path_to_command = "spec/support/Tools/Machine.Specification-v0.2/Machine.Specifications.ConsoleRunner.exe"
|
229
|
+
mspec.assemblies "spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll"
|
230
|
+
end
|
231
|
+
|
232
|
+
desc "NUnit Test Runner Example"
|
233
|
+
nunit do |nunit|
|
234
|
+
nunit.path_to_command = "spec/support/Tools/NUnit-v2.5/nunit-console.exe"
|
235
|
+
nunit.assemblies "spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll"
|
236
|
+
end
|
237
|
+
|
238
|
+
desc "XUnit Test Runner Example"
|
239
|
+
xunit do |xunit|
|
240
|
+
xunit.path_to_command = "spec/support/Tools/XUnit-v1.5/xunit.console.exe"
|
241
|
+
xunit.assembly = "spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll"
|
242
|
+
end
|
243
|
+
|
244
|
+
desc "Exec Task Example"
|
245
|
+
exec do |exec|
|
246
|
+
exec.command = 'hostname'
|
247
|
+
end
|
248
|
+
|
249
|
+
desc "Mono \ xBuild Example"
|
250
|
+
mono do |xbuild|
|
251
|
+
xbuild.properties :configuration => :release, :platform => 'Any CPU'
|
252
|
+
xbuild.targets :clean, :build
|
253
|
+
xbuild.solution = "spec/support/TestSolution/TestSolution.sln"
|
254
|
+
end
|
204
255
|
end
|
205
256
|
|
206
257
|
namespace :jeweler do
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
258
|
+
require 'jeweler'
|
259
|
+
Jeweler::Tasks.new do |gs|
|
260
|
+
gs.name = "albacore"
|
261
|
+
gs.summary = "A Suite of Rake Build Tasks For .Net Solutions"
|
262
|
+
gs.description = "Easily build your .NET solutions with rake, using this suite of rake tasks."
|
263
|
+
gs.email = "derickbailey@gmail.com"
|
264
|
+
gs.homepage = "http://albacorebuild.net"
|
265
|
+
gs.authors = ["Derick Bailey", "Ben Hall", "Steven Harman"]
|
266
|
+
gs.has_rdoc = false
|
267
|
+
gs.files.exclude("albacore.gemspec", ".gitignore", "spec/support/Tools")
|
268
|
+
|
269
|
+
gs.add_dependency('rake', '>= 0.8.7')
|
270
|
+
gs.add_dependency('net-ssh', '>= 2.0.15')
|
271
|
+
gs.add_dependency('net-sftp', '>= 2.0.2')
|
272
|
+
gs.add_dependency('rubyzip', '>= 0.9.1')
|
273
|
+
|
274
|
+
gs.add_development_dependency('rspec', '>= 1.2.8')
|
275
|
+
gs.add_development_dependency('jeweler', '>= 1.2.1')
|
276
|
+
gs.add_development_dependency('derickbailey-notamock', '>= 0.0.1')
|
277
|
+
gs.add_development_dependency('jekyll', '>= 0.5.4')
|
278
|
+
end
|
228
279
|
end
|