archive 0.0.4 → 0.0.5

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: 5be52d8c272d2e8546d7c34358ede9900cc0c0e4
4
- data.tar.gz: 9f8ac042c7698d9f9303f625631578fc05778146
3
+ metadata.gz: 867ab49a816f3a0b8b0d7ff6493240bcb8519d4b
4
+ data.tar.gz: cf55d3107e872fa047b057c60ab360cf5f675e18
5
5
  SHA512:
6
- metadata.gz: 98046ff9e54c3895f952a3b6ada2074e87dd511258540afdd441d5cb4fa7cedc40c10d709b5d107a2050c5117bc8e4c55204714af9e24136e06a904c5a3d2664
7
- data.tar.gz: 87a51152ffe72b9faa5fdb266dbee868d418759724b16c7751368b678887e05a6b329435623c1395fcf09446a12e193440c582e91b278866919894e64d2db50a
6
+ metadata.gz: bade5a2583f467c1f305c1800256088897de151307eb8d348a677b998856acb86f5f6241354dacae6d0f3e8b7c1e3334fb02c6121fe085a83534fde1b7e7d71d
7
+ data.tar.gz: 0814fa133ae0c12e43ce7c12a5a7e349bfeafde671fcb910b86a2c7ade475a60a0316c80c829e740de65806a8fd34300879ab0a5ac72a15099f2a890e8d8f6c8
@@ -88,6 +88,14 @@ module Archive # :nodoc:
88
88
 
89
89
  extend ::FFI::Library # :nodoc:
90
90
 
91
+ def self.linked_archive_library
92
+ @linked_archive_library
93
+ end
94
+
95
+ def self.linked_archive_library=(val)
96
+ @linked_archive_library = val
97
+ end
98
+
91
99
  #
92
100
  # needed by archiving entry functions
93
101
  #
@@ -109,9 +117,8 @@ module Archive # :nodoc:
109
117
  attach_function :stat, [:string, :pointer], :int
110
118
  end
111
119
 
112
-
113
120
  if ENV["LIBARCHIVE_PATH"]
114
- ffi_lib ENV["LIBARCHIVE_PATH"]
121
+ self.linked_archive_library = ENV["LIBARCHIVE_PATH"]
115
122
  elsif ::FFI::Platform.mac? and File.directory?('/usr/local/Cellar/libarchive')
116
123
  latest = Dir['/usr/local/Cellar/libarchive/*'].
117
124
  select { |x| File.directory?(x) }.
@@ -119,13 +126,15 @@ module Archive # :nodoc:
119
126
  sort.
120
127
  last
121
128
 
122
- ffi_lib "/usr/local/Cellar/libarchive/#{latest}/lib/libarchive.dylib"
129
+ self.linked_archive_library = "/usr/local/Cellar/libarchive/#{latest}/lib/libarchive.dylib"
123
130
  elsif ::FFI::Platform.mac? and File.exist?('/opt/local/lib/libarchive.dylib')
124
- ffi_lib '/opt/local/lib/libarchive.dylib'
131
+ self.linked_archive_library = '/opt/local/lib/libarchive.dylib'
125
132
  else
126
- ffi_lib 'archive'
133
+ self.linked_archive_library = 'archive'
127
134
  end
128
135
 
136
+ ffi_lib self.linked_archive_library
137
+
129
138
  ARCHIVE_OK = 0 # :nodoc:
130
139
  ARCHIVE_EOF = 1 # :nodoc:
131
140
  ARCHIVE_RETRY = -10 # :nodoc:
@@ -1,3 +1,3 @@
1
1
  module Archive
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Hollensbe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-11 00:00:00.000000000 Z
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.1.8
179
+ rubygems_version: 2.1.10
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: Simple library to manage tar and zip archives with libarchive and FFI