284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
# File 'lib/yogi.rb', line 284
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."
if OS.mac?
file = File.join(__dir__, 'sound', 'Giving-up.mp3')
escfile = Shellwords.escape(file)
cmd = "afplay #{escfile}"
system cmd
end
end
|