bibliothecary 8.3.2 → 8.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/bibliothecary/parsers/go.rb +1 -1
- data/lib/bibliothecary/parsers/maven.rb +22 -8
- 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: f283979f0fd87432a9d26a07bea9f568276d25102f9b3e343e4304656bedc1fb
|
4
|
+
data.tar.gz: 7019277a0e5bcf8ea1b77d76889f7de9322121ec4b7abee44f2f83bfa8b09fe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81204f529c0dd96cb75f43823a6440197474ddc06b37ddbd71eadcee710d4535f666d7ddfd59a670d96ff8592c22afc0b0c97e544cad2a3c661dd978df243bb
|
7
|
+
data.tar.gz: 3b972cbc604d1b1edd059c6a25a53f048eb1ce9554f541736188e1795da61bdf929acbc4999ddbbe3c54f4aad3941e6fc2ee2bf7107086959964d576451555bb
|
data/README.md
CHANGED
@@ -164,7 +164,7 @@ All available config options are in: https://github.com/librariesio/bibliothecar
|
|
164
164
|
|
165
165
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
166
166
|
|
167
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version,
|
167
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, bump and commit the version number in `version.rb` in the `main` branch, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
168
168
|
|
169
169
|
## Contributing
|
170
170
|
|
@@ -150,7 +150,7 @@ module Bibliothecary
|
|
150
150
|
def self.parse_go_resolved(file_contents, options: {})
|
151
151
|
JSON.parse(file_contents)
|
152
152
|
.select { |dep| dep["Main"] != "true" }
|
153
|
-
.map { |dep| { name: dep["Path"], requirement: dep["Version"], type:
|
153
|
+
.map { |dep| { name: dep["Path"], requirement: dep["Version"], type: dep.fetch("Scope") { "runtime" } } }
|
154
154
|
end
|
155
155
|
|
156
156
|
def self.map_dependencies(manifest, attr_name, dep_attr_name, version_attr_name, type)
|
@@ -148,7 +148,6 @@ module Bibliothecary
|
|
148
148
|
|
149
149
|
split = gradle_dep_match.captures[0]
|
150
150
|
|
151
|
-
|
152
151
|
dep = line
|
153
152
|
.split(split)[1].sub(/(\((c|n|\*)\))$/, "") # line ending legend: (c) means a dependency constraint, (n) means not resolved, or (*) means resolved previously, e.g. org.springframework.boot:spring-boot-starter-web:2.1.0.M3 (*)
|
154
153
|
.sub(/ FAILED$/, "") # dependency could not be resolved (but still may have a version)
|
@@ -159,13 +158,28 @@ module Bibliothecary
|
|
159
158
|
# \--- org.springframework.security:spring-security-test (n)
|
160
159
|
next unless dep.length >= 3
|
161
160
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
161
|
+
if dep.count == 6
|
162
|
+
# get name from renamed package resolution "org:name:version -> renamed_org:name:version"
|
163
|
+
{
|
164
|
+
original_name: dep[0,2].join(":"),
|
165
|
+
original_requirement: dep[2],
|
166
|
+
name: dep[-3..-2].join(":"),
|
167
|
+
requirement: dep[-1],
|
168
|
+
type: type
|
169
|
+
}
|
170
|
+
else
|
171
|
+
# get name from version conflict resolution ("org:name:version -> version") and no-resolution ("org:name:version")
|
172
|
+
{
|
173
|
+
name: dep[0..1].join(":"),
|
174
|
+
requirement: dep[-1],
|
175
|
+
type: type
|
176
|
+
}
|
177
|
+
end
|
178
|
+
end
|
179
|
+
.compact
|
180
|
+
# Prefer duplicate deps with the aliased ones first, so we don't lose the aliases in the next uniq step.
|
181
|
+
.sort_by { |dep| dep.key?(:original_name) || dep.key?(:original_requirement) ? 0 : 1 }
|
182
|
+
.uniq { |item| [item[:name], item[:requirement], item[:type]] }
|
169
183
|
end
|
170
184
|
|
171
185
|
def self.parse_maven_resolved(file_contents, options: {})
|
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: 8.3.
|
4
|
+
version: 8.3.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: 2022-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tomlrb
|