albacore 2.3.18 → 2.3.19

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: e06b9f000e88db0335e35ef43344434ba90b6494
4
- data.tar.gz: 0d3d86344d1022e390ac7a798ce66c68ea5bc103
3
+ metadata.gz: 213aad93f873634ccf667794df884fb05e098a3b
4
+ data.tar.gz: d03f4c2cb7df5000f6e3d71a0a4c1f7011b2a0d8
5
5
  SHA512:
6
- metadata.gz: bca976ada97fdd2357439dba8de263004f23ebce8d40e50b34eee0fd5fbd31076cda8e10dc1becb54050de67c1aee0e26d684e54703a241847b3e6fe08c8f69e
7
- data.tar.gz: 57c45d09bb3adae1a9ca117fbcb8459474de1bfbbea4686d1c3545907e4bdf7efce046b2a0833b050770547e1c7905d9d39c89bb540fbcd6a792f6cba3af3219
6
+ metadata.gz: 528b4384789a80173a1dded15c329cf8876330c7101d5d38ab437fe1aa037bb67dbeaa94bb93f594ab39406c2189279ee0be54d65415efef5cc87fc6a707f57f
7
+ data.tar.gz: fa4b59de0db2dbeec2b7a4af8ac561f0e72310971293b606c92f98762a0481b060c8083d619c03998e6c5fa3af6ab77669a605b766c14e995dd5cab33f0aa8a7
@@ -0,0 +1,22 @@
1
+ require 'ostruct'
2
+ require 'albacore/semver'
3
+
4
+ module Albacore
5
+ module Paket
6
+ def parse_line line
7
+ if (m = line.match /^\s*(?<id>[\w\-\.]+) \((?<ver>[\.\d\w\-]+)\)$/i)
8
+ ver = Albacore::SemVer.parse(m[:ver], '%M.%m.%p', false)
9
+ OpenStruct.new(:id => m[:id],
10
+ :version => m[:ver],
11
+ :target_framework => 'net40',
12
+ :semver => ver)
13
+ end
14
+ end
15
+
16
+ def parse_paket_lock data
17
+ data.map { |line| parse_line line }.
18
+ compact.
19
+ map { |package| [package.id, package] }
20
+ end
21
+ end
22
+ end
@@ -225,15 +225,7 @@ module Albacore
225
225
  def all_paket_deps
226
226
  return @all_paket_deps if @all_paket_deps
227
227
  arr = File.open('paket.lock', 'r') do |io|
228
- io.readlines.map(&:chomp).map do |line|
229
- if (m = line.match /^\s*(?<id>[\w\-\.]+) \((?<ver>[\.\d\w]+)\)$/i)
230
- ver = Albacore::SemVer.parse(m[:ver], '%M.%m.%p', false)
231
- OpenStruct.new(:id => m[:id],
232
- :version => m[:ver],
233
- :target_framework => 'net40',
234
- :semver => ver)
235
- end
236
- end.compact.map { |package| [package.id, package] }
228
+ Albacore::Paket.parse_paket_lock(io.readlines.map(&:chomp))
237
229
  end
238
230
  @all_paket_deps = Hash[arr]
239
231
  end
@@ -1,3 +1,3 @@
1
1
  module Albacore
2
- VERSION = "2.3.18"
2
+ VERSION = "2.3.19"
3
3
  end
@@ -0,0 +1,35 @@
1
+ require 'albacore/paket'
2
+
3
+ describe Albacore::Paket do
4
+ include Albacore::Paket
5
+ let :file do
6
+ %{NUGET
7
+ remote: https://www.nuget.org/api/v2
8
+ specs:
9
+ Aether (6.0)
10
+ Chiron (1.0.1)
11
+ Aether (>= 6.0.0)
12
+ FParsec (>= 1.0.1)
13
+ FSharp.Core (>= 3.1.2.1)
14
+ FParsec (1.0.1)
15
+ FSharp.Core (3.1.2.1)
16
+ Fuchu (0.4.0.0)
17
+ Http.fs-prerelease (2.0.0-alpha1)
18
+ FSharp.Core (>= 3.1.2.1)
19
+ NodaTime (1.3.1)
20
+ NuGet.CommandLine (2.8.5)
21
+ }
22
+ end
23
+ describe 'parsing paket.lock file' do
24
+ let :references do
25
+ Hash[parse_paket_lock(file.split(/\n|\r\n/))]
26
+ end
27
+ it 'has FParsec' do
28
+ expect(references['FParsec'].version).to eq '1.0.1'
29
+ end
30
+ it 'has Http.fs-prerelease' do
31
+ expect(references['Http.fs-prerelease']).to_not be_nil
32
+ expect(references['Http.fs-prerelease'].version).to eq '2.0.0-alpha1'
33
+ end
34
+ end
35
+ 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.18
4
+ version: 2.3.19
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-04-03 00:00:00.000000000 Z
12
+ date: 2015-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -143,6 +143,7 @@ files:
143
143
  - lib/albacore/nuget_model.rb
144
144
  - lib/albacore/package.rb
145
145
  - lib/albacore/package_repo.rb
146
+ - lib/albacore/paket.rb
146
147
  - lib/albacore/paths.rb
147
148
  - lib/albacore/project.rb
148
149
  - lib/albacore/rake_overrides.rb
@@ -189,6 +190,7 @@ files:
189
190
  - spec/nugets_restore_spec.rb
190
191
  - spec/package_repo_spec.rb
191
192
  - spec/package_spec.rb
193
+ - spec/paket_spec.rb
192
194
  - spec/paths_spec.rb
193
195
  - spec/project_spec.rb
194
196
  - spec/projectlint/added_but_not_on_filesystem/aproject.csproj
@@ -426,6 +428,7 @@ test_files:
426
428
  - spec/nugets_restore_spec.rb
427
429
  - spec/package_repo_spec.rb
428
430
  - spec/package_spec.rb
431
+ - spec/paket_spec.rb
429
432
  - spec/paths_spec.rb
430
433
  - spec/project_spec.rb
431
434
  - spec/projectlint/added_but_not_on_filesystem/aproject.csproj