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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 103fbc1356cfb20fcf31abf8af5394c2edce750cb6dae48a8f58f43071c16498
4
- data.tar.gz: 1a4c95071bd3c9b43b2a8a2ca969ce24ca8e616910b70ca324abb4763a881f74
3
+ metadata.gz: 932a79fbf351e8d4ec028b68032c4bfd294456041d4ae972eed9ece834a468b7
4
+ data.tar.gz: 8b07057a2723f72a66f063a7b512f13a2086cae1e881718166276e3232cecdc7
5
5
  SHA512:
6
- metadata.gz: edfc0874faab4c9bdb4cb5e91aa01a291eede73eba388369dac1ea6a992db20e1767f1305d8bcc3d6019405c4bc8608e519c6ce67eaa52ddc481e60e7a53eb79
7
- data.tar.gz: 0c366ea34c210a4f5ee8c8c7eb2154a8a6a1ecb103c248314a8f0af3b9cfa5d903d0f26d840733db9208e88db6b9509cc860d9b79a2f7f31283fecd368d1bfb0
6
+ metadata.gz: dc3d0ba78233e24d0685046a5754462329629985b1b45e4bf228c13f16e2445cf1a8cb7b062e3a69b04fcd96304e842479c394dee636cb5b753c62088ad30ec1
7
+ data.tar.gz: f2b6382574235df55f7ad0d61ab984450dad95f7f04b3e789121e7b5255ee15d080a7f80ac5077c46ee5afc68f0d1ffed2735de3b8145bfaae43562cc586dc14
data/bin/console CHANGED
@@ -10,5 +10,5 @@ require "bibliothecary"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
14
- IRB.start
13
+ require "pry"
14
+ Pry.start
@@ -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(":")
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "6.9.8"
2
+ VERSION = "6.10.5"
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: 6.9.8
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-02-17 00:00:00.000000000 Z
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.1.2
291
+ rubygems_version: 3.0.3
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: Find and parse manifests