bibliothecary 5.3.2 → 5.3.3
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 +18 -0
- data/lib/bibliothecary/version.rb +1 -1
- 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: 8a44c7031b6fc5beb23351508a79b76b67871051
|
4
|
+
data.tar.gz: 048c1448e4cb9d82fc852f2499d2b3b081312afe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3f2e49e8e163ac20c8acf0fc9524b1ad075fc496e267720fb0a2275e14ee00ebc960a99efc17880911d2efe577a443b13b9074985f53b54b229076504e0c90e
|
7
|
+
data.tar.gz: d61ec58eae2b3707926555643d3b9f01a5dcfc11dd827c2ef1eea7655231b0e8faabee26a499ff3e658e135b32bf1663531380985a2eb6b80be3b85a923d2620
|
data/README.md
CHANGED
@@ -24,6 +24,10 @@ module Bibliothecary
|
|
24
24
|
kind: 'manifest',
|
25
25
|
parser: :parse_nuspec
|
26
26
|
},
|
27
|
+
/^[A-Za-z0-9_-]+\.csproj$/ => {
|
28
|
+
kind: 'manifest',
|
29
|
+
parser: :parse_csproj
|
30
|
+
},
|
27
31
|
/paket\.lock$/ => {
|
28
32
|
kind: 'lockfile',
|
29
33
|
parser: :parse_paket_lock
|
@@ -67,6 +71,20 @@ module Bibliothecary
|
|
67
71
|
[]
|
68
72
|
end
|
69
73
|
|
74
|
+
def self.parse_csproj(file_contents)
|
75
|
+
manifest = Ox.parse file_contents
|
76
|
+
packages = manifest.locate('ItemGroup/PackageReference').map do |dependency|
|
77
|
+
{
|
78
|
+
name: dependency.Include,
|
79
|
+
version: dependency.Version,
|
80
|
+
type: 'runtime'
|
81
|
+
}
|
82
|
+
end
|
83
|
+
packages.uniq {|package| package[:name] }
|
84
|
+
rescue
|
85
|
+
[]
|
86
|
+
end
|
87
|
+
|
70
88
|
def self.parse_nuspec(file_contents)
|
71
89
|
manifest = Ox.parse file_contents
|
72
90
|
manifest.package.metadata.dependencies.locate('dependency').map do |dependency|
|
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: 5.3.
|
4
|
+
version: 5.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|