albacore 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +2 -0
- data/README.markdown +35 -71
- data/VERSION +1 -1
- data/lib/albacore/config/mstesttestrunnerconfig.rb +15 -0
- data/lib/albacore/msbuild.rb +2 -1
- data/lib/albacore/mstesttestrunner.rb +43 -0
- data/lib/albacore/nuspec.rb +2 -1
- data/lib/albacore/output.rb +1 -0
- data/lib/albacore/sqlcmd.rb +3 -1
- data/rakefile.rb +15 -2
- data/spec/msbuild_spec.rb +20 -1
- data/spec/mstesttestrunner_spec.rb +142 -0
- data/spec/nuspec_spec.rb +1 -0
- data/spec/sqlcmd_spec.rb +20 -0
- metadata +9 -7
- data/EULA.txt +0 -19
data/.bundle/config
ADDED
data/README.markdown
CHANGED
@@ -1,79 +1,16 @@
|
|
1
1
|
# Welcome to the albacore project.
|
2
2
|
|
3
|
-
albacore is a
|
4
|
-
|
5
|
-
## How To Install albacore:
|
6
|
-
|
7
|
-
If you would like to install the current, stable release of albacore, you can do so easily through the standard RubyGems.org server. Follow these simple instructions and you will be good to go.
|
8
|
-
|
9
|
-
> gem install albacore
|
10
|
-
|
11
|
-
That's it! You're now equiped with everything you need to get up and running with albacore!
|
12
|
-
|
13
|
-
## How To Manually Build And Install The albacore Gem
|
14
|
-
|
15
|
-
If you would like to install the latest source code for albacore, and get all the new features and functionality (possibly in an unstable form), you can manually build and install the albacore gem. Follow these simple instructions and you will be good to go.
|
16
|
-
|
17
|
-
**Step 1:** Clone albacore
|
18
|
-
|
19
|
-
Use your Github account to fork albacore, or clone it directly from my public clone URL.
|
20
|
-
|
21
|
-
> git clone git://github.com/derickbailey/albacore.git albacore
|
22
|
-
|
23
|
-
**Step 2:** Install Required Dependencies
|
24
|
-
|
25
|
-
You will need the Bundler gem installed, to install the other albacore dependencies
|
26
|
-
|
27
|
-
> gem install bundler
|
28
|
-
|
29
|
-
In your local clone of albacore, run bundler
|
30
|
-
|
31
|
-
> bundle install
|
32
|
-
|
33
|
-
This will install all of the gem dependencies that you need to build the albacore gem and add your own contributions to albacore.
|
34
|
-
|
35
|
-
**Step 3:** Build the gem
|
36
|
-
|
37
|
-
In your local clone of albacore, use the jeweler rake tasks to build the latest version of the albacore code into a gem.
|
38
|
-
|
39
|
-
> rake jeweler:gemspec jeweler:build
|
40
|
-
|
41
|
-
this will produce an 'albacore-#.#.#.gem' file in the 'pkg' folder, where '#.#.#' is the version number. For example 'albacore-0.1.2.gem'.
|
42
|
-
|
43
|
-
**Step 4:** Install the gem
|
44
|
-
|
45
|
-
After building the gem, you can install it from your local file system.
|
46
|
-
|
47
|
-
> gem install -l pkg/albacore-#.#.#.gem
|
48
|
-
|
49
|
-
where '#.#.#' is the version number of the gem. For example 'albacore-0.1.2.gem'
|
3
|
+
albacore is a suite of Rake tasks to automate the process of building a .NET based system. It's like MSBuild or Nant... but without all the stabby-bracket xmlhell.
|
50
4
|
|
51
5
|
## How To Use albacore
|
52
6
|
|
53
|
-
|
54
|
-
|
55
|
-
require 'rubygems'
|
56
|
-
|
57
|
-
to the top of your rakefile. Then, you can add
|
58
|
-
|
59
|
-
require 'albacore'
|
60
|
-
|
61
|
-
to your rakefile. This will allow you to use the tasks that albacore includes.
|
7
|
+
Check out the [albacore Wiki](http://wiki.github.com/derickbailey/albacore) for detailed instructions on how to use the built in tasks and their options.
|
62
8
|
|
63
|
-
|
64
|
-
msbuild do |msb|
|
65
|
-
msb.properties :configuration => :Debug
|
66
|
-
msb.targets :Clean, :Build
|
67
|
-
msb.solution = "spec/support/TestSolution/TestSolution.sln"
|
68
|
-
end
|
69
|
-
|
70
|
-
Beyond the simple example, check out the [albacore Wiki](http://wiki.github.com/derickbailey/albacore) for detailed instructions on how to use the built in tasks and their options.
|
9
|
+
If you are new to Ruby and Rake, head over to the [getting started](https://github.com/derickbailey/Albacore/wiki/Getting-Started) wiki page.
|
71
10
|
|
72
11
|
## How To Contribute, Collaborate, Communicate
|
73
12
|
|
74
|
-
|
75
|
-
|
76
|
-
Anyone can fork the main repository and submit patches, as well. And lastly, the [wiki](http://wiki.github.com/derickbailey/albacore) and [issues list](http://github.com/derickbailey/albacore/issues) are also open for additions, edits, and discussion.
|
13
|
+
See the wiki page for [contributing to albacore](https://github.com/derickbailey/Albacore/wiki/HowToContribute)
|
77
14
|
|
78
15
|
## Contributors
|
79
16
|
|
@@ -84,12 +21,14 @@ Many thanks for contributions to albacore are due (in alphabetical order):
|
|
84
21
|
* [Ben Hall](http://github.com/benhall): Primary contributor. SSH, SFTP, ZipDirectory, Rename, YAML auto config, Wiki pages, and many other great additions
|
85
22
|
* [Brett Veenstra](http://github.com/brettveenstra): SQLCmd options (truted connection, batch abort), etc
|
86
23
|
* [Brian Donahue](http://github.com/briandonahue): Inspiration and initial code for the ExpandTemplates task
|
87
|
-
* [
|
24
|
+
* [ChrisAnn](http://github.com/ChrisAnn): MSBuild logger module settings
|
25
|
+
* [Chris Geihsler](http://github.com/geihsler): MSTest task
|
26
|
+
* [Dotan Nahum](http://github.com/jondot): NChurn task, Output task, wiki updates, etc
|
88
27
|
* [Hernan Garcia](http://github.com/hgarcia): Specflow Report task
|
89
28
|
* [Hibri Marzook](http://github.com/hibri): PLink (deprecated) and NDepend tasks
|
90
|
-
* [James Gregory](http://github.com/jagregory): Docu task, zip task contributions
|
29
|
+
* [James Gregory](http://github.com/jagregory): Docu task, zip task contributions, nuspec contributions, etc
|
91
30
|
* [Kevin Colyar](http://github.com/kevincolyar): Testing and updating of MSBuild to work with Cygwin
|
92
|
-
* [Louis Salin](http://github.com/louissalin): Support for
|
31
|
+
* [Louis Salin](http://github.com/louissalin): Support for nix path separators in CSC task
|
93
32
|
* [Mark Boltuc](http://github.com/mboltuc): Fluent Migrator task
|
94
33
|
* [Mark Wilkins](http://github.com/markwilk): VB.NET Language Generator For The AssemblyInfo Task
|
95
34
|
* [Mike Nichols](http://github.com/mnichols): XUnit contributions, bug reports, etc
|
@@ -101,4 +40,29 @@ Many thanks for contributions to albacore are due (in alphabetical order):
|
|
101
40
|
* [Steven Harman](http://github.com/stevenharman): Primary contributor. Nant task, issue tickets, disucssions, and much much more.
|
102
41
|
* [Steve Hebert](http://github.com/stevehebert): Nuspec task
|
103
42
|
* [Steven Johnson](http://github.com/2020steve): Expand Templates (deprecated task) supplimental data, etc
|
104
|
-
* [
|
43
|
+
* [thomasvm](http://github.com/thomasvm): AssemblyInfo read / update existing file, MSSql additions
|
44
|
+
* [Tobias Grimm](http://github.com/e-tobi): AssemblyInfo custom\_data, working directory code refactoring, relative project paths for executables
|
45
|
+
|
46
|
+
And to anyone and everyone else who has contributed in any way, to the mailing list, spreading the word, blog posts, etc: thank you!
|
47
|
+
|
48
|
+
## Legal Mumbo Jumbo (MIT License)
|
49
|
+
|
50
|
+
Copyright (c) 2011 Derick Bailey
|
51
|
+
|
52
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
53
|
+
of this software and associated documentation files (the "Software"), to deal
|
54
|
+
in the Software without restriction, including without limitation the rights
|
55
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
56
|
+
copies of the Software, and to permit persons to whom the Software is
|
57
|
+
furnished to do so, subject to the following conditions:
|
58
|
+
|
59
|
+
The above copyright notice and this permission notice shall be included in
|
60
|
+
all copies or substantial portions of the Software.
|
61
|
+
|
62
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
63
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
64
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
65
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
66
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
67
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
68
|
+
THE SOFTWARE.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'albacore/support/openstruct'
|
3
|
+
|
4
|
+
module Configuration
|
5
|
+
module MSTest
|
6
|
+
include Albacore::Configuration
|
7
|
+
|
8
|
+
def mstest
|
9
|
+
@mstestconfig ||= OpenStruct.new.extend(OpenStructToHash).extend(MSTest)
|
10
|
+
yield(@mstestconfig) if block_given?
|
11
|
+
@mstestconfig
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
data/lib/albacore/msbuild.rb
CHANGED
@@ -6,7 +6,7 @@ class MSBuild
|
|
6
6
|
include Albacore::RunCommand
|
7
7
|
include Configuration::MSBuild
|
8
8
|
|
9
|
-
attr_accessor :solution, :verbosity
|
9
|
+
attr_accessor :solution, :verbosity, :loggermodule
|
10
10
|
attr_array :targets
|
11
11
|
attr_hash :properties
|
12
12
|
|
@@ -25,6 +25,7 @@ class MSBuild
|
|
25
25
|
command_parameters = []
|
26
26
|
command_parameters << "\"#{solution}\""
|
27
27
|
command_parameters << "\"/verbosity:#{@verbosity}\"" if @verbosity != nil
|
28
|
+
command_parameters << "\"/logger:#{@loggermodule}\"" if @loggermodule != nil
|
28
29
|
command_parameters << build_properties if @properties != nil
|
29
30
|
command_parameters << "\"/target:#{build_targets}\"" if @targets != nil
|
30
31
|
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'albacore/albacoretask'
|
2
|
+
|
3
|
+
class MSTestTestRunner
|
4
|
+
TaskName = :mstest
|
5
|
+
include Albacore::Task
|
6
|
+
include Albacore::RunCommand
|
7
|
+
|
8
|
+
attr_array :assemblies, :tests, :options
|
9
|
+
|
10
|
+
def initialize(command=nil)
|
11
|
+
@options=[]
|
12
|
+
@assemblies=[]
|
13
|
+
@tests=[]
|
14
|
+
super()
|
15
|
+
update_attributes Albacore.configuration.mstest.to_hash
|
16
|
+
@command = command unless command.nil?
|
17
|
+
end
|
18
|
+
|
19
|
+
def get_command_line
|
20
|
+
command_params = []
|
21
|
+
command_params << @command
|
22
|
+
command_params << get_command_parameters
|
23
|
+
commandline = command_params.join(" ")
|
24
|
+
@logger.debug "Build MSTest Test Runner Command Line: " + commandline
|
25
|
+
commandline
|
26
|
+
end
|
27
|
+
|
28
|
+
def get_command_parameters
|
29
|
+
command_params = []
|
30
|
+
command_params << @options.join(" ") unless @options.nil?
|
31
|
+
command_params << @assemblies.map{|asm| "/testcontainer:\"#{asm}\""}.join(' ') unless @assemblies.nil?
|
32
|
+
command_params << @tests.map{|test| "/test:#{test}"}.join(' ') unless @tests.nil?
|
33
|
+
command_params
|
34
|
+
end
|
35
|
+
|
36
|
+
def execute()
|
37
|
+
command_params = get_command_parameters
|
38
|
+
result = run_command "MSTest", command_params.join(" ")
|
39
|
+
|
40
|
+
failure_message = 'MSTest Failed. See Build Log For Detail'
|
41
|
+
fail_with_message failure_message if !result
|
42
|
+
end
|
43
|
+
end
|
data/lib/albacore/nuspec.rb
CHANGED
@@ -31,7 +31,7 @@ end
|
|
31
31
|
class Nuspec
|
32
32
|
include Albacore::Task
|
33
33
|
|
34
|
-
attr_accessor :id, :version, :authors, :description, :language, :licenseUrl, :projectUrl, :output_file,
|
34
|
+
attr_accessor :id, :version, :title, :authors, :description, :language, :licenseUrl, :projectUrl, :output_file,
|
35
35
|
:owners, :summary, :iconUrl, :requireLicenseAcceptance, :tags, :working_directory
|
36
36
|
|
37
37
|
def initialize()
|
@@ -79,6 +79,7 @@ class Nuspec
|
|
79
79
|
|
80
80
|
metadata.add_element('id').add_text(@id)
|
81
81
|
metadata.add_element('version').add_text(@version)
|
82
|
+
metadata.add_element('title').add_text(@title)
|
82
83
|
metadata.add_element('authors').add_text(@authors)
|
83
84
|
metadata.add_element('description').add_text(@description)
|
84
85
|
metadata.add_element('language').add_text(@language) if !@language.nil?
|
data/lib/albacore/output.rb
CHANGED
data/lib/albacore/sqlcmd.rb
CHANGED
@@ -4,7 +4,7 @@ class SQLCmd
|
|
4
4
|
include Albacore::Task
|
5
5
|
include Albacore::RunCommand
|
6
6
|
|
7
|
-
attr_accessor :server, :database, :username, :password, :trusted_connection, :batch_abort
|
7
|
+
attr_accessor :server, :database, :username, :password, :trusted_connection, :batch_abort, :severity
|
8
8
|
attr_array :scripts
|
9
9
|
attr_hash :variables
|
10
10
|
|
@@ -14,6 +14,7 @@ class SQLCmd
|
|
14
14
|
@variables={}
|
15
15
|
@trusted_connection = true
|
16
16
|
@batch_abort = true
|
17
|
+
@severity = nil
|
17
18
|
super()
|
18
19
|
update_attributes Albacore.configuration.sqlcmd.to_hash
|
19
20
|
end
|
@@ -29,6 +30,7 @@ class SQLCmd
|
|
29
30
|
cmd_params << build_variable_list if @variables.length > 0
|
30
31
|
cmd_params << get_batch_abort_param
|
31
32
|
cmd_params << build_script_list if @scripts.length > 0
|
33
|
+
cmd_params << build_parameter("V", @severity) unless @severity.nil?
|
32
34
|
|
33
35
|
result = run_command "SQLCmd", cmd_params.join(" ")
|
34
36
|
|
data/rakefile.rb
CHANGED
@@ -83,6 +83,12 @@ namespace :specs do
|
|
83
83
|
t.spec_opts << @spec_opts
|
84
84
|
end
|
85
85
|
|
86
|
+
desc "MSTest functional specs"
|
87
|
+
Spec::Rake::SpecTask.new :mstest do |t|
|
88
|
+
t.spec_files = FileList['spec/mstest*_spec.rb']
|
89
|
+
t.spec_opts << @spec_opts
|
90
|
+
end
|
91
|
+
|
86
92
|
desc "MSpec functional specs"
|
87
93
|
Spec::Rake::SpecTask.new :mspec do |t|
|
88
94
|
t.spec_files = FileList['spec/mspec*_spec.rb']
|
@@ -141,6 +147,7 @@ namespace :albacore do
|
|
141
147
|
'albacore:mspec',
|
142
148
|
'albacore:nunit',
|
143
149
|
'albacore:xunit',
|
150
|
+
'albacore:mstest',
|
144
151
|
'albacore:fluentmigrator']
|
145
152
|
|
146
153
|
desc "Run a sample MSBuild with YAML autoconfig"
|
@@ -233,6 +240,12 @@ namespace :albacore do
|
|
233
240
|
nunit.assemblies "spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll"
|
234
241
|
end
|
235
242
|
|
243
|
+
desc "MSTest Test Runner Example"
|
244
|
+
mstest do |mstest|
|
245
|
+
mstest.command = "spec/support/Tools/MSTest-2008/mstest.exe"
|
246
|
+
mstest.assemblies "spec/support/CodeCoverage/mstest/TestSolution.MsTestTests.dll"
|
247
|
+
end
|
248
|
+
|
236
249
|
desc "XUnit Test Runner Example"
|
237
250
|
xunit do |xunit|
|
238
251
|
xunit.command = "spec/support/Tools/XUnit-v1.5/xunit.console.exe"
|
@@ -270,9 +283,9 @@ namespace :jeweler do
|
|
270
283
|
gs.name = "albacore"
|
271
284
|
gs.summary = "Dolphin-Safe Rake Tasks For .NET Systems"
|
272
285
|
gs.description = "Easily build your .NET solutions with Ruby and Rake, using this suite of Rake tasks."
|
273
|
-
gs.email = "
|
286
|
+
gs.email = "albacorebuild@gmail.com"
|
274
287
|
gs.homepage = "http://albacorebuild.net"
|
275
|
-
gs.authors = ["Derick Bailey", "
|
288
|
+
gs.authors = ["Derick Bailey", "etc"]
|
276
289
|
gs.has_rdoc = false
|
277
290
|
gs.files.exclude(
|
278
291
|
"albacore.gemspec",
|
data/spec/msbuild_spec.rb
CHANGED
@@ -9,7 +9,7 @@ shared_examples_for "prepping msbuild" do
|
|
9
9
|
@msbuild = @testdata.msbuild
|
10
10
|
@strio = StringIO.new
|
11
11
|
@msbuild.log_device = @strio
|
12
|
-
@msbuild.log_level = :
|
12
|
+
@msbuild.log_level = :diagnostic
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -194,3 +194,22 @@ describe MSBuild, "when specifying multiple configuration properties" do
|
|
194
194
|
File.exist?(@testdata.output_path).should == true
|
195
195
|
end
|
196
196
|
end
|
197
|
+
|
198
|
+
describe MSBuild, "when specifying a loggermodule" do
|
199
|
+
it_should_behave_like "prepping msbuild"
|
200
|
+
|
201
|
+
before :all do
|
202
|
+
@msbuild.solution = @testdata.solution_path
|
203
|
+
@msbuild.loggermodule = "FileLogger,Microsoft.Build.Engine;logfile=MyLog.log"
|
204
|
+
@msbuild.execute
|
205
|
+
|
206
|
+
@log_data = @strio.string
|
207
|
+
end
|
208
|
+
|
209
|
+
it "should log the msbuild logger being used" do
|
210
|
+
puts @msbuild.system_command
|
211
|
+
@msbuild.system_command.should include("/logger:FileLogger,Microsoft.Build.Engine;logfile=MyLog.log")
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'albacore/mstesttestrunner'
|
3
|
+
|
4
|
+
shared_examples_for "mstest paths" do
|
5
|
+
before :all do
|
6
|
+
@mstestpath = File.join(File.dirname(__FILE__), 'support', 'Tools', 'MSTest-2008', 'mstest.exe')
|
7
|
+
@test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), 'support', 'CodeCoverage', 'mstest', 'TestSolution.MSTestTests.dll')
|
8
|
+
@test_option = "/test:Test"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe MSTestTestRunner, "the command parameters for an mstest runner" do
|
13
|
+
it_should_behave_like "mstest paths"
|
14
|
+
|
15
|
+
before :all do
|
16
|
+
mstest = MSTestTestRunner.new(@mstestpath)
|
17
|
+
mstest.assemblies @test_assembly
|
18
|
+
mstest.options @test_option
|
19
|
+
mstest.tests 'APassingTest', 'AFailingTest'
|
20
|
+
|
21
|
+
@command_parameters = mstest.get_command_parameters
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should not include the path to the command" do
|
25
|
+
@command_parameters.should_not include(@mstestpath)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should include the list of assemblies" do
|
29
|
+
@command_parameters.should include("/testcontainer:\"#{@test_assembly}\"")
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should include the specific set of tests" do
|
33
|
+
@command_parameters.should include("/test:APassingTest /test:AFailingTest")
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should include the list of options" do
|
37
|
+
@command_parameters.should include(@test_option)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe MSTestTestRunner, "the command line string for an mstest runner" do
|
42
|
+
it_should_behave_like "mstest paths"
|
43
|
+
|
44
|
+
before :all do
|
45
|
+
mstest = MSTestTestRunner.new(@mstestpath)
|
46
|
+
mstest.assemblies @test_assembly
|
47
|
+
|
48
|
+
@command_line = mstest.get_command_line
|
49
|
+
@command_parameters = mstest.get_command_parameters.join(" ")
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should start with the path to the command" do
|
53
|
+
@command_line.split(" ").first.should == @mstestpath
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should include the command parameters" do
|
57
|
+
@command_line.should include(@command_parameters)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
describe MSTestTestRunner, "when configured correctly" do
|
63
|
+
it_should_behave_like "mstest paths"
|
64
|
+
|
65
|
+
before :all do
|
66
|
+
mstest = MSTestTestRunner.new(@mstestpath)
|
67
|
+
mstest.extend(FailPatch)
|
68
|
+
mstest.assemblies @test_assembly
|
69
|
+
mstest.log_level = :verbose
|
70
|
+
mstest.tests "APassingTest"
|
71
|
+
mstest.execute
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should execute" do
|
75
|
+
$task_failed.should be_false
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe MSTestTestRunner, "when configured correctly, but a test fails" do
|
80
|
+
it_should_behave_like "mstest paths"
|
81
|
+
|
82
|
+
before :all do
|
83
|
+
mstest = MSTestTestRunner.new(@mstestpath)
|
84
|
+
mstest.extend(FailPatch)
|
85
|
+
mstest.assemblies @test_assembly
|
86
|
+
mstest.log_level = :verbose
|
87
|
+
mstest.tests "AFailingTest"
|
88
|
+
mstest.execute
|
89
|
+
end
|
90
|
+
|
91
|
+
it "should fail" do
|
92
|
+
$task_failed.should be_true
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
describe MSTestTestRunner, "when using the configuration command and not providing a command in the intializer" do
|
97
|
+
it_should_behave_like "mstest paths"
|
98
|
+
|
99
|
+
before :all do
|
100
|
+
Albacore.configure do |config|
|
101
|
+
config.mstest.command = "configured command"
|
102
|
+
end
|
103
|
+
@mstest = MSTestTestRunner.new
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should use the configuration command" do
|
107
|
+
@mstest.command.should == "configured command"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
describe MSTestTestRunner, "when the command has been set through configuration and providing a command in the intializer" do
|
112
|
+
it_should_behave_like "mstest paths"
|
113
|
+
|
114
|
+
before :all do
|
115
|
+
Albacore.configure do |config|
|
116
|
+
config.mstest.command = "configured command"
|
117
|
+
end
|
118
|
+
@mstest = MSTestTestRunner.new("initializer command")
|
119
|
+
end
|
120
|
+
|
121
|
+
it "should use the initializer command" do
|
122
|
+
@mstest.command.should == "initializer command"
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
describe MSTestTestRunner, "when configuration has been provided" do
|
127
|
+
before :all do
|
128
|
+
Albacore.configure do |config|
|
129
|
+
config.mstest do |mstest|
|
130
|
+
mstest.assemblies = ["foo.dll", "bar.dll"]
|
131
|
+
mstest.options = ["/test"]
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
@mstest = MSTestTestRunner.new
|
136
|
+
end
|
137
|
+
|
138
|
+
it "should use the provided configuration" do
|
139
|
+
@mstest.assemblies.should == ["foo.dll", "bar.dll"]
|
140
|
+
@mstest.options.should == ["/test"]
|
141
|
+
end
|
142
|
+
end
|
data/spec/nuspec_spec.rb
CHANGED
data/spec/sqlcmd_spec.rb
CHANGED
@@ -312,3 +312,23 @@ describe SQLCmd, "when providing configuration" do
|
|
312
312
|
sqlcmd.command.should == "configured"
|
313
313
|
end
|
314
314
|
end
|
315
|
+
|
316
|
+
describe SQLCmd, "when severity it set" do
|
317
|
+
before :all do
|
318
|
+
@cmd = SQLCmd.new
|
319
|
+
@cmd.extend(SystemPatch)
|
320
|
+
@cmd.disable_system = true
|
321
|
+
@cmd.scripts "somescript.sql"
|
322
|
+
|
323
|
+
@cmd.severity = 1
|
324
|
+
|
325
|
+
@cmd.execute
|
326
|
+
end
|
327
|
+
|
328
|
+
it "should have severity option set" do
|
329
|
+
@cmd.system_command.should include("-V")
|
330
|
+
end
|
331
|
+
it "should have severity set to correct value" do
|
332
|
+
@cmd.system_command.should include("-V \"1\"")
|
333
|
+
end
|
334
|
+
end
|
metadata
CHANGED
@@ -5,19 +5,17 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 5
|
9
|
+
version: 0.2.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Derick Bailey
|
13
|
-
- Ben Hall
|
14
|
-
- Steve Harman
|
15
13
|
- etc
|
16
14
|
autorequire:
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2011-
|
18
|
+
date: 2011-04-06 00:00:00 -05:00
|
21
19
|
default_executable:
|
22
20
|
dependencies:
|
23
21
|
- !ruby/object:Gem::Dependency
|
@@ -125,7 +123,7 @@ dependencies:
|
|
125
123
|
prerelease: false
|
126
124
|
version_requirements: *id007
|
127
125
|
description: Easily build your .NET solutions with Ruby and Rake, using this suite of Rake tasks.
|
128
|
-
email:
|
126
|
+
email: albacorebuild@gmail.com
|
129
127
|
executables: []
|
130
128
|
|
131
129
|
extensions: []
|
@@ -134,8 +132,8 @@ extra_rdoc_files:
|
|
134
132
|
- README.markdown
|
135
133
|
files:
|
136
134
|
- .autotest
|
135
|
+
- .bundle/config
|
137
136
|
- .rvmrc
|
138
|
-
- EULA.txt
|
139
137
|
- Gemfile
|
140
138
|
- README.markdown
|
141
139
|
- VERSION
|
@@ -154,6 +152,7 @@ files:
|
|
154
152
|
- lib/albacore/config/fluentmigratorrunnerconfig.rb
|
155
153
|
- lib/albacore/config/msbuildconfig.rb
|
156
154
|
- lib/albacore/config/mspectestrunnerconfig.rb
|
155
|
+
- lib/albacore/config/mstesttestrunnerconfig.rb
|
157
156
|
- lib/albacore/config/nantconfig.rb
|
158
157
|
- lib/albacore/config/nchurnconfig.rb
|
159
158
|
- lib/albacore/config/ncoverconsoleconfig.rb
|
@@ -174,6 +173,7 @@ files:
|
|
174
173
|
- lib/albacore/fluentmigratorrunner.rb
|
175
174
|
- lib/albacore/msbuild.rb
|
176
175
|
- lib/albacore/mspectestrunner.rb
|
176
|
+
- lib/albacore/mstesttestrunner.rb
|
177
177
|
- lib/albacore/nant.rb
|
178
178
|
- lib/albacore/nchurn.rb
|
179
179
|
- lib/albacore/ncoverconsole.rb
|
@@ -226,6 +226,7 @@ files:
|
|
226
226
|
- spec/fluentmigratorrunner_spec.rb
|
227
227
|
- spec/msbuild_spec.rb
|
228
228
|
- spec/mspec_spec.rb
|
229
|
+
- spec/mstesttestrunner_spec.rb
|
229
230
|
- spec/nant_spec.rb
|
230
231
|
- spec/nchurn_spec.rb
|
231
232
|
- spec/ncoverconsole_spec.rb
|
@@ -300,6 +301,7 @@ test_files:
|
|
300
301
|
- spec/fluentmigratorrunner_spec.rb
|
301
302
|
- spec/msbuild_spec.rb
|
302
303
|
- spec/mspec_spec.rb
|
304
|
+
- spec/mstesttestrunner_spec.rb
|
303
305
|
- spec/nant_spec.rb
|
304
306
|
- spec/nchurn_spec.rb
|
305
307
|
- spec/ncoverconsole_spec.rb
|
data/EULA.txt
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Copyright (c) 2010 Derick Bailey. All Rights Reserved.
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
all copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
THE SOFTWARE.
|