def run
      # do plugins that need to happen before capture
      execute_plugins_for(:pre_capture)

      # do main capture to snapshot_loc
      run_capture

      # check capture succeded, file must exist
      if File.exist?(snapshot_loc)
        ## resize snapshot first
        resize_snapshot!

        # execute post_capture plugins, use to alter the capture
        execute_plugins_for(:post_capture)

        # execute capture_ready plugins, capture is ready for export/sharing
        execute_plugins_for(:capture_ready)

        # clean away any tmp files
        cleanup!
      else
        debug 'Runner: failed to capture a snapshot'
        exit 1
      end
    end
def run
      # do plugins that need to happen before capture
      execute_plugins_for(:pre_capture)

      # do main capture to snapshot_loc
      run_capture

      # check capture succeded, file must exist
      if File.exist?(snapshot_loc)
        ## resize snapshot first
        resize_snapshot!

        # execute post_capture plugins, use to alter the capture
        execute_plugins_for(:post_capture)

        # execute capture_ready plugins, capture is ready for export/sharing
        execute_plugins_for(:capture_ready)

        # clean away any tmp files
        cleanup!
      else
        debug 'Runner: failed to capture a snapshot'
        exit 1
      end
    end
wrap run to handle things that should happen before and after
 this used to be handled with ActiveSupport::Callbacks, but
 now we're just using a simple procedural list