albacore 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 125d41e32b2bbac2550a2eef4c0da84593bcf8fe
4
- data.tar.gz: c850a38572d46972aef5ebdb000d7d363ac4cbdb
3
+ metadata.gz: 3199dffeb6514d20b0d70ad82103f3f9966136b0
4
+ data.tar.gz: f8d0a29b38090c7cfb97482e6713978bd36865cb
5
5
  SHA512:
6
- metadata.gz: 51eb2096aa4ba6760c580e62c9569d49b36d09d8130827246af393e4e63a21ff456b2446df7bfb87b654aa925e5842985f1fb7c01b72422caf4e583d4509b9e0
7
- data.tar.gz: e2f0bde8c465699e804a97501cd8957ba2a849f34281ba6dfc7ac16682d970f7d4fcefc514af5ac1856f8b03797a8f5931c71ca3195f2f969a0ea659884e6f9c
6
+ metadata.gz: 089ea6cc92e8331a35b135b7ce6ff3397bacafbbfc6ead76e741f2d3df3c77c0c657984957fbaf0b413a37636d8afe8c3a3c238d3d5ad944f78bb7898672f398
7
+ data.tar.gz: 62383f56f6bdffd54ad5f5f7144bfb8e300317e2ecccc3f4d840e9eaabab81733e6f15ef2e662f03b11c7b6ab95162501d33aafb9172ddc882f2f7f44655eeb3
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Albacore v2.0
2
2
 
