albacore 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/albacore/nuget_model.rb +3 -2
- data/lib/albacore/project.rb +8 -1
- data/lib/albacore/version.rb +1 -1
- data/spec/fpm_app_spec_spec.rb +1 -1
- data/spec/nuget_model_spec.rb +46 -8
- data/spec/testdata/Project/Project.fsproj +1 -1
- data/spec/testdata/Project/ProjectWithTitle.fsproj +62 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9ff60be90fd9e1faa33cdb6093b5ac47e54356d
|
4
|
+
data.tar.gz: 1199a00917e052a941aa5b107dfe214cd5afe6e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50d3630157c1e9f30532cdd1af2eda19154638833ab4519a9c12f878d5b60ba89446d5d3dcec17bace8d142e66d3d320e0b0b06e25b67f38b95433e31387a76
|
7
|
+
data.tar.gz: d75087d34b604a9d5dc24078b9a3cb7b02badd3da83c27cf3cb6627a984d0e90cdcb7c03edc12cda83d5f6ab2e65efa326b511ccf6b1740eba9901dc931ddcc4
|
data/README.md
CHANGED
@@ -75,8 +75,8 @@ Now you are ready to continue reading below for your first Rakefile.
|
|
75
75
|
|
76
76
|
### Installing Ruby on Windows
|
77
77
|
|
78
|
-
First install Ruby from http://rubyinstaller.org/downloads/ - e.g. [v2.1.
|
79
|
-
32-bits](http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.
|
78
|
+
First install Ruby **32 bits** from http://rubyinstaller.org/downloads/ - e.g. [v2.1.5
|
79
|
+
32-bits](http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.5.exe?direct)
|
80
80
|
which is the latest version, at time of writing.
|
81
81
|
|
82
82
|
Second, install Ruby DevKit, or you won't be able to install nokogiri. Download
|
@@ -97,6 +97,8 @@ Now close that console and open a new console, and run:
|
|
97
97
|
This gives you a working ruby installation. Continue below with your first
|
98
98
|
Rakefile.
|
99
99
|
|
100
|
+
You can also try chocolatey [`ruby`](https://chocolatey.org/packages/ruby) and [`ruby2.devkit`](https://chocolatey.org/packages/ruby2.devkit) packages.
|
101
|
+
|
100
102
|
### Installing Ruby on OS X
|
101
103
|
|
102
104
|
``` bash
|
data/lib/albacore/nuget_model.rb
CHANGED
@@ -43,7 +43,7 @@ end})
|
|
43
43
|
%{def #{sym}= val
|
44
44
|
@#{sym} = val
|
45
45
|
@set_fields.add? :#{sym}
|
46
|
-
end})
|
46
|
+
end})
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -353,7 +353,8 @@ end})
|
|
353
353
|
|
354
354
|
version = opts.get :version
|
355
355
|
package = Package.new
|
356
|
-
package.metadata.id
|
356
|
+
package.metadata.id = proj.id if proj.id
|
357
|
+
package.metadata.title = proj.name if proj.name
|
357
358
|
package.metadata.version = version if version
|
358
359
|
package.metadata.authors = proj.authors if proj.authors
|
359
360
|
|
data/lib/albacore/project.rb
CHANGED
@@ -24,7 +24,14 @@ module Albacore
|
|
24
24
|
sanity_checks
|
25
25
|
end
|
26
26
|
|
27
|
-
#
|
27
|
+
# Get the project id specified in the project file. Defaults to #name.
|
28
|
+
def id
|
29
|
+
read_property 'Id' || name
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get the project name specified in the project file. This is the same as
|
33
|
+
# the title of the nuspec and, if Id is not specified, also the id of the
|
34
|
+
# nuspec.
|
28
35
|
def name
|
29
36
|
prop = read_property 'Name' || asmname
|
30
37
|
prop || asmname
|
data/lib/albacore/version.rb
CHANGED
data/spec/fpm_app_spec_spec.rb
CHANGED
@@ -89,7 +89,7 @@ describe ::Albacore::FpmAppSpec, 'when generating command from valid AppSpec' do
|
|
89
89
|
expect(flags['--license']).to eq 'MIT'
|
90
90
|
end
|
91
91
|
|
92
|
-
if ::
|
92
|
+
if ::Albacore.windows?
|
93
93
|
it 'should generate command "look in this directory" flag' do
|
94
94
|
expect(flags['-C']).should match /^.:\/a\/b$/
|
95
95
|
end
|
data/spec/nuget_model_spec.rb
CHANGED
@@ -4,7 +4,10 @@ require 'albacore/paths'
|
|
4
4
|
require 'albacore/nuget_model'
|
5
5
|
|
6
6
|
describe Albacore::NugetModel::Metadata do
|
7
|
-
[:id, :version, :authors, :description, :summary, :language,
|
7
|
+
[ :id, :version, :authors, :title, :description, :summary, :language,
|
8
|
+
:project_url, :license_url, :release_notes, :owners,
|
9
|
+
:require_license_acceptance, :copyright, :tags, :dependencies,
|
10
|
+
:framework_assemblies ].each do |prop|
|
8
11
|
it "responds to :#{prop}" do
|
9
12
|
subject.should respond_to(prop)
|
10
13
|
end
|
@@ -18,13 +21,13 @@ describe Albacore::NugetModel::Metadata do
|
|
18
21
|
subject.dependencies['DepId']
|
19
22
|
end
|
20
23
|
it "should contain the dependency version" do
|
21
|
-
dep.version.
|
24
|
+
expect(dep.version).to eq '=> 3.4.5'
|
22
25
|
end
|
23
26
|
it "should contain the dependency id" do
|
24
|
-
dep.id.
|
27
|
+
expect(dep.id).to eq 'DepId'
|
25
28
|
end
|
26
29
|
it "should contain only one dependency" do
|
27
|
-
subject.dependencies.length.
|
30
|
+
expect(subject.dependencies.length).to eq 1
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|
@@ -99,14 +102,15 @@ XML
|
|
99
102
|
end
|
100
103
|
|
101
104
|
let :parser do
|
102
|
-
io = StringIO.new xml
|
105
|
+
io = StringIO.new xml
|
103
106
|
Nokogiri::XML(io)
|
104
107
|
end
|
108
|
+
|
105
109
|
let :ns do
|
106
110
|
{ ng: 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' }
|
107
111
|
end
|
112
|
+
|
108
113
|
subject do
|
109
|
-
#puts "parser: #{parser}"
|
110
114
|
package = Albacore::NugetModel::Package.from_xml xml
|
111
115
|
#puts "node: #{package.inspect}"
|
112
116
|
#puts "node meta: #{package.metadata.inspect}"
|
@@ -155,7 +159,8 @@ describe "when reading xml from a fsproj file into Project/Metadata" do
|
|
155
159
|
let :projfile do
|
156
160
|
curr = File.dirname(__FILE__)
|
157
161
|
File.join curr, "testdata", "Project", "Project.fsproj"
|
158
|
-
end
|
162
|
+
end
|
163
|
+
|
159
164
|
subject do
|
160
165
|
Albacore::NugetModel::Package.from_xxproj_file projfile
|
161
166
|
end
|
@@ -171,7 +176,11 @@ describe "when reading xml from a fsproj file into Project/Metadata" do
|
|
171
176
|
end
|
172
177
|
|
173
178
|
it "should find Authors element" do
|
174
|
-
m.authors.
|
179
|
+
expect(m.authors).to eq "Henrik Feldt"
|
180
|
+
end
|
181
|
+
|
182
|
+
it 'should have the same title as <Name />' do
|
183
|
+
expect(m.title).to eq 'Project'
|
175
184
|
end
|
176
185
|
|
177
186
|
describe "when including files" do
|
@@ -188,6 +197,35 @@ describe "when reading xml from a fsproj file into Project/Metadata" do
|
|
188
197
|
end
|
189
198
|
end
|
190
199
|
|
200
|
+
describe "when reading xml from a fsproj file into Project/Metadata (with Id different form Name)" do
|
201
|
+
let :projfile do
|
202
|
+
curr = File.dirname(__FILE__)
|
203
|
+
File.join curr, "testdata", "Project", "ProjectWithTitle.fsproj"
|
204
|
+
end
|
205
|
+
|
206
|
+
subject do
|
207
|
+
Albacore::NugetModel::Package.from_xxproj_file projfile
|
208
|
+
end
|
209
|
+
|
210
|
+
include_context 'package_metadata_dsl'
|
211
|
+
|
212
|
+
it "should find Name element" do
|
213
|
+
expect(m.id).to eq 'Project'
|
214
|
+
end
|
215
|
+
|
216
|
+
it "should not find Version element" do
|
217
|
+
expect(m.version).to be_nil
|
218
|
+
end
|
219
|
+
|
220
|
+
it "should find Authors element" do
|
221
|
+
expect(m.authors).to eq "Henrik Feldt"
|
222
|
+
end
|
223
|
+
|
224
|
+
it 'should use the Name tag here, too' do
|
225
|
+
expect(m.title).to eq 'Project for Glorious Success'
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
191
229
|
describe Albacore::NugetModel::Package, "overriding metadata" do
|
192
230
|
let :p1 do
|
193
231
|
p = Albacore::NugetModel::Package.new.with_metadata do |m|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<RootNamespace>Project</RootNamespace>
|
11
11
|
<AssemblyName>Project</AssemblyName>
|
12
12
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
13
|
-
<
|
13
|
+
<Id>Project</Id>
|
14
14
|
<Authors>Henrik Feldt</Authors>
|
15
15
|
</PropertyGroup>
|
16
16
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
4
|
+
<PropertyGroup>
|
5
|
+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
6
|
+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
7
|
+
<SchemaVersion>2.0</SchemaVersion>
|
8
|
+
<ProjectGuid>c821e8b3-528b-40c4-88c2-57a1119da596</ProjectGuid>
|
9
|
+
<OutputType>Library</OutputType>
|
10
|
+
<RootNamespace>Project</RootNamespace>
|
11
|
+
<AssemblyName>Project</AssemblyName>
|
12
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
13
|
+
<Name>Project for Glorious Success</Name>
|
14
|
+
<Id>Project</Id>
|
15
|
+
<Authors>Henrik Feldt</Authors>
|
16
|
+
</PropertyGroup>
|
17
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
18
|
+
<DebugSymbols>true</DebugSymbols>
|
19
|
+
<DebugType>full</DebugType>
|
20
|
+
<Optimize>false</Optimize>
|
21
|
+
<Tailcalls>false</Tailcalls>
|
22
|
+
<OutputPath>bin\Debug\</OutputPath>
|
23
|
+
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
24
|
+
<WarningLevel>3</WarningLevel>
|
25
|
+
<DocumentationFile>bin\Debug\Project.xml</DocumentationFile>
|
26
|
+
</PropertyGroup>
|
27
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseXanna|AnyCPU' ">
|
28
|
+
<DebugType>pdbonly</DebugType>
|
29
|
+
<Optimize>true</Optimize>
|
30
|
+
<Tailcalls>true</Tailcalls>
|
31
|
+
<OutputPath>bin\Release\</OutputPath>
|
32
|
+
<DefineConstants>TRACE</DefineConstants>
|
33
|
+
<WarningLevel>3</WarningLevel>
|
34
|
+
<DocumentationFile>bin\Release\Project.xml</DocumentationFile>
|
35
|
+
</PropertyGroup>
|
36
|
+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
37
|
+
<DebugType>pdbonly</DebugType>
|
38
|
+
<Optimize>true</Optimize>
|
39
|
+
<Tailcalls>true</Tailcalls>
|
40
|
+
<OutputPath>bin\Release\</OutputPath>
|
41
|
+
<DefineConstants>TRACE</DefineConstants>
|
42
|
+
<WarningLevel>3</WarningLevel>
|
43
|
+
<DocumentationFile>bin\Release\Project.xml</DocumentationFile>
|
44
|
+
</PropertyGroup>
|
45
|
+
<ItemGroup>
|
46
|
+
<Reference Include="mscorlib" />
|
47
|
+
<Reference Include="FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
48
|
+
<Private>True</Private>
|
49
|
+
</Reference>
|
50
|
+
<Reference Include="System" />
|
51
|
+
<Reference Include="System.Core" />
|
52
|
+
<Reference Include="System.Numerics" />
|
53
|
+
</ItemGroup>
|
54
|
+
<ItemGroup>
|
55
|
+
<Compile Include="Library1.fs" />
|
56
|
+
<None Include="Script.fsx" />
|
57
|
+
</ItemGroup>
|
58
|
+
<PropertyGroup>
|
59
|
+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
|
60
|
+
</PropertyGroup>
|
61
|
+
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" />
|
62
|
+
</Project>
|
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.2
|
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
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -357,6 +357,7 @@ files:
|
|
357
357
|
- spec/testdata/Project/Project.fsproj
|
358
358
|
- spec/testdata/Project/Project.sln
|
359
359
|
- spec/testdata/Project/Project.v11.suo
|
360
|
+
- spec/testdata/Project/ProjectWithTitle.fsproj
|
360
361
|
- spec/testdata/Project/bin/Debug/Project.dll
|
361
362
|
- spec/testdata/Project/bin/Debug/Project.xml
|
362
363
|
- spec/testdata/Project/bin/Release/Project.dll
|
@@ -592,6 +593,7 @@ test_files:
|
|
592
593
|
- spec/testdata/Project/Project.fsproj
|
593
594
|
- spec/testdata/Project/Project.sln
|
594
595
|
- spec/testdata/Project/Project.v11.suo
|
596
|
+
- spec/testdata/Project/ProjectWithTitle.fsproj
|
595
597
|
- spec/testdata/Project/bin/Debug/Project.dll
|
596
598
|
- spec/testdata/Project/bin/Debug/Project.xml
|
597
599
|
- spec/testdata/Project/bin/Release/Project.dll
|