albacore 2.5.8 → 2.5.9

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: 7cea9701e83877d8f6a6a0ff1b03cf6edb323339
4
- data.tar.gz: 80a334c78c0f56b9b5538fed415b217a39cfb15a
3
+ metadata.gz: 9801c7ed5cef1ddabe9f23e38d41fb43959ca653
4
+ data.tar.gz: e038c9674250ff958da7b5b1a6a2e890ec8f21a8
5
5
  SHA512:
6
- metadata.gz: 71a0b5d41a28ed32c2fd5b1aabffb284af293168bdac97d14b285f6d60b1c3399cf70d616b48d6e8e7079b63a179d9baaa8798a949adf507c2d1cb7ac568e4b6
7
- data.tar.gz: 2f547c0645ac83afa2c09c727959709381a0dded7b28612372d933ad6b47697868bb66b8a2057ca0d4dcc18057ae029ebddc8e10f2b72b926dce9096833b1ac8
6
+ metadata.gz: 79132c321a3166d391a8e086000d5b502b240ff4ed8d2d7aac7a0b03d37eca1627783a16aa8a5174c54cc525d411afefe654e4f78e706a142d93ac8d3d11f1b8
7
+ data.tar.gz: ce83a1a5d446e91eada1f8d5bf5ebff013fdf669ae53e358e7dbebe725b7d3acf9ffd957a9254b42d3d1680473508637357365c9f8fe2868480215b37ad14893
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'rake'
4
2
  require 'nokogiri'
5
3
  require 'fileutils'
@@ -85,9 +83,7 @@ module Albacore
85
83
  args = ARGV.inject("") { |state, arg| state + " " + '"' + arg + '"' }
86
84
  warn do
