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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50a02ad92d6a68d40ccc2c096cf2e9de73048393
4
- data.tar.gz: 8947f27ee3ba3672ab1d0fbd4df51b64bc754c64
3
+ metadata.gz: 8a44c7031b6fc5beb23351508a79b76b67871051
4
+ data.tar.gz: 048c1448e4cb9d82fc852f2499d2b3b081312afe
5
5
  SHA512:
6
- metadata.gz: da507705f8823db3e60ecfa94afd52847b5b3d5a241351f527df6e9909ef15d3b4d357b81d6be43341bd8cdffb7b67fcdc03b547e70c2951c675518c49fc5c61
7
- data.tar.gz: 1e55115e0766b159600afa98ef27be8130de0c03856783d2f986e09f7ff9d60bf929750a9a37e4de5997c84075a8823e13bbc6032d74b4d20453cc57462dbf7f
6
+ metadata.gz: a3f2e49e8e163ac20c8acf0fc9524b1ad075fc496e267720fb0a2275e14ee00ebc960a99efc17880911d2efe577a443b13b9074985f53b54b229076504e0c90e
7
+ data.tar.gz: d61ec58eae2b3707926555643d3b9f01a5dcfc11dd827c2ef1eea7655231b0e8faabee26a499ff3e658e135b32bf1663531380985a2eb6b80be3b85a923d2620
data/README.md CHANGED
@@ -77,6 +77,7 @@ Bibliothecary.analyse('./')
77
77
  - Project.lock.json
78
78
  - *.nuspec
79
79
  - paket.lock
80
+ - *.csproj
80
81
  - Bower
81
82
  - bower.json
82
83
  - CPAN
@@ -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|
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.3.2"
2
+ VERSION = "5.3.3"
3
3
  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: 5.3.2
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-04-10 00:00:00.000000000 Z
11
+ date: 2017-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb