ffi-libarchive-binary 0.2.2-x64-mingw32 → 0.2.3-x64-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: 3b67b7a3bce7a241489087b1accccdfdf9701bb1
4
- data.tar.gz: 9ecbd5c8d43a1b28dabc6896a8aa7e4834c27514
3
+ metadata.gz: 930696592076ceeab4eb7373fd6bcfe3e1b20f41
4
+ data.tar.gz: cfeaf6dfb10c638e5c11a0d77dbc882725f2a128
5
5
  SHA512:
6
- metadata.gz: a35e39235924ee1389c3447661c0cff98c51aab8f423360e769a8e5425eb2e10d9267d79200ba767d4bb461ba5f2527e452c2db6761e2326f283685c3620c05d
7
- data.tar.gz: 770e497fe9229c5dff95eea65fb2a98a14c03fbcb348f82f0ae91837b598cc97eebbf3a48d97a137a7cd83ef9de84f09b11b6f3aa5fd09491f08c96a95280624
6
+ metadata.gz: 2ccbac3cd0ce7232e924319f4aea4e99f453890999e14c5ad3e3e60ea6514cad7d8230e24841eda14d110b2327248c27eff2bacf7772a2d0e7993858aa75144a
7
+ data.tar.gz: f4c54d926f42d7bbb22a875b95649406d088903838214059484e0292419ba5a68b5497a72f0d125edfcc1635561673936b61260155301920cff674fdbb71ced9
@@ -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: x64-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