dev 1.0.235 → 1.0.236

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 (2) hide show
  1. data/lib/dev/SystemCall.rb +17 -3
  2. metadata +1 -1
@@ -238,19 +238,33 @@ class SystemCall
238
238
  db = SQLite3::Database.new filename
239
239
  @timeout=0 if @timeout.nil?
240
240
  @dir=Rake.original_dir() if(@dir.nil?)
241
- values = "VALUES('" + @start_time.strftime('%Y-%m-%dT%H:%M:%S') +
241
+ values = "VALUES(null,'" + @start_time.strftime('%Y-%m-%dT%H:%M:%S') +
242
242
  "','" + @end_time.strftime('%Y-%m-%dT%H:%M:%S') +
243
243
  "','" + Time.at(elapsed).gmtime.strftime('%H:%M:%S') +
244
244
  "'," + @status.to_s +
245
245
  ",'" + cmd + #@command.gsub("'","''") +
246
246
  "','" + arguments +
247
247
  "','" + @dir.to_s +
248
- "','" + @output.gsub("'", "''") +
249
- "','" + @error.gsub("'", "''") +
248
+ #"','" + @output.gsub("'", "''") +
249
+ #"','" + @error.gsub("'", "''") +
250
250
  "','" + executable +
251
251
  "'," + @timeout.to_s + ")"
252
252
  sql="insert into Commands #{values};"
253
253
  db.execute(sql)
254
+ if(@status != 0)
255
+ id=nil
256
+ db.execute("select * from Commands where startTime='" +
257
+ @start_time.strftime('%Y-%m-%dT%H:%M:%S') +
258
+ "' AND exitCode=" + @status.to_s + ";") do |row|
259
+ id=row[0]
260
+ end
261
+ if(!id.nil?)
262
+ sql="insert or replace INTO Output VALUES(" + id.to_s +
263
+ ",'" + @output.gsub("'","''") +
264
+ "','" + @error.gsub("'","''") + "')";
265
+ db.execute(sql)
266
+ end
267
+ end
254
268
  db.close
255
269
  db=nil
256
270
  rescue
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.235
4
+ version: 1.0.236
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: