rar 0.1 → 0.1.1

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: 142dbffb47cce75ea7de10b407a2a103486330eb
4
- data.tar.gz: 5c66d66bcae8e0bb1a2a3bf6c0ee98953cf21899
3
+ metadata.gz: ae77aab06049ba8f26ed729a44b672cd182bb361
4
+ data.tar.gz: 8aad6f271565a5788b387207e99932bec57434f0
5
5
  SHA512:
6
- metadata.gz: a096bd80b400449335222afcd3b4624a26201512de8e0c100885358938100c3cf64f3135e30fbc34864c6b6c8b26c2e0563b4df8c7f18707b4d2b6a4be1587c1
7
- data.tar.gz: 08dbe55dfc63e46c61d02953833e47b454ae74486fe5a742ab7b3d1b21d0944a3df299ccfa53fe636d5fd08770de411424d60c912bbfdc8e2eff75fb149817db
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
+ [![Build Status](https://travis-ci.org/mkroman/rar.svg)](https://travis-ci.org/mkroman/rar)
7
+ [![Dependency Status](https://gemnasium.com/mkroman/rar.svg)](https://gemnasium.com/mkroman/rar)
8
+
6
9
  ## Installation
7
10
 
8
11
  `gem install rar`
@@ -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
- `#{command_line}`
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 $? > 1
56
- if message = ExitCodeMessage[$?]
58
+ if exit_status > 1
59
+ if message = ExitCodeMessages[exit_status]
57
60
  raise CommandLineError, message
58
61
  else
59
- raise CommandLineError, "Unknown exit code: #{$?}"
62
+ raise CommandLineError, "Unknown exit status: #{exit_status}"
60
63
  end
61
64
  else
62
65
  true
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RAR
4
4
  # The library version constant.
5
- Version = "0.1"
5
+ Version = "0.1.1"
6
6
 
7
7
  # Returns the current library version number.
8
8
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rar
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Kroman