bibliothecary 8.6.2 → 8.6.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: 86361a7bec7e2b16e6d15548c35ce460a39378f241d010b42f743f9aee761dc6
4
- data.tar.gz: b6b44dd4064c686006932e77abe0c3d8e792bb132f15b0ae2876bd054c38d43c
3
+ metadata.gz: 89c5d8cb9fca421230fa967e5fbc3ce68d9178b0c065cb0c20737464739fab4e
4
+ data.tar.gz: 7ae9d50b5a82ae46f2c473eee0b483f2376674c97dd94ff8b1c70690973dd3d5
5
5
  SHA512:
6
- metadata.gz: b371453204d2523671442fc45ec512f83f45eafb73f429f0a1b743fe5edc6bc23f65fc90c7110aadcb4ed24e7e50ed1b81863f50736355ac9068a274a242ca56
7
- data.tar.gz: d94e3f5986f4d080d0b02d9a0349686220b4b3e9b96f91bd64050ad05dd6785cfbf823a2216b49ec78cec040f48bd3705212894e338efa2382da19ea848db833
6
+ metadata.gz: 29b2d8750cb9611c3a7cef9946fbaf12e8eb6d73d95ecbd604b4ac41c4428a07361f8d67db8ccece341d1f5c59c2b70510695f947bc060ae7a44f3e395126589
7
+ data.tar.gz: 418b9879a3028dc396e996972c49be58fb1a63a3ec707e035d7b9c9cccdbdcefe919ff741a37d71a719cffc15145b4f362534ed83e72e8debbff2e73c4ffdee8
data/Gemfile CHANGED
@@ -1,5 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # Temporarily pegging to HEAD until 0.2.1 is released: https://github.com/piotrmurach/strings-ansi/pull/2
4
+ gem "strings-ansi", ref: "35d0c9430cf0a8022dc12bdab005bce296cb9f00", git: "git@github.com:piotrmurach/strings-ansi.git"
5
+
3
6
  # Specify your gem's dependencies in bibliothecary.gemspec
4
7
  gemspec
5
8
 
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency "deb_control"
26
26
  spec.add_dependency "sdl4r"
27
27
  spec.add_dependency "commander"
28
- spec.add_dependency "strings-ansi"
28
+ spec.add_dependency "strings-ansi" # NB this is also pegged to a git sha in Gemfile temporarily.
29
29
  spec.add_dependency "strings"
30
30
  spec.add_dependency "packageurl-ruby"
31
31
 
@@ -19,7 +19,7 @@ module Bibliothecary
19
19
  options.default path: './'
20
20
  output = Bibliothecary.analyse(options.path)
21
21
  output.each do |file_contents|
22
- puts "#{file_contents[:path]} (#{manifest[:platform]})"
22
+ puts "#{file_contents[:path]} (#{file_contents[:platform]})"
23
23
  file_contents[:dependencies].group_by{|d| d[:type] }.each do |type, deps|
24
24
  puts " #{type}"
25
25
  deps.each do |dep|
@@ -221,8 +221,11 @@ module Bibliothecary
221
221
  end
222
222
 
223
223
  def self.parse_maven_tree(file_contents, options: {})
224
- file_contents = file_contents.gsub(/\r\n?/, "\n")
225
- captures = file_contents.scan(/^\[INFO\](?:(?:\+-)|\||(?:\\-)|\s)+((?:[\w\.-]+:)+[\w\.\-${}]+)/).flatten.uniq
224
+ captures = Strings::ANSI.sanitize(file_contents)
225
+ .gsub(/\r\n?/, "\n")
226
+ .scan(/^\[INFO\](?:(?:\+-)|\||(?:\\-)|\s)+((?:[\w\.-]+:)+[\w\.\-${}]+)/)
227
+ .flatten
228
+ .uniq
226
229
 
227
230
  deps = captures.map do |item|
228
231
  parts = item.split(":")
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "8.6.2"
2
+ VERSION = "8.6.4"
3
3
  end
data/lib/bibliothecary.rb CHANGED
@@ -77,6 +77,7 @@ module Bibliothecary
77
77
 
78
78
  def self.utf8_string(string)
79
79
  string
80
+ .dup # ensure we don't have a frozen string
80
81
  .force_encoding("UTF-8") # treat all strings as utf8
81
82
  .sub(/^\xEF\xBB\xBF/, '') # remove any Byte Order Marks so JSON, etc don't fail while parsing them.
82
83
  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.2
4
+ version: 8.6.4
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-05-26 00:00:00.000000000 Z
11
+ date: 2023-07-02 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:
@@ -324,7 +324,7 @@ homepage: https://github.com/librariesio/bibliothecary
324
324
  licenses:
325
325
  - AGPL-3.0
326
326
  metadata: {}
327
- post_install_message:
327
+ post_install_message:
328
328
  rdoc_options: []
329
329
  require_paths:
330
330
  - lib
@@ -339,8 +339,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  - !ruby/object:Gem::Version
340
340
  version: '0'
341
341
  requirements: []
342
- rubygems_version: 3.1.6
343
- signing_key:
342
+ rubygems_version: 3.3.22
343
+ signing_key:
344
344
  specification_version: 4
345
345
  summary: Find and parse manifests
346
346
  test_files: []