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

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: 3930814f09e5a26e9831d756cab73e2297837323
4
- data.tar.gz: 86e1476b4fc651834afa749e090856863c526330
3
+ metadata.gz: b230b15887bb89c83f6c52a8f1b3395166697a11
4
+ data.tar.gz: dc14d85dddd3c05b74cfbeaa20ef79087c5bf736
5
5
  SHA512:
6
- metadata.gz: f7f018b606c3ba95914d01389cb751ab1ae28fa40e79ab4ba8f4be2435b4cf84afd833a58c39848dcc3716c4e7742c63b4aba963dc61faa22dddd6fbab542225
7
- data.tar.gz: cc956f78e9b2ece7c25b7ca427edaf837d3b6ce011a6354b3a49bf1ae522e6dd7cf208b2667ca0355a41f406792bf8bacea4fda8868deff76c97ec0d658c7adf
6
+ metadata.gz: fea17625d06bb4df55feae2177b0edbd5e3bc69ac2fd80e53d4cf76bccd96860d90d5c52f7fb50b4017a9112e7c1af72aefaf08a6f3cabd483e99feacfb18152
7
+ data.tar.gz: df99858b19dc6f0128413dd900b54267d8cf15836f58fbe56abab66b09e28eeb7a462a7f9a3f66cf913f9e19681e3d37af39a96131c07e7ab2e4615afae6f2d6
@@ -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-mingw32
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