pasv_lib 0.1.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50e4d7a31367670be250e437270f02fd37b8638fbd7a541fa91ab0ec7e35dccb
4
- data.tar.gz: 304eab6bd2becd3995b14c92bfdd1a39adda5d73687598eea0c64faeffd03651
3
+ metadata.gz: 92881093b3dfe7566a15d203c8bb234271651c7db55c3b8dcb482cdc3be0dd61
4
+ data.tar.gz: ac9d8d2d24d822c0247061d1bd61ed0b4af8ed1b953b6a69940fd510d6f84605
5
5
  SHA512:
6
- metadata.gz: 2f550d96c0a73954f1a39ddce847580197ec75bcdf0e69733926ba5d794e986c4d13f76d47a9d4872d20156b095381b052b983ded6dd364d56e414aea21b08de
7
- data.tar.gz: d72ecf0b88674b51d0622878659d12f29d22b3bf815ec64b75eb6e120b00dc4f571744ebeb48f1c334bc91e94569ed2673b2c9e78a7bf82ad8fdd0ba04a01d5f
6
+ metadata.gz: 0fb5080462dcf9a18cdd997f2e7862be0ec8db6bfd30fdfc8f0abb2bbd057542987b3843206a78f5399d80fed8ef212fc6ccef737c91ef95c481298868f0f304
7
+ data.tar.gz: daa030798be2f4ee29d3d4cd93c1d0ccd121cfe8cc79f1ed2d70461e4f3b6eacb5a040d33b9f7c87992732d9fc95019935bf16a9f740c8a253482f5d398dec99
data/.gitignore CHANGED
@@ -11,4 +11,6 @@
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
13
 
14
- .idea
14
+ .idea
15
+
16
+ .ruby-*
@@ -1,3 +1,3 @@
1
1
  module PasvLib
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
data/vendor/systemu.rb CHANGED
@@ -48,6 +48,9 @@ class SystemUniversal
48
48
  class Error < RuntimeError
49
49
  end
50
50
 
51
+ class Eexist < Error
52
+ end
53
+
51
54
  #
52
55
  # constants
53
56
  #
@@ -128,10 +131,19 @@ class SystemUniversal
128
131
  buf = pipe.read
129
132
  buf = "#{ line }#{ buf }"
130
133
  e = Marshal.load buf
131
- raise unless Exception === e
132
- raise e
134
+
135
+ # If Marshal load loaded a particular exception, raise it.
136
+ if Exception === e
137
+ raise e
138
+ else
139
+ raise
140
+ end
141
+
142
+ # regardless of the error raised, we want to raise SystemUniversal::Error so we have one thnig to catch.
143
+ rescue e
144
+ raise Error, "systemu: Error - process interrupted (original error: #{e.inspect})!\n#{ buf }\n"
133
145
  rescue
134
- raise Error "systemu: Error - process interrupted!\n#{ buf }\n"
146
+ raise Error, "systemu: Error - process interrupted!\n#{ buf }\n"
135
147
  end
136
148
  end
137
149
  thread = new_thread cid, @block if @block
@@ -280,8 +292,8 @@ class SystemUniversal
280
292
 
281
293
  begin
282
294
  Dir.mkdir tmp
283
- rescue Errno::EEXIST
284
- raise Error if i >= max
295
+ rescue Errno::EEXIST => e
296
+ raise Eexist, e.message if i >= max
285
297
  next
286
298
  end
287
299
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pasv_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Moore