bibliothecary 8.3.1 → 8.3.4

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: ca91a1e5491b7b57370221351c1c90631fd77c12a9687328eccb69b633b477c4
4
- data.tar.gz: 9cdbb6238e28ac32d61c624f1d0a98f29939684fdbfe76b29f24b9fa1737c295
3
+ metadata.gz: 9bd6e1d72ef747c4e0a6070e71609c20e4f801de4e61f05cd53bc8b20d30fc53
4
+ data.tar.gz: 0b0e70fde9855df7c3e18a6824b3d1b43ca83646128ee3972aed7eed1cf90df7
5
5
  SHA512:
6
- metadata.gz: '01295bf67f3ba73a4683b2fc39773d8ae53ac2b1a64ccf674bf8e93aa1cae2cdacb1575a0592f2c9fbb86ddf3cca7cd60475b12252976bad6eafc07514339b34'
7
- data.tar.gz: 701ab67291c19f5e7e180beeaa0501050fd3a1726d8d02918b3e305969f70266377d1ad66c65d17517a171c24440df917d233420916bc4429780541bdd688b0f
6
+ metadata.gz: e3766156e6f96ad25947cd3b5f5d5703e288720f996870e80993e3297df9fa9697793109a0e3d4a8affdc8e87839a7c67374bda098befcac47578c3d61b3a3ee
7
+ data.tar.gz: 886ede7d0f5e7f91bc788a3cc7922be2cf9243deb3e5c8b45109b41a5bb0ed70e1d2d24049fd354ed230da1be9deb0b62cdbebc6e3db10a188fac7ae065a94b4
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, update the version number in `version.rb`, 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).
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: 'runtime' } }
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)
@@ -159,9 +159,17 @@ module Bibliothecary
159
159
  # \--- org.springframework.security:spring-security-test (n)
160
160
  next unless dep.length >= 3
161
161
 
162
+ dep_name = if dep.count == 6
163
+ # get name from renamed package resolution "org:name:version -> renamed_org:name:version"
164
+ dep[-3..-2]
165
+ else
166
+ # get name from version conflict resolution ("org:name:version -> version") and no-resolution ("org:name:version")
167
+ dep[0..1]
168
+ end
169
+
162
170
  version = dep[-1]
163
171
  {
164
- name: dep[0..1].join(":"),
172
+ name: dep_name.join(":"),
165
173
  requirement: version,
166
174
  type: type
167
175
  }
@@ -21,7 +21,7 @@ module Bibliothecary
21
21
  def results
22
22
  partition_file_entries!
23
23
 
24
- no_lockfile_results + single_file_results + multiple_file_results
24
+ (no_lockfile_results + single_file_results + multiple_file_results).uniq
25
25
  end
26
26
 
27
27
  def no_lockfile_results
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "8.3.1"
2
+ VERSION = "8.3.4"
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: 8.3.1
4
+ version: 8.3.4
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-05-19 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tomlrb