358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
|
# File 'lib/yogi.rb', line 358
def undo
Dir.foreach('.git/.backupFiles') do |item|
next if item == '.' or item == '..'
FileUtils.cp_r ".git/.backupFiles/"+ item, "./"
end
FileUtils.rm_r '.git/.backupFiles' if File.exist?('.git/.backupFiles')
FileUtils.rm_r '.git/.ignoreme.json' if File.exist?('.git/.ignoreme.json')
FileUtils.rm_r '.git/.ignoremefile.txt' if File.exist?('.git/.ignoremefile.txt')
puts "Hope You had fun and try it again later."
puts "See you next time #{$account}"
if OS.mac?
file = File.join(__dir__, 'sound', 'Giving-up.mp3')
escfile = Shellwords.escape(file)
cmd = "afplay #{escfile}"
name = "say '#{$account}'"
system name
system cmd
end
end
|