87
85
  %{Couldn't match package, please run
88
-
89
86
  bundle exec rake DEBUG=true #{args} --trace
90
-
91
87
  and report a bug to albacore with the full output. Here's the nuget process output:
92
88
  --- START OUTPUT ---
93
89
  #{out}
@@ -138,6 +134,10 @@ and report a bug to albacore with the full output. Here's the nuget process outp
138
134
  # sets the files to search
139
135
  attr_writer :files
140
136
 
137
+ # sets the nuspec file
138
+ attr_writer :nuspec
139
+
140
+
141
141
  # sets the MsBuild configuration that is used to produce the output into
142
142
  # <OutputPath>...</OutputPath>
143
143
  attr_writer :configuration
@@ -193,12 +193,15 @@ and report a bug to albacore with the full output. Here's the nuget process outp
193
193
  def opts
194
194
  files = @files.respond_to?(:each) ? @files : [@files]
195
195
 
196
- [:authors, :description, :version].each do |required|
197
- warn "metadata##{required} is missing from nugets_pack [nugets pack: config]" if @package.metadata.send(required) == 'MISSING'
196
+ unless @nuspec
197
+ [:authors, :description, :version].each do |required|
198
+ warn "metadata##{required} is missing from nugets_pack [nugets pack: config]" if @package.metadata.send(required) == 'MISSING'
199
+ end
198
200
  end
199
201
 
200
202
  Map.new({
201
203
  :out => @out,
204
+ :nuspec => @nuspec,
202
205
  :exe => @exe,
203
206
  :symbols => @symbols,
204
207
  :package => @package,
@@ -227,18 +230,26 @@ and report a bug to albacore with the full output. Here's the nuget process outp
227
230
  include Logging
228
231
 
229
232
  def initialize opts, &before_execute
230
- raise ArgumentError, 'opts is not a map' unless opts.is_a? Map
231
- raise ArgumentError, 'no files given' unless opts.get(:files).length > 0
233
+
234
+ unless opts.get(:nuspec)
235
+ raise ArgumentError, 'opts is not a map' unless opts.is_a? Map
236
+ raise ArgumentError, 'no files given' unless opts.get(:files).length > 0
237
+ end
238
+
232
239
  @opts = opts.apply :out => '.'
233
240
  @files = opts.get :files
234
241
  @before_execute = before_execute
235
242
  end
236
243
 
237
244
  def execute
238
- knowns = compute_knowns
239
- @files.each do |p|
240
- proj, n, ns = generate_nuspec p, knowns
241
- execute_inner! proj, n, ns
245
+ unless @opts.get(:nuspec)
246
+ knowns = compute_knowns
247
+ @files.each do |p|
248
+ proj, n, ns = generate_nuspec p, knowns
249
+ execute_inner! proj, n, ns
250
+ end
251
+ else
252
+ create_nuget! "#{Dir.pwd}", @opts.get(:nuspec)
242
253
  end
243
254
  end
244
255
 
@@ -287,11 +298,8 @@ and report a bug to albacore with the full output. Here's the nuget process outp
287
298
  trace do
288
299
  %{
289
300
  PROJECT #{proj.name} nuspec:
290
-
291
301
  #{nuspec.to_xml}
292
-
293
302
  PROJECT #{proj.name} symbol nuspec:
294
-
295
303
  #{if nuspec_symbols then nuspec_symbols.to_xml else 'NO SYMBOLS' end}}
296
304
  end
297
305
 
@@ -360,6 +368,7 @@ and report a bug to albacore with the full output. Here's the nuget process outp
360
368
  out = path_to(@opts.get(:out), cwd)
361
369
  nuspec = path_to nuspec, cwd
362
370
  nuspec_symbols = path_to nuspec_symbols, cwd if nuspec_symbols
371
+
363
372
  cmd = Albacore::NugetsPack::Cmd.new exe,
364
373
  work_dir: cwd,
365
374
  out: out
@@ -442,4 +451,4 @@ and report a bug to albacore with the full output. Here's the nuget process outp
442
451
  end
443
452
  end
444
453
  end
445
- end
454
+ end
@@ -18,6 +18,7 @@ module Albacore
18
18
  # constructor, no parameters
19
19
  def initialize
20
20
  @copy_local = false
21
+ @is_ms_test = false
21
22
  @clr_command = true
22
23
  @files = []
23
24
  end
@@ -26,8 +27,9 @@ module Albacore
26
27
  #
27
28
  def opts
28
29
  Map.new(
29
- :files => files,
30
+ :files => files,
30
31
  :copy_local => @copy_local,
32
+ :is_ms_test => @is_ms_test,
31
33
  :exe => @exe,
32
34
  :parameters => @parameters,
33
35
  :clr_command => @clr_command)
@@ -47,6 +49,10 @@ module Albacore
47
49
  @clr_command = false
48
50
  end
49
51
 
52
+ def is_ms_test
53
+ @is_ms_test = true
54
+ end
55
+
50
56
  private
51
57
  def files
52
58
  if @files.respond_to? :each
@@ -69,7 +75,7 @@ module Albacore
69
75
  end
70
76
 
71
77
  def execute
72
- info { "executing in directory './#{@work_dir}'" }
78
+ info { "executing in directory '#{@work_dir}'" }
73
79
  system @executable,
74
80
  @parameters,
75
81
  :work_dir => @work_dir,
@@ -97,8 +103,13 @@ module Albacore
97
103
  def execute_tests_for dll
98
104
  handle_directory dll, @opts.get(:exe) do |dir, exe|
99
105
  filename = File.basename dll
106
+
107
+ if @opts.get(:is_ms_test)
108
+ filename = "/testcontainer:#{filename}"
109
+ end
100
110
  cmd = Albacore::TestRunner::Cmd.new dir,
101
- exe, @opts.get(:parameters, []),
111
+ exe,
112
+ @opts.get(:parameters, []),
102
113
  filename,
103
114
  @opts.get(:clr_command)
104
115
  cmd.execute
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.5.8"
2
+ VERSION = "2.5.9"
3
3
  end
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.5.8
4
+ version: 2.5.9
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: 2016-04-22 00:00:00.000000000 Z
12
+ date: 2016-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake