rar 0.1 → 0.1.1
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/README.md +3 -0
- data/library/rar/archive.rb +8 -5
- data/library/rar/version.rb +1 -1
- 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: ae77aab06049ba8f26ed729a44b672cd182bb361
|
4
|
+
data.tar.gz: 8aad6f271565a5788b387207e99932bec57434f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 381cc6ee15373f718c6b76e42fb95fede0a9b74e322b5becaa22d1789cbd38b31617857d744854e36a5594c4d5ff23f63cc832d721efbb1cf84d5d762f97de53
|
7
|
+
data.tar.gz: e8f6370d87eb3417d69d729e4ed62b2febdd6a35c0986ede7db54c6a30501fff33650311bc01998411c1d33a23b47f47b574e72044b78b735c56debe7517e03b
|
data/README.md
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
RAR is a Ruby wrapper for the command-line application `rar`, also known as
|
4
4
|
WinRAR for Windows. A free evaluation copy can be obtained from [RarLab](http://rarlab.com).
|
5
5
|
|
6
|
+
[](https://travis-ci.org/mkroman/rar)
|
7
|
+
[](https://gemnasium.com/mkroman/rar)
|
8
|
+
|
6
9
|
## Installation
|
7
10
|
|
8
11
|
`gem install rar`
|
data/library/rar/archive.rb
CHANGED
@@ -47,16 +47,19 @@ module RAR
|
|
47
47
|
|
48
48
|
# Create the final archive.
|
49
49
|
#
|
50
|
-
# @raise CommandLineError if the exit code indicates an error.
|
51
50
|
# @return true if the command executes without a hitch.
|
51
|
+
# @raise CommandLineError if the exit code indicates an error.
|
52
52
|
def create!
|
53
|
-
|
53
|
+
rar_process = IO.popen command_line
|
54
|
+
|
55
|
+
# Wait for the child rar process to finish.
|
56
|
+
_, exit_status = Process.wait2 rar_process.pid
|
54
57
|
|
55
|
-
if
|
56
|
-
if message =
|
58
|
+
if exit_status > 1
|
59
|
+
if message = ExitCodeMessages[exit_status]
|
57
60
|
raise CommandLineError, message
|
58
61
|
else
|
59
|
-
raise CommandLineError, "Unknown exit
|
62
|
+
raise CommandLineError, "Unknown exit status: #{exit_status}"
|
60
63
|
end
|
61
64
|
else
|
62
65
|
true
|
data/library/rar/version.rb
CHANGED