module Lolcommits
Constants
- PLUGINS
- VERSION
Protected Instance Methods
cleanup!()
click to toggle source
# File lib/lolcommits/runner.rb, line 101 def cleanup! debug "Runner: running cleanup" # clean up the captured image and any other raw assets FileUtils.rm(self.snapshot_loc) FileUtils.rm_f(self.config.video_loc) FileUtils.rm_rf(self.config.frames_loc) end
die_if_rebasing!()
click to toggle source
# File lib/lolcommits/runner.rb, line 73 def die_if_rebasing! debug "Runner: Making sure user isn't rebasing" if not self.repo_internal_path.nil? mergeclue = File.join self.repo_internal_path, "rebase-merge" if File.directory? mergeclue debug "Runner: Rebase detected, silently exiting!" exit 0 end end end
resize_snapshot!()
click to toggle source
# File lib/lolcommits/runner.rb, line 84 def resize_snapshot! debug "Runner: resizing snapshot" image = MiniMagick::Image.open(self.snapshot_loc) if (image[:width] > 640 || image[:height] > 480) #this is ghetto resize-to-fill image.combine_options do |c| c.resize '640x480^' c.gravity 'center' c.extent '640x480' end debug "Runner: writing resized image to #{self.snapshot_loc}" image.write self.snapshot_loc end debug "Runner: copying resized image to #{self.main_image}" FileUtils.cp(self.snapshot_loc, self.main_image) end