bibliothecary 6.9.8 → 6.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/console +2 -2
- data/lib/bibliothecary/parsers/maven.rb +23 -0
- data/lib/bibliothecary/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 932a79fbf351e8d4ec028b68032c4bfd294456041d4ae972eed9ece834a468b7
|
4
|
+
data.tar.gz: 8b07057a2723f72a66f063a7b512f13a2086cae1e881718166276e3232cecdc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3d0ba78233e24d0685046a5754462329629985b1b45e4bf228c13f16e2445cf1a8cb7b062e3a69b04fcd96304e842479c394dee636cb5b753c62088ad30ec1
|
7
|
+
data.tar.gz: f2b6382574235df55f7ad0d61ab984450dad95f7f04b3e789121e7b5255ee15d080a7f80ac5077c46ee5afc68f0d1ffed2735de3b8145bfaae43562cc586dc14
|
data/bin/console
CHANGED
@@ -60,6 +60,10 @@ module Bibliothecary
|
|
60
60
|
match_filename("sbt-update-full.txt", case_insensitive: true) => {
|
61
61
|
kind: 'lockfile',
|
62
62
|
parser: :parse_sbt_update_full
|
63
|
+
},
|
64
|
+
match_filename("maven-dependency-tree.txt", case_insensitive: true) => {
|
65
|
+
kind: 'lockfile',
|
66
|
+
parser: :parse_maven_tree
|
63
67
|
}
|
64
68
|
}
|
65
69
|
end
|
@@ -148,6 +152,25 @@ module Bibliothecary
|
|
148
152
|
.compact
|
149
153
|
.uniq
|
150
154
|
end
|
155
|
+
def self.parse_maven_tree(file_contents)
|
156
|
+
file_contents = file_contents.gsub(/\r\n?/, "\n")
|
157
|
+
captures = file_contents.scan(/^\[INFO\](?:(?:\+-)|\||(?:\\-)|\s)+((?:[\w\.-]+:)+[\w\.\-${}]+)/).flatten.uniq
|
158
|
+
captures.map do |item|
|
159
|
+
parts = item.split(":")
|
160
|
+
case parts.count
|
161
|
+
when 4
|
162
|
+
version = parts[-1]
|
163
|
+
type = parts[-2]
|
164
|
+
when 5..6
|
165
|
+
version, type = parts[-2..]
|
166
|
+
end
|
167
|
+
{
|
168
|
+
name: parts[0..1].join(":"),
|
169
|
+
requirement: version,
|
170
|
+
type: type
|
171
|
+
}
|
172
|
+
end
|
173
|
+
end
|
151
174
|
|
152
175
|
def self.parse_resolved_dep_line(line)
|
153
176
|
dep_parts = line.strip.split(":")
|
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.10.5
|
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-
|
11
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
- !ruby/object:Gem::Version
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
|
-
rubygems_version: 3.
|
291
|
+
rubygems_version: 3.0.3
|
292
292
|
signing_key:
|
293
293
|
specification_version: 4
|
294
294
|
summary: Find and parse manifests
|