bibliothecary 6.10.6 → 6.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bibliothecary/parsers/maven.rb +16 -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: 97884ae133cf8ff23366cfdfbd6a97382e200313693eaaca8ceae2e743897a72
|
4
|
+
data.tar.gz: 5cf10414b41b13552a692fa4802464eab0980489e9a1ce5a1e4f9601add8deb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58c47af966516baa1fb6c9586670cf8dc5d1a0831f2b6fa44b750d7e7f62471063b89083ce7306878fb2989cb8b073b3c9b105b68a90883f7f4f9ac86a111999
|
7
|
+
data.tar.gz: 2685dcd3c595d20c2d1fc5884dd1187079e2bdeddd6f354762b8ee3dfdb326fcb6574bcf4a15d3b7ea343f22847d188ee6093c4f7ccf6ae13c1b7d61794b6cce
|
@@ -205,8 +205,8 @@ module Bibliothecary
|
|
205
205
|
json = JSON.parse(response.body)
|
206
206
|
return [] unless json['dependencies']
|
207
207
|
json['dependencies'].map do |dependency|
|
208
|
-
name =
|
209
|
-
next unless name =~
|
208
|
+
name = gradle_dependency_name(dependency["group"], dependency["name"])
|
209
|
+
next unless name =~ /[\w-]+\.[\w_-]+(\.[\w-])?\:[\w-]/
|
210
210
|
{
|
211
211
|
name: name,
|
212
212
|
requirement: dependency["version"],
|
@@ -215,6 +215,20 @@ module Bibliothecary
|
|
215
215
|
end.compact
|
216
216
|
end
|
217
217
|
|
218
|
+
def self.gradle_dependency_name(group, name)
|
219
|
+
if group.empty? && name.include?(":")
|
220
|
+
group, name = name.split(":", 2)
|
221
|
+
end
|
222
|
+
|
223
|
+
# Strip comments, and single/doublequotes
|
224
|
+
[group, name].map do |part|
|
225
|
+
part
|
226
|
+
.gsub(/\s*\/\/.*$/, "") # Comments
|
227
|
+
.gsub(/^["']/, "") # Beginning single/doublequotes
|
228
|
+
.gsub(/["']$/, "") # Ending single/doublequotes
|
229
|
+
end.join(":")
|
230
|
+
end
|
231
|
+
|
218
232
|
def self.extract_pom_info(xml, location, parent_properties = {})
|
219
233
|
extract_pom_dep_info(xml, xml, location, parent_properties)
|
220
234
|
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.10.
|
4
|
+
version: 6.10.7
|
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-04-
|
11
|
+
date: 2021-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|