archive 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/archive/libarchive.rb +14 -5
- data/lib/archive/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 867ab49a816f3a0b8b0d7ff6493240bcb8519d4b
|
|
4
|
+
data.tar.gz: cf55d3107e872fa047b057c60ab360cf5f675e18
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bade5a2583f467c1f305c1800256088897de151307eb8d348a677b998856acb86f5f6241354dacae6d0f3e8b7c1e3334fb02c6121fe085a83534fde1b7e7d71d
|
|
7
|
+
data.tar.gz: 0814fa133ae0c12e43ce7c12a5a7e349bfeafde671fcb910b86a2c7ade475a60a0316c80c829e740de65806a8fd34300879ab0a5ac72a15099f2a890e8d8f6c8
|
data/lib/archive/libarchive.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
131
|
+
self.linked_archive_library = '/opt/local/lib/libarchive.dylib'
|
|
125
132
|
else
|
|
126
|
-
|
|
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:
|
data/lib/archive/version.rb
CHANGED
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
|
+
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:
|
|
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.
|
|
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
|