albacore 2.3.4 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/albacore/nuget_model.rb +3 -3
- data/lib/albacore/project.rb +16 -6
- data/lib/albacore/task_types/nugets_pack.rb +2 -1
- data/lib/albacore/version.rb +1 -1
- data/spec/project_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 901e30922303f765f41f212911ce9eebd2bd37dc
|
4
|
+
data.tar.gz: b89dbbfc09371b22ce7f1c79dbbba0a291b0cf84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69e554a5c31ea4d26551fcb15e09397c54f122808ba1e10119d73c348075fbe5f434ec9917d1fdbff003f23f8ae11bfa4975dc2f1413de14cb54f93e8e9bc5ed
|
7
|
+
data.tar.gz: 9e0be39b88850f9b6f41431c4c10aa1a831960e89b0cbf9598d8b383ad8724ffc04fbb49506ef8b89ac22c73bd566cd3b568ea371b64aa74ca08a9962081e2b0
|
data/lib/albacore/nuget_model.rb
CHANGED
@@ -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.
|
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.
|
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.
|
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
|
data/lib/albacore/project.rb
CHANGED
@@ -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 |
|
132
|
-
debug
|
133
|
-
|
134
|
-
|
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.
|
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
|
data/lib/albacore/version.rb
CHANGED
data/spec/project_spec.rb
CHANGED
@@ -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
|
+
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-
|
12
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|