module Lolcommits
This is just to keep some usage statistics on lolcommits.
Constants
- PLUGINS
- VERSION
Protected Instance Methods
cleanup!()
click to toggle source
# File lib/lolcommits/runner.rb, line 83 def cleanup! debug "Runner: running cleanup" #clean up the captured image FileUtils.rm(self.snapshot_loc) end
die_if_rebasing!()
click to toggle source
# File lib/lolcommits/runner.rb, line 55 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 66 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