themigrator 0.1.0 → 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: b1f67f74c4b64f07f670d8878a8854e64b6de64e
4
- data.tar.gz: 45b335ce112247d11d2adda886f635b512cb3f80
3
+ metadata.gz: afdd3a14635ec5e8007efba0c1ae097c31e2427f
4
+ data.tar.gz: ffe49a85af153af72248695c210b877f8a288191
5
5
  SHA512:
6
- metadata.gz: a1764195422d095d79055d1e84cd3257672e493fbf1658e8874843ffd4ca7b4f94b0141cc486bbc909a75499bf4e3cc10db62589a715fc27f44c92a6e672ba32
7
- data.tar.gz: 50a6430052769b67d0e3bb28a400514f427c7ed282c6b7a0ff3cceb541ba6ed659da1a39e33a3c476062e07a685fedb78c3bb5551108869000a82dc11cede8b6
6
+ metadata.gz: 3f8233596e05c8a843b66b8aef4842f1d9258858e0c0c89ad68e879c363919861e970339f3da2d4277f61bb9526a2147e3e1d0659451e0d815b09a0ca0577b31
7
+ data.tar.gz: 98114b0bf9e4b8568901733457fa099aea37f3a7a0f1ff5fe802aef639b5c51a78f7ede0999d2aac9867f09c30330a7fb5a4e995f7fd8e03f0860679fe276569
@@ -24,14 +24,14 @@ module Themigrator
24
24
  wd_dir = File.dirname(script)
25
25
  log_fd = File.open(log_file, "w", 0600)
26
26
  pid = Process.spawn(script, err: log_fd, out: log_fd, chdir: wd_dir)
27
- add_process(pid)
27
+ add_pid(pid)
28
28
  end
29
29
 
30
30
  def wait
31
- @processes.each do |pid|
31
+ processes.each do |pid|
32
32
  pid, status = Process.wait2(pid)
33
33
  return_code = status.exitstatus
34
- @processes.delete(pid)
34
+ remove_pid(pid)
35
35
 
36
36
  if return_code != 0
37
37
  raise ActionFailedException.new(pid)
@@ -44,10 +44,15 @@ module Themigrator
44
44
  def processes
45
45
  @processes || []
46
46
  end
47
- def add_process(pid)
47
+
48
+ def add_pid(pid)
48
49
  @processes ||= []
49
50
  @processes << pid
50
51
  end
52
+
53
+ def remove_pid(pid)
54
+ @processes.delete(pid)
55
+ end
51
56
 
52
57
  end
53
58
  end
@@ -1,3 +1,3 @@
1
1
  module Themigrator
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: themigrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Álvarez