ffi-libarchive-binary 0.2.2-x86-linux → 0.2.3-x86-linux

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: d8c2874fa4462e94d3a70d56d0596e0963b35aa2
4
- data.tar.gz: 324e7b9d4312adb41ad5f5843e7d3a1d57cb645a
3
+ metadata.gz: 921ee4594fcdbbbdf4a12570f7d9d54732254376
4
+ data.tar.gz: 74cc129f37eb142b59644aac2036f4341035c66a
5
5
  SHA512:
6
- metadata.gz: e11cc134f1814af19369264b9f990d11e306519ac858162f1128c4f8fa88bf5503169b1dd9b77981425bbf10188868175f9bd4840926014ef0b0d3cc1815dec0
7
- data.tar.gz: e0ee80b0bde95243fbe053be8abb9879d3f91f6fa9b1866fcb798dca9beac0c33b9daaaab71b9767082a3ecefbcf9c15a70aa508a3d4699f57c9e79bf5d6cc20
6
+ metadata.gz: e5ab46546d698a8ce829e8e9a286dd45d84645abe74e7fd52cb038414162d21217bb96b44b52befc00dac9080bed64f554af27ccbbe7c33b0f15f8341e839f5f
7
+ data.tar.gz: 9d9c5bac889c1df489e6336348c52e9ce1422523cd1fa55db966dd3268218e6441f16c6ebc08856f313f1c5a0405bb45c60d25c2cf53ee22dcbf2ea816a6f9d0
@@ -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: x86-linux
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