socotra-build 0.3.34 → 0.3.35

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/socotra-build.rb +9 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c374561e2d3b5919c0ceeae4947c9171d95b0be4
4
- data.tar.gz: cfe9bc110ef12ee0fed8555da5241276602a93b9
3
+ metadata.gz: be67ac49ba0733ae8f70437bdaea69bcbf0b2a44
4
+ data.tar.gz: b1466768369c9413bcf24727befebdf3c9dfbd00
5
5
  SHA512:
6
- metadata.gz: 39fbe85fa21b13a09accea924598d6a98dc424b64471828ccbbea06329be06c023967ec1eca44d05ab50f2c4daebaedcb780311b80b4b73fae46e37e81724e2b
7
- data.tar.gz: 1b9a16c8e68414a867afa258ae4486d09143305253b82b6ccbd9de5cc3ae73c455e30546fbeaba6900424af8949310d9752e51493a8b3a4cd809d59b62e427d1
6
+ metadata.gz: 8fb1f7bae37e04563f75bb6aa7209f99275f34f5bfbbea7e016b9d42a7bf81d80a5fc6057ef1d2376da108660467003a251776af27de0522c3402468b1933dcc
7
+ data.tar.gz: e80fc3ef592c9c4b9991b953f25d7248ed78caafdfc037ba8efe7b7201283879eb9b6ea23f91401b9c47b6e049dff071c3f5ebdb8848008000f2b01bc30181da
data/lib/socotra-build.rb CHANGED
@@ -61,14 +61,8 @@ def self.system_safe(cmd=cmd, cmd_description=cmd_description, error_message=err
61
61
  puts "Not logging command"
62
62
  end
63
63
 
64
- if log
65
- log_out = "logs/#{cmd_description}_out.log"
66
- log_err = "logs/#{cmd_description}_err.log"
67
- puts "\tLogs available here: #{cmd_description}_err.log and #{cmd_description}_out.log\n\n"
68
- else
69
- log_out = "/dev/null"
70
- log_err = "/dev/null"
71
- end
64
+ log_out = "logs/#{cmd_description}_out.log"
65
+ log_err = "logs/#{cmd_description}_err.log"
72
66
 
73
67
  pid = spawn(cmd, :out=>log_out, :err=>log_err)
74
68
  begin
@@ -84,9 +78,14 @@ def self.system_safe(cmd=cmd, cmd_description=cmd_description, error_message=err
84
78
 
85
79
  puts "\t#{cmd_description} took #{elapsed} seconds"
86
80
 
81
+ file = File.open("logs/#{cmd_description}_out.log", "rb")
82
+ out = file.read
83
+
87
84
  if log
88
- file = File.open("logs/#{cmd_description}_out.log", "rb")
89
- out = file.read
85
+ puts "\tLogs available here: #{cmd_description}_err.log and #{cmd_description}_out.log\n\n"
86
+ else
87
+ File.delete("logs/#{cmd_description}_err.log")
88
+ File.delete("logs/#{cmd_description}_out.log")
90
89
  end
91
90
 
92
91
  if not success and raise_on_fail
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socotra-build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.34
4
+ version: 0.3.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Antenesse