bibliothecary 7.0.1 → 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bibliothecary/parsers/maven.rb +5 -2
- 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: 1c44d6a07f7c3cdd1e6517420b6fe59f0b453201f0f4deb7e3870f206ace5a04
|
4
|
+
data.tar.gz: 07ddf505184913265f608eea5b0ad8f9293b69a47bbe353606651d510b8d6158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c8693bace5bb30e27ae2cd72c130a68f8c2e8cdbb0f487b5bef59374a7ac6ad103bc10a2214f3ce2409a5c73dd861136f3e7c4b751d1a17b9ff13bb400a4ba7
|
7
|
+
data.tar.gz: 6d92229299dd6c3997ab9ff2addde302baf95383660a7849afaa519bc94b519196c7a11aae08bc23c24daaf96bb689c1431f9ab07efe1e0cbcce7f4e0d91e6a5
|
@@ -156,9 +156,8 @@ module Bibliothecary
|
|
156
156
|
def self.parse_maven_tree(file_contents)
|
157
157
|
file_contents = file_contents.gsub(/\r\n?/, "\n")
|
158
158
|
captures = file_contents.scan(/^\[INFO\](?:(?:\+-)|\||(?:\\-)|\s)+((?:[\w\.-]+:)+[\w\.\-${}]+)/).flatten.uniq
|
159
|
-
captures.shift if captures.size > 1 # first dep line will be the package itself (unless we're only analyzing a single line)
|
160
159
|
|
161
|
-
captures.map do |item|
|
160
|
+
deps = captures.map do |item|
|
162
161
|
parts = item.split(":")
|
163
162
|
case parts.count
|
164
163
|
when 4
|
@@ -173,6 +172,10 @@ module Bibliothecary
|
|
173
172
|
type: type
|
174
173
|
}
|
175
174
|
end
|
175
|
+
|
176
|
+
# First dep line will be the package itself (unless we're only analyzing a single line)
|
177
|
+
package = deps[0]
|
178
|
+
deps.size < 2 ? deps : deps[1..-1].reject { |d| d[:name] == package[:name] && d[:requirement] == package[:requirement] }
|
176
179
|
end
|
177
180
|
|
178
181
|
def self.parse_resolved_dep_line(line)
|
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: 7.0.
|
4
|
+
version: 7.0.2
|
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-06-
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tomlrb
|