albacore 2.5.5 → 2.5.6

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: 85542d66384696f189f24a0f21558d9bc09132be
4
- data.tar.gz: 2123d8810cff6bff2c7593a12613f6b6978209e6
3
+ metadata.gz: 07faec03f515851ac25f361b7bbb0d6ac7401901
4
+ data.tar.gz: 1883a7acca5de06cd16389ce5a9760ff379786b6
5
5
  SHA512:
6
- metadata.gz: dfbbd01eb04114a1f60bbddaf4afe32df9194c6cfd42b3e35e9e75e961a05a69f95bac1c843f3601b530d2b97a633a82854e029d3a38e4369486b5235cb4d4b6
7
- data.tar.gz: 452747578a565fcf4482082b745fcfd9f58d533acbbe96153df6f7d7bf02f0ad0eea5c9bf52631004e5869b9ad69a4242237e7c3619b0f24b8a1d37df3041f4e
6
+ metadata.gz: 37f2ce80f96aa0f8ec7a4a1da9df2cdda9aa69c7ef3ab599bd2d579872016f9fa6b9890d94f9e34d80fba163b1324d359db82beedaf1ade873eca971ff68291d
7
+ data.tar.gz: c39261f7f74713222d0c88865220a728a52081b39af7fa6cc5a3e75890f3e1774e9fae3cd7dcdf9944acbcbcc6e282e89f74220ed18e8db3ffcd812ad18ef58c
@@ -3,6 +3,7 @@
3
3
  require 'rake'
4
4
  require 'nokogiri'
5
5
  require 'fileutils'
6
+ require 'pathname'
6
7
  require 'albacore'
7
8
  require 'albacore/paths'
8
9
  require 'albacore/cmd_config'
@@ -241,8 +242,12 @@ and report a bug to albacore with the full output. Here's the nuget process outp
241
242
  end
242
243
  end
243
244
 
244
- def path_to relative_file_path, cwd
245
- File.expand_path( File.join(@opts.get(:original_path), relative_file_path), cwd )
245
+ def path_to path, cwd
246
+ if (Pathname.new path).absolute?
247
+ return path
248
+ else
249
+ return File.expand_path( File.join(@opts.get(:original_path), path), cwd )
250
+ end
246
251
  end
247
252
 
248
253
  # generate all nuspecs
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.5.5"
2
+ VERSION = "2.5.6"
3
3
  end
@@ -304,6 +304,21 @@ describe ProjectTask, "creating nuget from proj file" do
304
304
  end
305
305
  end
306
306
 
307
+ describe ProjectTask, "path_to should accept both relative and absolute paths" do
308
+ let :proj_task do
309
+ curr = File.dirname(__FILE__)
310
+ ProjectTask.new(Map.new(
311
+ :files => [File.join( curr, "testdata", "Project.fsproj")],
312
+ :original_path => "/original_path/"))
313
+ end
314
+ it "should use original_path to resolve path" do
315
+ expect(proj_task.path_to( "./bin/something.exe", "./tmp/")).to eq "/original_path/bin/something.exe"
316
+ end
317
+ it "should return the absolute path when the path to the exe is absolute" do
318
+ expect(proj_task.path_to( "/bin/something.exe", "./tmp/")).to eq "/bin/something.exe"
319
+ end
320
+ end
321
+
307
322
  describe 'encoding functions' do
308
323
  it 'should throw InvalidByteSequenceError by default' do
309
324
  # http://www.ruby-doc.org/core-2.1.3/String.html#method-i-encode
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.5
4
+ version: 2.5.6
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: 2015-11-08 00:00:00.000000000 Z
12
+ date: 2015-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake