bibliothecary 6.11.0 → 6.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/bibliothecary/parsers/nuget.rb +33 -1
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5353b0fbb338eaeec8f162cdcaf3e3d5750afc2ed82d23eddf13367f92ebd39c
|
4
|
+
data.tar.gz: f76ddb1b0bbcf754d65ad136a6c010f132a0b4e8cc1be0501525eafb2186beb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 473789f139eb246fcb13433c2307951f6d777db0e82a71179dace7a36f9b82903a655b82aa283844da41f85fc0c1ca1cb4c7845e9ce322295acd6b7f46639012
|
7
|
+
data.tar.gz: e30f25772c86b511ac390f739d6ff5e19e871a3269c272359f823233c9ab7d38ef3f537d8c7b08842016d2641ac90c4d0b2603b1d1e2503524613a91ad0b33e2
|
data/README.md
CHANGED
@@ -35,7 +35,11 @@ module Bibliothecary
|
|
35
35
|
match_filename("paket.lock") => {
|
36
36
|
kind: 'lockfile',
|
37
37
|
parser: :parse_paket_lock
|
38
|
-
}
|
38
|
+
},
|
39
|
+
match_filename("project.assets.json") => {
|
40
|
+
kind: 'lockfile',
|
41
|
+
parser: :parse_project_assets_json
|
42
|
+
},
|
39
43
|
}
|
40
44
|
end
|
41
45
|
|
@@ -137,6 +141,34 @@ module Bibliothecary
|
|
137
141
|
# we only have to enforce uniqueness by name because paket ensures that there is only the single version globally in the project
|
138
142
|
packages.uniq {|package| package[:name] }
|
139
143
|
end
|
144
|
+
|
145
|
+
def self.parse_project_assets_json(file_contents)
|
146
|
+
manifest = JSON.parse file_contents
|
147
|
+
|
148
|
+
frameworks = {}
|
149
|
+
manifest.fetch("targets",[]).each do |framework, deps|
|
150
|
+
frameworks[framework] = deps
|
151
|
+
.select { |name, details| details["type"] == "package" }
|
152
|
+
.map do |name, details|
|
153
|
+
name_split = name.split("/")
|
154
|
+
{
|
155
|
+
name: name_split[0],
|
156
|
+
requirement: name_split[1],
|
157
|
+
type: "runtime"
|
158
|
+
}
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
if frameworks.size > 0
|
163
|
+
# we should really return multiple manifests, but bibliothecary doesn't
|
164
|
+
# do that yet so at least pick deterministically.
|
165
|
+
|
166
|
+
# Note, frameworks can be empty, so remove empty ones and then return the last sorted item if any
|
167
|
+
frameworks = frameworks.delete_if { |k, v| v.empty? }
|
168
|
+
return frameworks[frameworks.keys.sort.last] unless frameworks.empty?
|
169
|
+
end
|
170
|
+
[]
|
171
|
+
end
|
140
172
|
end
|
141
173
|
end
|
142
174
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibliothecary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|