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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b444856f899510d260c076ddbfd10543e3592db2ede8ca618d99b9aeb9e033fe
4
- data.tar.gz: f7da7041fa22140cafe5a9e84b4ab607688066fbf2d8f382ea85b6c01ab76e33
3
+ metadata.gz: 1c44d6a07f7c3cdd1e6517420b6fe59f0b453201f0f4deb7e3870f206ace5a04
4
+ data.tar.gz: 07ddf505184913265f608eea5b0ad8f9293b69a47bbe353606651d510b8d6158
5
5
  SHA512:
6
- metadata.gz: e5d8cf6f14f6623c0d3d8d0e5cfd02e1f0a07cb5fafc87a66b206022238817e4e9bab204ac546d4c6200e181579eedead8e9bd4dfbcd48613d85e48af0017a15
7
- data.tar.gz: 1ca3f3e2d5a1207cece4de5b62c386e9b98b1892e6e08024057fcbcc520f7f88444d62e5fa3bd66cafd086636f5a40f5a6a3fda3ceb4a5fda2d83b7e951039bb
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)
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "7.0.1"
2
+ VERSION = "7.0.2"
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: 7.0.1
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-21 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tomlrb