3
3
  [![Version ](https://img.shields.io/gem/v/albacore.svg?style=flat)](https://rubygems.org/gems/albacore)
4
- [![Build Status](http://img.shields.io/travis/albacore/albacore/master.svg?style=flat)](http://travis-ci.org/Albacore/albacore)
4
+ [![Build Status](http://img.shields.io/travis/Albacore/albacore/master.svg?style=flat)](http://travis-ci.org/Albacore/albacore)
5
5
  [![Gittip ](http://img.shields.io/gittip/haf.svg?style=flat)](http://gittip.com/haf)
6
- [![Code Climate](https://img.shields.io/codeclimate/github/albacore/albacore.svg?style=flat)](https://codeclimate.com/github/albacore/albacore)
6
+ [![Code Climate](https://img.shields.io/codeclimate/github/Albacore/albacore.svg?style=flat)](https://codeclimate.com/github/albacore/albacore)
7
7
 
8
8
  Albacore is a suite of tools for the professional .Net or mono developer that
9
9
  make their life easier.
@@ -13,8 +13,6 @@ make their life easier.
13
13
  ## Main Features
14
14
 
15
15
  - Runs .Net and mono builds on OS X, Windows and Linux quick and painless
16
- - Actively developed by Henrik Feldt, Software Architect at
17
- [Intelliplan](http://intelliplan.se)
18
16
  - Manage xbuild/msbuild transparently
19
17
  - NuGet restore without intrusive .nuget target files in your project files,
20
18
  authentication supported
@@ -35,6 +33,15 @@ make their life easier.
35
33
  your company!
36
34
  - Transparent publish of artifacts to TeamCity with the TC extension
37
35
  - Unit tested, high quality Ruby code
36
+ - Actively developed by Henrik Feldt, Software Architect at
37
+ [Intelliplan](http://intelliplan.se) - there's someone looking after the
38
+ code. We're active and taking pull requests - an open source project is not a
39
+ single-person game, but it's nice to have some stability.
40
+
41
+ The [wiki](https://github.com/Albacore/albacore/wiki) is the main reference for
42
+ the above task types, but there's also [very
43
+ extensive](http://rubydoc.info/gems/albacore/2.0.0/frames) documentation in the
44
+ code, as well as hundreds of unit tests written in a easy-to-read rspec syntax.
38
45
 
39
46
  ## Getting Started
40
47
 
@@ -46,6 +53,11 @@ First create `Gemfile` with these contents:
46
53
  source 'https://rubygems.org'
47
54
  gem 'albacore', '2.0.0'
48
55
 
56
+ When setting up your build you need to ensure it is reproducible. Bundler
57
+ allows you to lock down the few gems that Albacore depend on to their specific
58
+ versions, ensuring that your peers can re-run the same build script you just
59
+ built and that it works well on your continous integration server.
60
+
49
61
  Now you can bundle the dependencies, effectively freezing all gem dependencies
50
62
  that your build depends on.
51
63
 
@@ -77,23 +89,6 @@ Continue below with your first Rakefile.
77
89
 
78
90
  ## Creating Your First Rakefile
79
91
 
80
- Bundler is a tool that fetches gems for you. Now, specify what ruby gems your
81
- build will use. Create a new file, named `Gemfile`. This file should look like
82
- this:
83
-
84
- source 'https://rubygems.org'
85
- gem 'albacore', '2.0.0'
86
-
87
- When setting up your build you need to ensure it is reproducible. Bundler
88
- allows you to lock down all gems that albacore depend on to their specific
89
- versions, ensuring that your peers can re-run the same rake script you just
90
- built and that it works well on your continous integration server.
91
-
92
- The first step after installing `bundler` is to create a `Gemfile` next to your
93
- Now, install albacore from this repository by running:
94
-
95
- bundle
96
-
97
92
  In order to build your project, you need to create a `Rakefile`, with contents
98
93
  like these:
99
94
 
@@ -115,7 +110,7 @@ end
115
110
  desc 'restore all nugets as per the packages.config files'
116
111
  nugets_restore :restore do |p|
117
112
  p.out = 'src/packages'
118
- p.exe = 'buildsupport/NuGet.exe'
113
+ p.exe = 'tools/NuGet.exe'
119
114
  end
120
115
 
121
116
  desc 'Perform full build'
@@ -158,334 +153,6 @@ You can now run:
158
153
  a. Make sure TravisCI is OK with it
159
154
  b. Describe your PR in English.
160
155
 
161
- ## DSL
162
-
163
- When you `require 'albacore'` you will get a few methods added and available for
164
- use within your Rakefile, these are specified in CrossPlatformCmd, and are as
165
- follows:
166
-
167
- - `#system` : (processPath : string) -> (arguments : string array)
168
- - `#sh` : same as above
169
- - `#shie` : same as above
170
- - `#which` : (binaryName : string) -> (path : string)
171
- - `#normalise_slashes` - takes a path-looking string and normalises the
172
- slashes to the operating system that the command is running on. So for
173
- Windows, you'd get back-slashes and for linux forward slashes.
174
- - `#chdir (work_dir : ?string) (block : Block<unit, x>) : x` - takes a string work dir to be
175
- in and a block of ruby to execute in that work dir and returns the return
176
- value of block.
177
-
178
-
179
- ## Debugging Albacore scripts
180
-
181
- You can call the rakefile as such:
182
-
183
- ```
184
- DEBUG=true rake
185
- ```
186
-
187
- This changes the behaviour of the logging to output debug verbosity. It also
188
- changes some tasks to override Rakefile settings for verbosity and prints more
189
- debug information. I've tried to keep the information structured.
190
-
191
- If you're reporting a bug or need crash information to file a bug report, you
192
- can append the `--trace` flag to the invocation.
193
-
194
- ```
195
- DEBUG=true rake --trace
196
- ```
197
-
198
- ## Task Types
199
-
200
- Task types are the pre-built factories for rake tasks. They often take care of
201
- what's slightly more complex, beyond just invoking commands. They are available
202
- and methods in the DSL you get when you do `require 'albacore'`
203
-
204
- ### Docs: build
205
-
206
- ``` ruby
207
- require 'albacore'
208
- build :compile_this do |b|
209
- b.file = Paths.join 'src', 'MyProj.fsproj' # the file that you want to build
210
- # b.sln = Paths.join 'src', 'MyProj.sln' # alt. name
211
- b.target = ['Clean', 'Rebuild'] # call with an array of targets or just a single target
212
- b.prop 'Configuration', 'Release' # call with 'key, value', to specify a MsBuild property
213
- b.cores = 4 # no of cores to build with, defaults to the number of cores on your machine
214
- b.clp 'ShowEventId' # any parameters you want to pass to the console logger of MsBuild
215
- b.logging = 'verbose' # verbose logging mode
216
- # b.be_quiet # opposite of the above
217
- b.no_logo # no Microsoft/XBuild header output
218
- end
219
-
220
- ```
221
-
222
- ### Docs: nugets_pack
223
-
224
- ``` ruby
225
- nugets_pack :create_nugets do |p|
226
- p.files = FileList['src/**/*.{csproj,fsproj,nuspec}'].
227
- exclude(/Tests/)
228
- p.out = 'build/pkg'
229
- p.exe = 'buildsupport/NuGet.exe'
230
- p.with_metadata do |m|
231
- m.description = 'A cool nuget'
232
- m.authors = 'Henrik'
233
- m.version = ENV['NUGET_VERSION']
234
- end
235
- p.with_package do |p|
236
- p.add_file 'file/relative/to/proj', 'lib/net40'
237
- end
238
- end
239
- ```
240
-
241
- #### nugets_pack Config##no_project_dependencies
242
-
243
- Cancel following of references between projects that cause nugets_pack to find and add as nuget dependencies, linked projects.
244
-
245
- ### Docs: nugets_restore
246
-
247
- Enables nuget restore throughout the solution.
248
-
249
- ``` ruby
250
- nugets_restore :restore do |p|
251
- p.out = 'src/packages' # required
252
- p.exe = 'buildsupport/NuGet.exe' # required
253
- p.list_spec = '**/packages.config' # optional
254
- p.exclude_version # exclude version number in directory name where NuGet package will be restored
255
- end
256
- ```
257
-
258
- ### Docs: asmver
259
-
260
- Generate a single file with assembly attributes. Code comments in example below
261
- mention output in F#.
262
-
263
- ``` ruby
264
- asmver :asmver do |a|
265
- a.file_path = 'src/Version.fs' # required, no default
266
- a.namespace = 'Hello.World' # required for F#, defaults to empty string '' for C#
267
- # optional
268
- a.attributes assembly_title: 'Hello.World', # generates: [<AssemblyTitle("Hello.World")>]
269
- assembly_version: '0.1.2', # generates: [<AssemblyVersion("0.1.2")>]
270
- my_product_attr: 'Hello world', # generates: [<MyProductAttr("Hello World")>]
271
- a.out = StringIO.new # optional, don't use it this way: takes an IO/Stream
272
- end
273
- ```
274
-
275
- ### Docs: asmver_files
276
-
277
- ``` ruby
278
- desc 'create assembly infos'
279
- asmver_files :assembly_info do |a|
280
- a.files = FileList['**/*proj'] # optional, will find all projects recursively by default
281
-
282
- # attributes are required:
283
- a.attributes assembly_description: "My wonderful lib",
284
- assembly_configuration: 'RELEASE',
285
- assembly_company: 'Wonders Inc.',
286
- assembly_copyright: "(c) #{Time.now.year} by John Doe",
287
- assembly_version: ENV['LONG_VERSION'],
288
- assembly_file_version: ENV['LONG_VERSION'],
289
- assembly_informational_version: ENV['BUILD_VERSION']
290
-
291
- # optional, not widely supported yet, as there's no way to read the attributes
292
- # file an issue if you have a use-case
293
- a.handle_config do |proj, conf|
294
- # do something with configuration
295
- # conf.attributes ...
296
- end
297
- end
298
- ```
299
-
300
-
301
-
302
- ### Docs: test_runner
303
-
304
- ``` ruby
305
- test_runner :tests do |tests|
306
- tests.files = FileList['**/*.Tests/bin/Release/*.Tests.dll'] # dll files with test
307
- tests.exe = 'src/packages/NUnit.Runners.2.5.3/tools/nunit-console.exe' # executable to run tests with
308
- tests.add_parameter '/TestResults=Lallaa.xml' # you may add parameters to the execution
309
- tests.copy_local # when running from network share
310
- end
311
- ```
312
-
313
- ### Docs: nugets_authentication
314
-
315
- TBD
316
-
317
- ### Docs: appspecs
318
-
319
- Example rakefile (see
320
- [spec/test_appspecs/corp.service](https://github.com/Albacore/albacore/tree/master/spec/test_appspecs/corp.service)
321
- in albacore source).
322
-
323
- ``` ruby
324
- require 'bundler/setup'
325
- require 'albacore'
326
-
327
- Configuration = ENV['CONFIGURATION'] || 'Release'
328
-
329
- desc 'build example project'
330
- build :compile do |b|
331
- b.sln = 'corp.service.svc.sln'
332
- b.prop 'Configuration', Configuration
333
- end
334
-
335
- desc 'build service packages from all the appspecs'
336
- appspecs :services => :compile do |as|
337
- as.files = Dir.glob '**/.appspec', File::FNM_DOTMATCH
338
- as.out = 'build'
339
- end
340
-
341
- task :default => :services
342
- ```
343
-
344
- This example Rakefile will create RPMs on RHEL-derivative systems, DEBs on
345
- Debian-derivative systems and Chocolatey packages on Windows, as well as publish
346
- those packages to the CI server.
347
-
348
- As usual you can use Albacore.subscribe to jack into the output of this
349
- task-type, if you e.g. want to publish your packages to your package server -
350
- DAB or YUM. If you include the TeamCity extension, your TeamCity server will
351
- automatically become a chocolatey package server that you can use
352
- [puppet-chocolatey](git@github.com:karaaie/puppet-chocolatey.git) to install the
353
- packages of on your Windows boxen. Or you can use puppet proper with a yum repo
354
- on your linux boxen.
355
-
356
- The appspec simply looks something like this:
357
-
358
- ``` yaml
359
- ---
360
- version: 1.2.3
361
- authors: Henrik Feldt
362
- ```
363
-
364
- You can put any nuget-spec property there in `snake_case` and it will be set in
365
- the resulting nuget file. When building RPMs, the title of the project file will
366
- be used as the id (the non-lowercased title will be used for the NuGet).
367
-
368
- This task-type works by checking if it's running on Windows, and then running
369
- chocolatey, otherwise running fpm. This means that you have to have either
370
- installed, depending on your OS of choice.
371
-
372
- #### Known .appspec options
373
-
374
- **project_path** - if you are, say, building a package from a web site (like
375
- CSharpWeb is an example of), then you probably don't want to package all of your
376
- .cs files, nor would you like to package only the bin folder. Instead you add
377
- the .appspec to the list of files in the csproj file, so that it gets copied
378
- when you have a local publish like this:
379
-
380
- ``` ruby
381
- build :pkg_web do |b|
382
- b.file = 'CSharpWeb/CSharpWeb.csproj'
383
- b.prop 'DeployOnBuild', 'true'
384
- b.prop 'PublishProfile', 'local'
385
- b.prop 'Configuration', Configuration
386
- end
387
- ```
388
-
389
- After calling this task, you'll find the appspec at `CSharpWeb/build/.appspec`
390
- (which mean it's part of the contents of the site). Now it's easy for albacore
391
- to find it and create a package from it, but it can't easily find the project
392
- that corresponds to it, because it's not next to the csproj file.
393
-
394
- This is where `project_path` comes in; make it something like
395
- `../CSharpWeb.csproj` in the .appspec file and then albacore knows where to get
396
- the data from.
397
-
398
- **provider** - `defaults` or `iis_site` -- needs to be specified currently if
399
- you're building a site -- a nice PR would be to discover that from the project
400
- type.
401
-
402
- **deploy_dir** - fully qualified path to deploy the contents
403
-
404
- #### Example IIS Site `.appspec` file
405
-
406
- ``` yaml
407
- ---
408
- authors: Intelliplan Employees
409
- provider: iis_site
410
- project_path: ../CMDB.Web.csproj
411
- ```
412
-
413
- ## Tasks
414
-
415
- Tasks are things you can include that create singleton ruby tasks that are
416
- pre-named and pre-made. As opposed to the task types, these are 'includeable'.
417
- More info can be found in the
418
- [README](https://github.com/Albacore/albacore/blob/master/lib/albacore/tasks/README.md).
419
-
420
- ### Versionizer
421
-
422
- Helper for reading a `.semver` file and moving information from that file, as
423
- well as information from the git commit being built upon, to the execution of
424
- rake/albacore.
425
-
426
- Defines/sets ENV vars:
427
-
428
- * BUILD_VERSION
429
- * NUGET_VERSION
430
- * FORMAL_VERSION
431
-
432
- BUILD_VERSION s constructed as such: `.semver-file -> %Major.%minor.%patch%special.git-sha1`.
433
-
434
- NUGET_VERSION leaves out the git commit hash.
435
-
436
- FORMAL_VERSION uses only the integers 'major', 'minor' and 'patch'.
437
-
438
- Publishes symbol `:build_version`.
439
-
440
- ``` ruby
441
- require 'albacore/tasks/versionizer'
442
- Albacore::Tasks::Versionizer.new :versioning
443
- ```
444
-
445
- ## Tools
446
-
447
- Tools are auxilliary items in albacore. They do not have the same amount of
448
- testing and are more often one-off utilities. Most of these should be moved to
449
- being commands in an albacore binary.
450
-
451
- ### Docs: csprojfiles
452
-
453
- Checks the difference between the filesystem and the files referenced in a
454
- csproj, to make sure that they match. Run as a part of a CI build.
455
-
456
- ``` ruby
457
- desc "Check the difference between the filesystem and the files referenced in a csproj"
458
- csprojfiles do |f|
459
- # Files to ignore
460
- # for instance if you have source control specific files that are not supposed to be in the project
461
- f.ignore_files = [/.*\.srccontrol/]
462
- f.project = "src/MyMvcSite/MyMvcSite.csproj"
463
- end
464
- ```
465
-
466
- When you run this task it will report any differences between the filesystem and
467
- the csproj file.
468
-
469
- Why is this important? It's important to know what resources will be deployed.
470
- For instance if you have added an image. If you forgot to include the image in
471
- the .csproj, it will show up while developing but not when you do a web
472
- deployment (i.e. a release).
473
-
474
- It could also be that you have deleted a file, but forgotten to save the project
475
- when you send your latest commit to source control&hellip;
476
-
477
- How do you use it? The best way is to have it on a CI server in order to get a
478
- notification whenever it detects deviations.
479
-
480
- The task will fail with a message and rake will return with an non zero exit
481
- code. For instance if a file is missing from csproj and another from the
482
- filesystem:
483
-
484
- - Files in src/MyMvcSite/MyMvcSite.csproj but not on filesystem:
485
- file_missing_on_filesystem.cshtml
486
- + Files not in src/MyMvcSite/MyMvcSite.csproj but on filesystem:
487
- file_missing_in_csproj.png
488
-
489
156
  ## Writing Code
490
157
 
491
158
  1. Add a rspec spec in specs/
@@ -499,69 +166,3 @@ Document your code with
499
166
  writing it: it's much easier to write the documentation together with the code
500
167
  than afterwards.
501
168
 
502
- ## Docs: Zippy
503
-
504
- This is a simple example which uses rubyzip to recursively generate a zip file
505
- from the contents of a specified directory. The directory itself is not included
506
- in the archive, rather just its contents.
507
-
508
- Usage:
509
-
510
- ``` ruby
511
- dir_to_zip = "/tmp/input"
512
- out_file = "/tmp/out.zip"
513
- zf = Zippy.new dir_to_zip, out_file
514
- zf.write
515
- ```
516
-
517
- Or:
518
-
519
- ``` ruby
520
- z = Zippy.new(directory_to_zip, output_file) { |f| f.include? 'html' }
521
- z.write
522
- ```
523
-
524
- ## Albacore v1.0
525
-
526
- Please browse
527
- [https://github.com/Albacore/albacore/tree/releases/v1.x](https://github.com/Albacore/albacore/tree/releases/v1.x)
528
- for all of the README and code for v1.0 (which is API compatible with all pre
529
- 1.0 releases).
530
-
531
- ## Ideas:
532
-
533
- When building multiple configurations,
534
- Build tasks should be invoked with different parameters
535
- According to the graph of tasks to be executed
536
-
537
- ``` ruby
538
- require 'albacore'
539
-
540
- Albacore.vary_by_parameters do |params|
541
- # write to dynamic method
542
- params.Configuration = ['Debug-Tests', 'Release']
543
- end
544
-
545
- build :b do |b|
546
- b.vary_by_param 'Configuration'
547
- end
548
-
549
- nugets_pack :p => :b do |p|
550
- # ...
551
- end
552
-
553
- task :default => :p
554
- ```
555
-
556
- Creating two runs
557
- * `:b[Debug-Tests] => :p => :default` and
558
- * `:b[Release] => :p => :default`
559
-
560
- where only :b is invoked twice, but :p and :default are only invoked only once
561
- each.
562
-
563
- ---
564
-
565
- When building services and/or web sites,
566
- The bundling task_type should take care of packaging for deployment
567
-
@@ -347,7 +347,7 @@ end})
347
347
  verify_files: false,
348
348
  nuget_dependencies: true })
349
349
 
350
- trace { "#from_xxproj proj: #{proj} opts: #{opts} [nuget model: package]" }
350
+ trace { "#from_xxproj proj: '#{proj}' opts: #{opts} [nuget model: package]" }
351
351
 
352
352
  version = opts.get :version
353
353
  package = Package.new
@@ -17,9 +17,11 @@ module Albacore
17
17
  attr_reader :proj_path_base, :proj_filename, :proj_xml_node
18
18
 
19
19
  def initialize proj_path
20
+ raise ArgumentError, 'project path does not exist' unless File.exists? proj_path.to_s
20
21
  proj_path = proj_path.to_s unless proj_path.is_a? String
21
22
  @proj_xml_node = Nokogiri.XML(open(proj_path))
22
23
  @proj_path_base, @proj_filename = File.split proj_path
24
+ sanity_checks
23
25
  end
24
26
 
25
27
  # get the project name specified in the project file
@@ -171,6 +173,9 @@ module Albacore
171
173
  end
172
174
 
173
175
  private
176
+ def sanity_checks
177
+ warn { "project '#{@proj_filename}' has no name" } unless name
178
+ end
174
179
 
175
180
  def read_property prop_name
176
181
  txt = @proj_xml_node.css("Project PropertyGroup #{prop_name}").inner_text
@@ -269,7 +269,7 @@ module Albacore
269
269
  project_dependencies = @opts.get(:project_dependencies, true)
270
270
  target = @opts.get :target
271
271
 
272
- trace "creating NON-SYMBOL package for #{proj.name}, targeting #{target} [nugets pack: task]"
272
+ trace "creating NON-SYMBOL package for '#{proj.name}', targeting '#{target}' [nugets pack: task]"
273
273
  nuspec = Albacore::NugetModel::Package.from_xxproj proj,
274
274
  symbols: false,
275
275
  verify_files: true,
@@ -285,7 +285,7 @@ module Albacore
285
285
  trace { "nuspec: #{nuspec.to_s} [nugets pack: task]" }
286
286
 
287
287
  if @opts.get(:symbols)
288
- trace { "creating SYMBOL package for #{proj.name} [nugets pack: task]" }
288
+ trace { "creating SYMBOL package for '#{proj.name}' [nugets pack: task]" }
289
289
  nuspec_symbols = Albacore::NugetModel::Package.from_xxproj proj,
290
290
  symbols: true,
291
291
  verify_files: true,
@@ -18,25 +18,35 @@ module Albacore
18
18
  # constructor, no parameters
19
19
  def initialize
20
20
  @copy_local = false
21
+ @clr_command = true
21
22
  @files = []
22
23
  end
23
24
 
24
- # gets the configured options
25
+ # Gets the configured options from the test runner configuration.
26
+ #
25
27
  def opts
26
28
  Map.new(
27
- :files => files,
28
- :copy_local => @copy_local,
29
- :exe => @exe,
30
- :parameters => @parameters)
29
+ :files => files,
30
+ :copy_local => @copy_local,
31
+ :exe => @exe,
32
+ :parameters => @parameters,
33
+ :clr_command => @clr_command)
31
34
  end
32
35
 
33
- # mark that it should be possible to copy the test files local
36
+ # Mark that it should be possible to copy the test files local
34
37
  # -- this is great if you are running a VM and the host disk is
35
38
  # mapped as a network drive, which crashes some test runners
36
39
  def copy_local
37
40
  @copy_local = true
38
41
  end
39
42
 
43
+ # Call this on the confiuguration if you don't want 'mono' prefixed to the
44
+ # exe path on non-windows systems.
45
+ #
46
+ def native_exe
47
+ @clr_command = false
48
+ end
49
+
40
50
  private
41
51
  def files
42
52
  if @files.respond_to? :each
@@ -52,9 +62,10 @@ module Albacore
52
62
 
53
63
  # expects both parameters and executable to be relative to the
54
64
  # work_dir parameter
55
- def initialize work_dir, executable, parameters, file
65
+ def initialize work_dir, executable, parameters, file, clr_command = true
56
66
  @work_dir, @executable = work_dir, executable
57
67
  @parameters = parameters.to_a.unshift(file)
68
+ @clr_command = clr_command
58
69
  end
59
70
 
60
71
  def execute
@@ -62,7 +73,7 @@ module Albacore
62
73
  system @executable,
63
74
  @parameters,
64
75
  :work_dir => @work_dir,
65
- :clr_command => true
76
+ :clr_command => @clr_command
66
77
  end
67
78
  end
68
79
 
@@ -86,7 +97,10 @@ module Albacore
86
97
  def execute_tests_for dll
87
98
  handle_directory dll, @opts.get(:exe) do |dir, exe|
88
99
  filename = File.basename dll
89
- cmd = Albacore::TestRunner::Cmd.new dir, exe, @opts.get(:parameters, []), filename
100
+ cmd = Albacore::TestRunner::Cmd.new dir,
101
+ exe, @opts.get(:parameters, []),
102
+ filename,
103
+ @opts.get(:clr_command)
90
104
  cmd.execute
91
105
  end
92
106
  end
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -18,6 +18,9 @@ describe ::Albacore::TestRunner::Config do
18
18
  it do
19
19
  should respond_to :exe=
20
20
  end
21
+ it do
22
+ should respond_to :native_exe
23
+ end
21
24
  end
22
25
  describe ::Albacore::TestRunner::Config do
23
26
  subject do
@@ -26,11 +29,16 @@ describe ::Albacore::TestRunner::Config do
26
29
 
27
30
  before :each do
28
31
  subject.add_parameter '/TestResults=/b/c/d/e.xml'
32
+ subject.native_exe
29
33
  end
30
34
 
31
35
  it 'should have the appropriate parameter in #opts.get(:parameters)' do
32
36
  subject.opts.get(:parameters).should include('/TestResults=/b/c/d/e.xml')
33
37
  end
38
+
39
+ it 'should have clr_command=false' do
40
+ expect(subject.opts.get(:clr_command)).to be false
41
+ end
34
42
  end
35
43
 
36
44
  describe 'the order of which parameters are passed', ::Albacore::TestRunner::Config do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: albacore
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Feldt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-21 00:00:00.000000000 Z
12
+ date: 2014-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake