bindeps 0.0.11 → 0.1.0
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/bindeps/version.rb +1 -1
- data/lib/unpacker.rb +3 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64723d1363bdd89ea39ce9e551b81986bed2e3be
|
4
|
+
data.tar.gz: 2c41c225b69eeefec52cff061944896134ceb53d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722bda344407f75f0b668f2be6951ccb46ab0707c5f1f5e50bf9841f80d2214d8ac1c77e5fc647a9b21646f3e67821fbf73d3fb213f9c9ef06025895dc375f69
|
7
|
+
data.tar.gz: 769b7be9c54fa053858e5682b1edd9bf0d02b78b32705e35ad91926ccfd1beef4e1ad962237f5e84ae1955d00d1a9dcfae2798190bf8434910384d057be09623
|
data/lib/bindeps/version.rb
CHANGED
data/lib/unpacker.rb
CHANGED
@@ -36,7 +36,7 @@ module Unpacker
|
|
36
36
|
cmd = case file
|
37
37
|
when /rar$/
|
38
38
|
"unrar x -y #{file} #{dir}"
|
39
|
-
when /(tar|tgz|tar\.gz|tar\.bz|tbz)$/
|
39
|
+
when /(tar|tgz|tar\.gz|tar\.bz|tbz|bz2|tar\.bz2)$/
|
40
40
|
"tar xvf #{file} --directory #{dir}"
|
41
41
|
when /zip$/
|
42
42
|
"unzip #{file} -d #{dir}"
|
@@ -53,7 +53,6 @@ module Unpacker
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
# %w[tar rar zip gz bz tgz bgz tar]
|
57
56
|
def self.archive?(file_name)
|
58
57
|
supported = []
|
59
58
|
ext = File.extname(file_name).sub('.', '')
|
@@ -62,7 +61,7 @@ module Unpacker
|
|
62
61
|
supported << "rar"
|
63
62
|
end
|
64
63
|
if !which('tar').empty?
|
65
|
-
%w[tar tgz tgz tar.gz tar.bz tbz].each do |ext|
|
64
|
+
%w[tar tgz tgz tar.gz tar.bz bz2 tar.bz2 tbz].each do |ext|
|
66
65
|
supported << ext
|
67
66
|
end
|
68
67
|
end
|
@@ -77,7 +76,7 @@ module Unpacker
|
|
77
76
|
help = case ext
|
78
77
|
when /rar/
|
79
78
|
"Please install unrar"
|
80
|
-
when /(tar|tgz|tar\.gz|tar\.bz|tbz)$/
|
79
|
+
when /(tar|tgz|tar\.gz|tar\.bz|tbz|bz2|tar\.bz2)$/
|
81
80
|
"Please install tar"
|
82
81
|
when /zip$/
|
83
82
|
"Please install unzip"
|