albacore 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +17 -7
- data/VERSION +1 -1
- data/install_dependencies.rb +46 -0
- data/lib/albacore.rb +1 -0
- data/lib/albacore/command.rb +23 -0
- data/lib/albacore/expandtemplates.rb +19 -4
- data/lib/albacore/msbuild.rb +3 -0
- data/lib/albacore/mspectestrunner.rb +22 -8
- data/lib/albacore/nunittestrunner.rb +5 -4
- data/lib/albacore/sftp.rb +19 -3
- data/lib/albacore/ssh.rb +20 -3
- data/lib/albacore/xunittestrunner.rb +48 -0
- data/lib/albacore/zipdirectory.rb +33 -12
- data/lib/rake/assemblyinfotask.rb +9 -15
- data/lib/rake/commandtask.rb +16 -0
- data/lib/rake/expandtemplatestask.rb +8 -14
- data/lib/rake/msbuildtask.rb +10 -15
- data/lib/rake/mspectask.rb +16 -0
- data/lib/rake/ncoverconsoletask.rb +9 -15
- data/lib/rake/ncoverreporttask.rb +9 -15
- data/lib/rake/nunittask.rb +9 -15
- data/lib/rake/renametask.rb +11 -16
- data/lib/rake/sftptask.rb +8 -14
- data/lib/rake/sqlcmdtask.rb +9 -15
- data/lib/rake/sshtask.rb +8 -14
- data/lib/rake/support/albacoretask.rb +19 -0
- data/lib/rake/xunittask.rb +16 -0
- data/lib/rake/ziptask.rb +9 -14
- data/rakefile.rb +95 -11
- data/spec/command_spec.rb +23 -0
- data/spec/commandtask_spec.rb +31 -0
- data/spec/expandtemplates_spec.rb +52 -0
- data/spec/expandtemplatestask_spec.rb +1 -1
- data/spec/msbuild_spec.rb +5 -5
- data/spec/msbuildtask_spec.rb +1 -1
- data/spec/mspectask_spec.rb +31 -0
- data/spec/ncoverconsole_spec.rb +43 -43
- data/spec/ncoverconsoletask_spec.rb +1 -1
- data/spec/ncoverreport_spec.rb +51 -51
- data/spec/ncoverreporttask_spec.rb +1 -1
- data/spec/nunittask_spec.rb +1 -1
- data/spec/nunittestrunner_spec.rb +64 -0
- data/spec/patches/system_patch.rb +5 -1
- data/spec/renametask_spec.rb +1 -1
- data/spec/sftptask_spec.rb +1 -1
- data/spec/sqlcmd_spec.rb +39 -39
- data/spec/sqlcmdtask_spec.rb +1 -1
- data/spec/sshtask_spec.rb +1 -1
- data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/xunit.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/xunit.xml +2306 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +19 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/Properties/AssemblyInfo.cs +36 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +69 -0
- data/spec/support/TestSolution/TestSolution.sln +6 -0
- data/spec/support/expandtemplates/datafiles/sample_with_include.yml +2 -0
- data/spec/support/expandtemplates/datafiles/template_specific_data_file_with_include.yml +5 -0
- data/spec/support/expandtemplates/datafiles/template_specific_include.yml +3 -0
- data/spec/support/expandtemplatestestdata.rb +8 -0
- data/spec/support/spec_helper.rb +2 -0
- data/spec/xunittask_spec.rb +31 -0
- data/spec/zip_spec.rb +3 -3
- data/spec/ziptask_spec.rb +2 -1
- metadata +42 -4
@@ -1,22 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def assemblyinfotask(name=:assemblyinfo, *args, &block)
|
4
|
+
Albacore::AssemblyInfoTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class AssemblyInfoTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:assemblyinfo, &block)
|
8
|
-
@name = name
|
8
|
+
class AssemblyInfoTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@asm = AssemblyInfo.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@asm) unless @block.nil?
|
17
|
-
@asm.write
|
18
|
-
fail if @asm.failed
|
19
|
-
end
|
11
|
+
@block.call(@asm, *task_args) unless @block.nil?
|
12
|
+
@asm.write
|
13
|
+
fail if @asm.failed
|
20
14
|
end
|
21
15
|
end
|
22
16
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
def commandtask(name=:command, *args, &block)
|
4
|
+
Albacore::CommandTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
7
|
+
module Albacore
|
8
|
+
class CommandTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
10
|
+
cmd = Command.new
|
11
|
+
@block.call(cmd, *task_args) unless @block.nil?
|
12
|
+
cmd.execute
|
13
|
+
fail if cmd.failed
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,21 +1,15 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def expandtemplatestask(name=:expandtemplates, *args, &block)
|
4
|
+
Albacore::ExpandTemplatesTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class ExpandTemplatesTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:expandtemplates, &block)
|
8
|
-
@name = name
|
8
|
+
class ExpandTemplatesTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@exp = ExpandTemplates.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
def define
|
15
|
-
task @name do
|
16
|
-
@block.call(@exp) unless @block.nil?
|
17
|
-
@exp.expand
|
18
|
-
end
|
11
|
+
@block.call(@exp, *task_args) unless @block.nil?
|
12
|
+
@exp.expand
|
19
13
|
end
|
20
14
|
end
|
21
15
|
end
|
data/lib/rake/msbuildtask.rb
CHANGED
@@ -1,22 +1,17 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def msbuildtask(name=:msbuild, *args, &block)
|
4
|
+
Albacore::MSBuildTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class MSBuildTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:msbuild, &block)
|
8
|
-
@name = name
|
8
|
+
class MSBuildTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@msbuild = MSBuild.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@msbuild) unless @block.nil?
|
17
|
-
@msbuild.build
|
18
|
-
fail if @msbuild.failed
|
19
|
-
end
|
11
|
+
@block.call(@msbuild, *task_args) unless @block.nil?
|
12
|
+
@msbuild.build
|
13
|
+
fail if @msbuild.failed
|
20
14
|
end
|
21
15
|
end
|
16
|
+
|
22
17
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
def mspectask(name=:mspec, *args, &block)
|
4
|
+
Albacore::MSpecTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
7
|
+
module Albacore
|
8
|
+
class MSpecTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
10
|
+
@mspec = MSpecTestRunner.new
|
11
|
+
@block.call(@mspec, *task_args) unless @block.nil?
|
12
|
+
@mspec.execute
|
13
|
+
fail if @mspec.failed
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,22 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def ncoverconsoletask(name=:ncoverconsole, *args, &block)
|
4
|
+
Albacore::NCoverConsoleTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class NCoverConsoleTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:ncoverconsole, &block)
|
8
|
-
@name = name
|
8
|
+
class NCoverConsoleTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@ncover = NCoverConsole.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@ncover) unless @block.nil?
|
17
|
-
@ncover.run
|
18
|
-
fail if @ncover.failed
|
19
|
-
end
|
11
|
+
@block.call(@ncover, *task_args) unless @block.nil?
|
12
|
+
@ncover.run
|
13
|
+
fail if @ncover.failed
|
20
14
|
end
|
21
15
|
end
|
22
16
|
end
|
@@ -1,22 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def ncoverreporttask(name=:ncoverreport, *args, &block)
|
4
|
+
Albacore::NCoverReportTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class NCoverReportTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:ncoverreport, &block)
|
8
|
-
@name = name
|
8
|
+
class NCoverReportTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@ncoverreport = NCoverReport.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@ncoverreport) unless @block.nil?
|
17
|
-
@ncoverreport.run
|
18
|
-
fail if @ncoverreport.failed
|
19
|
-
end
|
11
|
+
@block.call(@ncoverreport, *task_args) unless @block.nil?
|
12
|
+
@ncoverreport.run
|
13
|
+
fail if @ncoverreport.failed
|
20
14
|
end
|
21
15
|
end
|
22
16
|
end
|
data/lib/rake/nunittask.rb
CHANGED
@@ -1,22 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def nunittask(name=:nunit, *args, &block)
|
4
|
+
Albacore::NUnitTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class NUnitTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:nunit, &block)
|
8
|
-
@name = name
|
8
|
+
class NUnitTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@nunit = NUnitTestRunner.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@nunit) unless @block.nil?
|
17
|
-
@nunit.execute
|
18
|
-
fail if @nunit.failed
|
19
|
-
end
|
11
|
+
@block.call(@nunit, *task_args) unless @block.nil?
|
12
|
+
@nunit.execute
|
13
|
+
fail if @nunit.failed
|
20
14
|
end
|
21
15
|
end
|
22
16
|
end
|
data/lib/rake/renametask.rb
CHANGED
@@ -1,24 +1,19 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def renametask(name=:rename, *args, &block)
|
4
|
+
Albacore::RenameTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class RenameTask <
|
5
|
-
attr_accessor :name
|
8
|
+
class RenameTask < Albacore::AlbacoreTask
|
6
9
|
attr_accessor :actual_name, :target_name
|
7
10
|
|
8
|
-
def
|
9
|
-
@
|
10
|
-
@
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(self) unless @block.nil?
|
17
|
-
if (@actual_name.nil? || @target_name.nil?)
|
18
|
-
fail
|
19
|
-
else
|
20
|
-
File.rename(@actual_name, @target_name)
|
21
|
-
end
|
11
|
+
def execute(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)
|
22
17
|
end
|
23
18
|
end
|
24
19
|
end
|
data/lib/rake/sftptask.rb
CHANGED
@@ -1,21 +1,15 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def sftptask(name=:sftp, *args, &block)
|
4
|
+
Albacore::SftpTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class SftpTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:sftp, &block)
|
8
|
-
@name = name
|
8
|
+
class SftpTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@sftp = Sftp.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@sftp) unless @block.nil?
|
17
|
-
@sftp.upload
|
18
|
-
end
|
11
|
+
@block.call(@sftp, *task_args) unless @block.nil?
|
12
|
+
@sftp.upload
|
19
13
|
end
|
20
14
|
end
|
21
15
|
end
|
data/lib/rake/sqlcmdtask.rb
CHANGED
@@ -1,22 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def sqlcmdtask(name=:sqlcmd, *args, &block)
|
4
|
+
Albacore::SQLCmdTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class SQLCmdTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:sqlcmd, &block)
|
8
|
-
@name = name
|
8
|
+
class SQLCmdTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@sqlcmd = SQLCmd.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@sqlcmd) unless @block.nil?
|
17
|
-
@sqlcmd.run
|
18
|
-
fail if @sqlcmd.failed
|
19
|
-
end
|
11
|
+
@block.call(@sqlcmd, *task_args) unless @block.nil?
|
12
|
+
@sqlcmd.run
|
13
|
+
fail if @sqlcmd.failed
|
20
14
|
end
|
21
15
|
end
|
22
16
|
end
|
data/lib/rake/sshtask.rb
CHANGED
@@ -1,21 +1,15 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def sshtask(name=:ssh, *args, &block)
|
4
|
+
Albacore::SshTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class SshTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:ssh, &block)
|
8
|
-
@name = name
|
8
|
+
class SshTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@ssh = Ssh.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@ssh) unless @block.nil?
|
17
|
-
@ssh.execute
|
18
|
-
end
|
11
|
+
@block.call(@ssh, *task_args) unless @block.nil?
|
12
|
+
@ssh.execute
|
19
13
|
end
|
20
14
|
end
|
21
15
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
module Albacore
|
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
|
+
define
|
11
|
+
end
|
12
|
+
|
13
|
+
def define
|
14
|
+
task *@args do |task, task_args|
|
15
|
+
execute task_args
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
|
3
|
+
def xunittask(name=:xunit, *args, &block)
|
4
|
+
Albacore::XUnitTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
7
|
+
module Albacore
|
8
|
+
class XUnitTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
10
|
+
@xunit = XUnitTestRunner.new
|
11
|
+
@block.call(@xunit, *task_args) unless @block.nil?
|
12
|
+
@xunit.execute
|
13
|
+
fail if @xunit.failed
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/rake/ziptask.rb
CHANGED
@@ -1,21 +1,16 @@
|
|
1
1
|
require 'rake/tasklib'
|
2
2
|
|
3
|
+
def ziptask(name=:zip, *args, &block)
|
4
|
+
Albacore::ZipTask.new(name, *args, &block)
|
5
|
+
end
|
6
|
+
|
3
7
|
module Albacore
|
4
|
-
class ZipTask <
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(name=:zip, &block)
|
8
|
-
@name = name
|
8
|
+
class ZipTask < Albacore::AlbacoreTask
|
9
|
+
def execute(task_args)
|
9
10
|
@zip = ZipDirectory.new
|
10
|
-
@block
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def define
|
15
|
-
task name do
|
16
|
-
@block.call(@zip) unless @block.nil?
|
17
|
-
@zip.package
|
18
|
-
end
|
11
|
+
@block.call(@zip, *task_args) unless @block.nil?
|
12
|
+
@zip.package
|
13
|
+
fail if @zip.failed
|
19
14
|
end
|
20
15
|
end
|
21
16
|
end
|
data/rakefile.rb
CHANGED
@@ -52,29 +52,78 @@ namespace :specs do
|
|
52
52
|
t.spec_files = 'spec/ssh*_spec.rb'
|
53
53
|
t.spec_opts << @spec_opts
|
54
54
|
end
|
55
|
+
|
56
|
+
desc "SFTP functional specs"
|
57
|
+
Spec::Rake::SpecTask.new :sftp do |t|
|
58
|
+
t.spec_files = 'spec/sftp*_spec.rb'
|
59
|
+
t.spec_opts << @spec_opts
|
60
|
+
end
|
55
61
|
|
56
62
|
desc "Expand Templates functional specs"
|
57
|
-
Spec::Rake::SpecTask.new :
|
63
|
+
Spec::Rake::SpecTask.new :templates do |t|
|
58
64
|
t.spec_files = 'spec/expandtemplates*_spec.rb'
|
59
65
|
t.spec_opts << @spec_opts
|
60
|
-
|
66
|
+
end
|
67
|
+
|
68
|
+
desc "Zip functional specs"
|
69
|
+
Spec::Rake::SpecTask.new :zip do |t|
|
70
|
+
t.spec_files = 'spec/zip*_spec.rb'
|
71
|
+
t.spec_opts << @spec_opts
|
72
|
+
end
|
73
|
+
|
74
|
+
desc "XUnit functional specs"
|
75
|
+
Spec::Rake::SpecTask.new :xunit do |t|
|
76
|
+
t.spec_files = 'spec/xunit*_spec.rb'
|
77
|
+
t.spec_opts << @spec_opts
|
78
|
+
end
|
79
|
+
|
80
|
+
desc "NUnit functional specs"
|
81
|
+
Spec::Rake::SpecTask.new :nunit do |t|
|
82
|
+
t.spec_files = 'spec/nunit*_spec.rb'
|
83
|
+
t.spec_opts << @spec_opts
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "MSpec functional specs"
|
87
|
+
Spec::Rake::SpecTask.new :mspec do |t|
|
88
|
+
t.spec_files = 'spec/mspec*_spec.rb'
|
89
|
+
t.spec_opts << @spec_opts
|
90
|
+
end
|
91
|
+
|
92
|
+
desc "Command functional specs"
|
93
|
+
Spec::Rake::SpecTask.new :command do |t|
|
94
|
+
t.spec_files = 'spec/command*_spec.rb'
|
95
|
+
t.spec_opts << @spec_opts
|
96
|
+
end
|
97
|
+
|
98
|
+
desc "Rename functional specs"
|
99
|
+
Spec::Rake::SpecTask.new :rename do |t|
|
100
|
+
t.spec_files = 'spec/rename*_spec.rb'
|
101
|
+
t.spec_opts << @spec_opts
|
102
|
+
end
|
61
103
|
end
|
62
104
|
|
63
105
|
namespace :albacore do
|
64
106
|
require 'lib/albacore'
|
65
107
|
|
66
108
|
desc "Run a complete Albacore build sample"
|
67
|
-
task :sample => ['albacore:assemblyinfo',
|
109
|
+
task :sample => ['albacore:assemblyinfo',
|
110
|
+
'albacore:msbuild',
|
111
|
+
'albacore:ncoverconsole',
|
112
|
+
'albacore:ncoverreport',
|
113
|
+
'albacore:rename',
|
114
|
+
'albacore:mspec',
|
115
|
+
'albacore:nunit',
|
116
|
+
'albacore:xunit']
|
68
117
|
|
69
118
|
desc "Run a sample build using the MSBuildTask"
|
70
|
-
|
119
|
+
msbuildtask do |msb|
|
71
120
|
msb.properties = {:configuration => :Debug}
|
72
121
|
msb.targets [:Clean, :Build]
|
73
122
|
msb.solution = "spec/support/TestSolution/TestSolution.sln"
|
74
123
|
end
|
75
124
|
|
76
125
|
desc "Run a sample assembly info generator"
|
77
|
-
|
126
|
+
assemblyinfotask do |asm|
|
78
127
|
asm.version = "0.1.2.3"
|
79
128
|
asm.company_name = "a test company"
|
80
129
|
asm.product_name = "a product name goes here"
|
@@ -87,7 +136,7 @@ namespace :albacore do
|
|
87
136
|
end
|
88
137
|
|
89
138
|
desc "Run a sample NCover Console code coverage"
|
90
|
-
|
139
|
+
ncoverconsoletask do |ncc|
|
91
140
|
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
92
141
|
File.delete(@xml_coverage) if File.exist?(@xml_coverage)
|
93
142
|
|
@@ -96,7 +145,7 @@ namespace :albacore do
|
|
96
145
|
ncc.output = {:xml => @xml_coverage}
|
97
146
|
ncc.working_directory = "spec/support/CodeCoverage/nunit"
|
98
147
|
|
99
|
-
nunit = NUnitTestRunner.new("spec/support/Tools/NUnit-v2.5/nunit-console.exe")
|
148
|
+
nunit = NUnitTestRunner.new("spec/support/Tools/NUnit-v2.5/nunit-console-x86.exe")
|
100
149
|
nunit.log_level = :verbose
|
101
150
|
nunit.assemblies << "assemblies/TestSolution.Tests.dll"
|
102
151
|
nunit.options << '/noshadow'
|
@@ -105,7 +154,7 @@ namespace :albacore do
|
|
105
154
|
end
|
106
155
|
|
107
156
|
desc "Run a sample NCover Report to check code coverage"
|
108
|
-
|
157
|
+
ncoverreporttask :ncoverreport => :ncoverconsole do |ncr|
|
109
158
|
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
|
110
159
|
|
111
160
|
ncr.path_to_command = "spec/support/Tools/NCover-v3.3/NCover.Reporting.exe"
|
@@ -118,6 +167,40 @@ namespace :albacore do
|
|
118
167
|
ncr.required_coverage << NCover::BranchCoverage.new(:minimum => 10)
|
119
168
|
ncr.required_coverage << NCover::CyclomaticComplexity.new(:maximum => 1)
|
120
169
|
end
|
170
|
+
|
171
|
+
desc "Run the sample for renaming a File"
|
172
|
+
renametask do |rename|
|
173
|
+
FileUtils.touch 'web.uat.config.example'
|
174
|
+
|
175
|
+
rename.actual_name = 'web.uat.config.example'
|
176
|
+
rename.target_name = 'web.config.example'
|
177
|
+
end
|
178
|
+
|
179
|
+
desc "Run ZipDirectory example"
|
180
|
+
ziptask do |zip|
|
181
|
+
zip.output_path = File.dirname(__FILE__)
|
182
|
+
zip.directories_to_zip = ["lib", "spec"]
|
183
|
+
zip.additional_files = "README.markdown"
|
184
|
+
zip.file = 'albacore_example.zip'
|
185
|
+
end
|
186
|
+
|
187
|
+
desc "MSpec Test Runner Example"
|
188
|
+
mspectask do |mspec|
|
189
|
+
mspec.path_to_command = "spec/support/Tools/Machine.Specification-v0.2/Machine.Specifications.ConsoleRunner.exe"
|
190
|
+
mspec.assemblies << "spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll"
|
191
|
+
end
|
192
|
+
|
193
|
+
desc "NUnit Test Runner Example"
|
194
|
+
nunittask do |nunit|
|
195
|
+
nunit.path_to_command = "spec/support/Tools/NUnit-v2.5/nunit-console.exe"
|
196
|
+
nunit.assemblies << "spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll"
|
197
|
+
end
|
198
|
+
|
199
|
+
desc "XUnit Test Runner Example"
|
200
|
+
xunittask do |xunit|
|
201
|
+
xunit.path_to_command = "spec/support/Tools/XUnit-v1.5/xunit.console.exe"
|
202
|
+
xunit.assemblies << "spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll"
|
203
|
+
end
|
121
204
|
end
|
122
205
|
|
123
206
|
namespace :jeweler do
|
@@ -125,10 +208,10 @@ namespace :jeweler do
|
|
125
208
|
Jeweler::Tasks.new do |gs|
|
126
209
|
gs.name = "albacore"
|
127
210
|
gs.summary = "A Suite of Rake Build Tasks For .Net Solutions"
|
128
|
-
gs.description = "Easily build your .NET solutions with rake, using this suite of
|
211
|
+
gs.description = "Easily build your .NET solutions with rake, using this suite of rake tasks."
|
129
212
|
gs.email = "derickbailey@gmail.com"
|
130
|
-
gs.homepage = "http://
|
131
|
-
gs.authors = ["Derick Bailey", "Ben Hall"]
|
213
|
+
gs.homepage = "http://albacorebuild.net"
|
214
|
+
gs.authors = ["Derick Bailey", "Ben Hall", "Steven Harman"]
|
132
215
|
gs.has_rdoc = false
|
133
216
|
gs.files.exclude("albacore.gemspec", ".gitignore", "spec/support/Tools")
|
134
217
|
|
@@ -140,5 +223,6 @@ namespace :jeweler do
|
|
140
223
|
gs.add_development_dependency('rspec', '>= 1.2.8')
|
141
224
|
gs.add_development_dependency('jeweler', '>= 1.2.1')
|
142
225
|
gs.add_development_dependency('derickbailey-notamock', '>= 0.0.1')
|
226
|
+
gs.add_development_dependency('jekyll', '>= 0.5.4')
|
143
227
|
end
|
144
228
|
end
|