 {BufferedProcess, CompositeDisposable} = require 'atom'
 which = require 'which'
+path = require 'path'
+fs = require 'fs-plus'
+temp = require 'temp'
 
 module.exports =
 class RubocopAutoCorrect

      return atom.notifications.addError("Only use source.ruby")
    if editor.isModified()
      editor.save()
    @autoCorrect(@getOptions(editor.getPath()))

  getOptions: (filePath) ->
    command = atom.config.get('rubocop-auto-correct.rubocopCommandPath')

    @subscriptions.add(bufferSavedSubscription)
    @subscriptions.add(editorDestroyedSubscription)

  autoCorrect: (editor)  ->
    options = @getOptions(editor.getPath())
    which options.command, (err) ->
      if (err)
        return atom.notifications.addFatalError(
