albacore 2.3.4 → 2.3.5

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: ad7e2ccdd0029e01e2d2fce9d84659101fe21663
4
- data.tar.gz: c6c019c230185fae7118a2c032f5e4a52f26d215
3
+ metadata.gz: 901e30922303f765f41f212911ce9eebd2bd37dc
4
+ data.tar.gz: b89dbbfc09371b22ce7f1c79dbbba0a291b0cf84
5
5
  SHA512:
6
- metadata.gz: 5224e0bcd7619547d797834d84d4b10834f2221ce2efb6274add9a8cf8d7d1af6cab901e6cbf18ca0da1cd7489f0b687b75cf3c6032f478e7b82e3d476d90ff3
7
- data.tar.gz: 18f7870efc0eaa72550db608b330152e4221c25680f98f27a78aea55a3445cbb4e3576cd666ee9adaa8636f98f4c0968c005f501eb74828f0aef7d7154f4debc
6
+ metadata.gz: 69e554a5c31ea4d26551fcb15e09397c54f122808ba1e10119d73c348075fbe5f434ec9917d1fdbff003f23f8ae11bfa4975dc2f1413de14cb54f93e8e9bc5ed
7
+ data.tar.gz: 9e0be39b88850f9b6f41431c4c10aa1a831960e89b0cbf9598d8b383ad8724ffc04fbb49506ef8b89ac22c73bd566cd3b568ea371b64aa74ca08a9962081e2b0
@@ -359,10 +359,10 @@ end})
359
359
  package.metadata.authors = proj.authors if proj.authors
360
360
 
361
361
  if opts.get :nuget_dependencies
362
- trace "adding nuget dependencies for #{proj.name}"
362
+ trace "adding nuget dependencies for id #{proj.id}"
363
363
  # add declared packages as dependencies
364
364
  proj.declared_packages.each do |p|
365
- debug "adding package dependency: #{proj.name} => #{p.id} at #{p.version} [nuget model: package]"
365
+ debug "adding package dependency: #{proj.id} => #{p.id} at #{p.version} [nuget model: package]"
366
366
  package.metadata.add_dependency p.id, p.version
367
367
  end
368
368
  end
@@ -409,7 +409,7 @@ end})
409
409
  package.files.each do |file|
410
410
  file_path = File.expand_path file.src, proj.proj_path_base
411
411
  unless File.exists? file_path
412
- info "while building nuspec for proj: #{proj.name}, file: #{file_path} => #{file.target} not found, removing from nuspec [nuget model: package]"
412
+ info "while building nuspec for proj id: #{proj.id}, file: #{file_path} => #{file.target} not found, removing from nuspec [nuget model: package]"
413
413
  package.remove_file file.src
414
414
  trace { "files: #{package.files.map { |f| f.src }.inspect} [nuget model: package]" }
415
415
  end
@@ -24,9 +24,18 @@ module Albacore
24
24
  sanity_checks
25
25
  end
26
26
 
27
+ # Get the project GUID without '{' or '}' characters.
28
+ def guid
29
+ guid_raw.gsub /[\{\}]/, ''
30
+ end
31
+
32
+ # Get the project GUID as it is in the project file.
33
+ def guid_raw
34
+ read_property 'ProjectGuid'
35
+ end
36
+
27
37
  # Get the project id specified in the project file. Defaults to #name.
28
38
  def id
29
- debug { "Id: #{read_property('Id')}" }
30
39
  (read_property 'Id') || name
31
40
  end
32
41
 
@@ -34,7 +43,6 @@ module Albacore
34
43
  # the title of the nuspec and, if Id is not specified, also the id of the
35
44
  # nuspec.
36
45
  def name
37
- debug { "Name: #{read_property('Name')}" }
38
46
  (read_property 'Name') || asmname
39
47
  end
40
48
 
@@ -128,10 +136,12 @@ module Albacore
128
136
  end
129
137
 
130
138
  def declared_projects
131
- @proj_xml_node.css("ProjectReference").collect do |proj|
132
- debug "#{name}: found project reference: #{proj.css("Name").inner_text} [albacore: project]"
133
- Project.new(File.join(@proj_path_base, Albacore::Paths.normalise_slashes(proj['Include'])))
134
- #OpenStruct.new :name => proj.inner_text
139
+ @proj_xml_node.css("ProjectReference").collect do |proj_ref|
140
+ debug do
141
+ ref_name = proj_ref.css("Name").inner_text
142
+ "found project reference: #{name} => #{ref_name} [albacore: project]"
143
+ end
144
+ Project.new(File.join(@proj_path_base, Albacore::Paths.normalise_slashes(proj_ref['Include'])))
135
145
  end
136
146
  end
137
147
 
@@ -245,8 +245,9 @@ and report a bug to albacore with the full output. Here's the nuget process outp
245
245
 
246
246
  private
247
247
 
248
+ # Computes the known *Ids* of the projects; as Name = Title when creating nugets.
248
249
  def compute_knowns
249
- Set.new(@files.map { |f| Albacore::Project.new f }.map { |p| p.name })
250
+ Set.new(@files.map { |f| Albacore::Project.new f }.map { |p| p.id })
250
251
  end
251
252
 
252
253
  def generate_nuspec p, knowns
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.3.4"
2
+ VERSION = "2.3.5"
3
3
  end
@@ -12,6 +12,15 @@ describe Albacore::Project, "when loading packages.config" do
12
12
  let :nlog do
13
13
  subject.declared_packages.find { |p| p.id == 'NLog' }
14
14
  end
15
+
16
+ it 'should have a guid' do
17
+ subject.guid.should match /^[A-F0-9]{8}(?:-[A-F0-9]{4}){3}-[A-F0-9]{12}$/i
18
+ end
19
+
20
+ it 'assumption: can gsub("[\{\}]", "")' do
21
+ expect('{a}'.gsub(/[\{\}]/, '')).to eq 'a'
22
+ end
23
+
15
24
  it 'should have an OutputPath' do
16
25
  subject.output_path('Debug').should_not be_nil
17
26
  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.3.4
4
+ version: 2.3.5
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-12-15 00:00:00.000000000 Z
12
+ date: 2014-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake