bibliothecary 8.6.0 → 8.6.1
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/rubygems.rb +28 -8
- data/lib/bibliothecary/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 339163151e8113f056a34e7089bcd5e68d0629cdd45b0109b40087974dd0efa4
|
|
4
|
+
data.tar.gz: 0bd35f6a15d412e7625268e41de4122a352a08c5def052a4bdd54efcaede8dba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f6ef41d068ddab930d57d22beb60cb8bdc1543de2429ed5d4e13a3ded544cc8dec1374798c2d5a432d610ed6a5612578996940c793d869795bb0c35ad6ebad5
|
|
7
|
+
data.tar.gz: dff39cdf5dc7b28de5343ad45a1b095336cdcdeb92224855b47abd112f61d0ff6d861367fe8c84fe546ce4a1c7e94fdd2b84cb7c3d841e6057a52db227bff194
|
|
@@ -8,6 +8,7 @@ module Bibliothecary
|
|
|
8
8
|
|
|
9
9
|
NAME_VERSION = '(?! )(.*?)(?: \(([^-]*)(?:-(.*))?\))?'.freeze
|
|
10
10
|
NAME_VERSION_4 = /^ {4}#{NAME_VERSION}$/
|
|
11
|
+
BUNDLED_WITH = /BUNDLED WITH/
|
|
11
12
|
|
|
12
13
|
def self.mapping
|
|
13
14
|
{
|
|
@@ -35,14 +36,20 @@ module Bibliothecary
|
|
|
35
36
|
def self.parse_gemfile_lock(file_contents, options: {})
|
|
36
37
|
file_contents.lines(chomp: true).map do |line|
|
|
37
38
|
match = line.match(NAME_VERSION_4)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
name
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
bundler_match = line.match(BUNDLED_WITH)
|
|
40
|
+
next unless match || bundler_match
|
|
41
|
+
|
|
42
|
+
if match
|
|
43
|
+
name = match[1]
|
|
44
|
+
version = match[2].gsub(/\(|\)/,'')
|
|
45
|
+
{
|
|
46
|
+
name: name,
|
|
47
|
+
requirement: version,
|
|
48
|
+
type: 'runtime'
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
parse_bundler(file_contents)
|
|
52
|
+
end
|
|
46
53
|
end.compact
|
|
47
54
|
end
|
|
48
55
|
|
|
@@ -55,6 +62,19 @@ module Bibliothecary
|
|
|
55
62
|
manifest = Gemnasium::Parser.send(:gemspec, file_contents)
|
|
56
63
|
parse_ruby_manifest(manifest)
|
|
57
64
|
end
|
|
65
|
+
|
|
66
|
+
def self.parse_bundler(file_contents)
|
|
67
|
+
bundled_with_index = file_contents.lines(chomp: true).find_index { |line| line.match(BUNDLED_WITH) }
|
|
68
|
+
version = file_contents.lines(chomp: true).fetch(bundled_with_index + 1)&.strip
|
|
69
|
+
|
|
70
|
+
return nil unless version
|
|
71
|
+
|
|
72
|
+
{
|
|
73
|
+
name: 'bundler',
|
|
74
|
+
requirement: version,
|
|
75
|
+
type: 'runtime'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
58
78
|
end
|
|
59
79
|
end
|
|
60
80
|
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.6.
|
|
4
|
+
version: 8.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Nesbitt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tomlrb
|
|
@@ -339,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
339
339
|
- !ruby/object:Gem::Version
|
|
340
340
|
version: '0'
|
|
341
341
|
requirements: []
|
|
342
|
-
rubygems_version: 3.
|
|
342
|
+
rubygems_version: 3.1.6
|
|
343
343
|
signing_key:
|
|
344
344
|
specification_version: 4
|
|
345
345
|
summary: Find and parse manifests
|