bibliothecary 8.7.2 → 8.7.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d0f05bf5e90424caec70a51181e2fcdeef5ad3ba8ab03109cd765f2ea2943b0
|
4
|
+
data.tar.gz: e40d4ab5813287042f421c719df563869f2a6b3b8647d038e666b4e2bfc830c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 279dd423656e36ce95d8ef56f4c6377019b8f101d2d57c71c8fcecba09c62bb2bb50deb0b98f996045f79f798021ef0eadaae351b2cfc5ca3ca9ad8b78fc80f4
|
7
|
+
data.tar.gz: 52e317e720768a405d9f2c77e1f855a025274da31b8460784524cff825715f19b58be1f158505de099c026e8ed292bd7008ec8a468bb733bba1e7787294e248b
|
@@ -42,7 +42,7 @@ module Bibliothecary
|
|
42
42
|
|
43
43
|
dependencies_to_analysis(info, kind, dependencies)
|
44
44
|
rescue Bibliothecary::FileParsingError => e
|
45
|
-
Bibliothecary::Analyser::create_error_analysis(platform_name, info.relative_path, kind, e.message)
|
45
|
+
Bibliothecary::Analyser::create_error_analysis(platform_name, info.relative_path, kind, e.message, e.location)
|
46
46
|
end
|
47
47
|
alias analyze_contents_from_info analyse_contents_from_info
|
48
48
|
|
@@ -84,7 +84,10 @@ module Bibliothecary
|
|
84
84
|
|
85
85
|
rescue Exception => e # default is StandardError but C bindings throw Exceptions
|
86
86
|
# the C xml parser also puts a newline at the end of the message
|
87
|
-
|
87
|
+
location = e.backtrace_locations[0]
|
88
|
+
.to_s
|
89
|
+
.then { |l| l =~ /bibliothecary\// ? l.split("bibliothecary/").last : l.split("gems/").last }
|
90
|
+
raise Bibliothecary::FileParsingError.new(e.message.strip, filename, location)
|
88
91
|
end
|
89
92
|
|
90
93
|
private
|
@@ -4,14 +4,15 @@ require_relative './analyser/analysis.rb'
|
|
4
4
|
|
5
5
|
module Bibliothecary
|
6
6
|
module Analyser
|
7
|
-
def self.create_error_analysis(platform_name, relative_path, kind, message)
|
7
|
+
def self.create_error_analysis(platform_name, relative_path, kind, message, location=nil)
|
8
8
|
{
|
9
9
|
platform: platform_name,
|
10
10
|
path: relative_path,
|
11
11
|
dependencies: nil,
|
12
12
|
kind: kind,
|
13
13
|
success: false,
|
14
|
-
error_message: message
|
14
|
+
error_message: message,
|
15
|
+
error_location: location,
|
15
16
|
}
|
16
17
|
end
|
17
18
|
|
@@ -8,9 +8,10 @@ module Bibliothecary
|
|
8
8
|
end
|
9
9
|
|
10
10
|
class FileParsingError < StandardError
|
11
|
-
attr_accessor :filename
|
12
|
-
def initialize(msg, filename)
|
11
|
+
attr_accessor :filename, :location
|
12
|
+
def initialize(msg, filename, location=nil)
|
13
13
|
@filename = filename
|
14
|
+
@location = location # source code location of the error, e.g. "lib/hi.rb:34"
|
14
15
|
msg = "#{filename}: #{msg}" unless msg.include?(filename)
|
15
16
|
super("#{msg}")
|
16
17
|
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.7.
|
4
|
+
version: 8.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11
|
11
|
+
date: 2023-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tomlrb
|
@@ -248,7 +248,7 @@ dependencies:
|
|
248
248
|
- - ">="
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: '0'
|
251
|
-
description:
|
251
|
+
description:
|
252
252
|
email:
|
253
253
|
- andrewnez@gmail.com
|
254
254
|
executables:
|
@@ -326,7 +326,7 @@ homepage: https://github.com/librariesio/bibliothecary
|
|
326
326
|
licenses:
|
327
327
|
- AGPL-3.0
|
328
328
|
metadata: {}
|
329
|
-
post_install_message:
|
329
|
+
post_install_message:
|
330
330
|
rdoc_options: []
|
331
331
|
require_paths:
|
332
332
|
- lib
|
@@ -341,8 +341,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
- !ruby/object:Gem::Version
|
342
342
|
version: '0'
|
343
343
|
requirements: []
|
344
|
-
rubygems_version: 3.
|
345
|
-
signing_key:
|
344
|
+
rubygems_version: 3.3.22
|
345
|
+
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: Find and parse manifests
|
348
348
|
test_files: []
|