ffi-libarchive-binary 0.2.2-arm64-darwin → 0.2.3-arm64-darwin

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
  SHA1:
3
- metadata.gz: fd56f4d8669091e1f8403bc8c72e670bcfdd7519
4
- data.tar.gz: 5f66e651077c6c36b1b6911b576d1238b72c26d2
3
+ metadata.gz: 6315d22282375d09ccf51dee29f240082a905c20
4
+ data.tar.gz: 62019d832b39354638fb913545d0fda8f64d913e
5
5
  SHA512:
6
- metadata.gz: 33f1389daf362441f79ffe99be7745f7015efdef71a6eaee31c0e217f8cf9897bd5cdf701e2e68303d636b63502f230c9afde4762dee3afaeddc5023d855fb61
7
- data.tar.gz: ce0d4571ea464e83f21d46c053dede7e0adf89e1d828995fbefbcb92643672cc3bf2eab12d656c093419622d83d0874e50d8a3fa168f30cd3cc4be6f61348dd1
6
+ metadata.gz: c2a107310273c293d8de793417ff98ea6ff7ad82dbcd50ae7122295002da1b56652ad3a93aa3108dac57c51431143684b075bf6fdd75c58cbfeb7e420d26aa4f
7
+ data.tar.gz: b09547a824fc373682767a3d8d44f3759c3b8899685eddead6ac454e73e4ccd938a491da3c296e6a5a51f8cf259a3c2d7d9b201e5c74b86b574ca862127b08ac
@@ -1,25 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "ffi-libarchive-binary/version"
4
- require "ffi"
5
4
  require "pathname"
6
5
 
7
6
  module LibarchiveBinary
8
7
  class Error < StandardError; end
9
8
 
10
- module LibraryPath
11
- LIBRARY_PATH = Pathname.new(File.join(__dir__, "ffi-libarchive-binary"))
9
+ LIBRARY_PATH = Pathname.new(File.join(__dir__, "ffi-libarchive-binary"))
10
+ end
11
+
12
+ module Archive
13
+ module C
14
+ def self.ffi_lib(*args)
15
+ prefixed = args.map do |names|
16
+ filenames = names.is_a?(Array) ? names : [names]
17
+ with_path = filenames.map(&:to_s).map do |filename|
18
+ LibarchiveBinary::LIBRARY_PATH.join(FFI.map_library_name(filename)).to_s
19
+ end
12
20
 
13
- def ffi_lib(*names)
14
- prefixed = names.map do |name|
15
- paths = name.is_a?(Array) ? name : [name]
16
- paths.map { |x| LIBRARY_PATH.join(FFI::map_library_name(x)).to_s }
21
+ with_path + filenames
17
22
  end
18
23
 
19
- super(*(prefixed + names))
24
+ super(*prefixed)
20
25
  end
21
26
  end
22
-
23
- ::FFI::Library.prepend(LibraryPath)
24
- require "ffi-libarchive"
25
27
  end
28
+
29
+ require "ffi-libarchive"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LibarchiveBinary
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-libarchive-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-02 00:00:00.000000000 Z
11
+ date: 2021-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi-libarchive