<commit_before>'use babel'

import {Emitter, CompositeDisposable} from 'event-kit'
import {ipcRenderer} from 'electron'

export default class AutoUpdateManager {
  constructor () {
    this.subscriptions = new CompositeDisposable()
    this.emitter = new Emitter()
  }

  initialize (updateEventEmitter) {
    this.subscriptions.add(
      updateEventEmitter.onDidBeginDownloadingUpdate(() => {
        this.emitter.emit('did-begin-downloading-update')
      }),
      updateEventEmitter.onDidBeginCheckingForUpdate(() => {
        this.emitter.emit('did-begin-checking-for-update')
      }),
      updateEventEmitter.onDidCompleteDownloadingUpdate(() => {
        this.emitter.emit('did-complete-downloading-update')
      }),
      updateEventEmitter.onUpdateNotAvailable(() => {
        this.emitter.emit('update-not-available')
      })
    )
  }

  dispose () {
    this.subscriptions.dispose()
  }

  onDidBeginCheckingForUpdate (callback) {
    this.subscriptions.add(
      this.emitter.on('did-begin-checking-for-update', callback)
    )
  }

  onDidBeginDownload (callback) {
    this.subscriptions.add(
      this.emitter.on('did-begin-downloading-update', callback)
    )
  }

  onDidCompleteDownload (callback) {
    this.subscriptions.add(
      this.emitter.on('did-complete-downloading-update', callback)
    )
  }

  onUpdateAvailable (callback) {
    this.subscriptions.add(
      this.emitter.on('update-available', callback)
    )
  }

  onUpdateNotAvailable (callback) {
    this.subscriptions.add(
      this.emitter.on('update-not-available', callback)
    )
  }

  check () {
    ipcRenderer.send('check-for-update')
  }
}
<commit_msg>check -> checkForUpdate<commit_after>'use babel'

import {Emitter, CompositeDisposable} from 'event-kit'
import {ipcRenderer} from 'electron'

export default class AutoUpdateManager {
  constructor () {
    this.subscriptions = new CompositeDisposable()
    this.emitter = new Emitter()
  }

  initialize (updateEventEmitter) {
    this.subscriptions.add(
      updateEventEmitter.onDidBeginDownloadingUpdate(() => {
        this.emitter.emit('did-begin-downloading-update')
      }),
      updateEventEmitter.onDidBeginCheckingForUpdate(() => {
        this.emitter.emit('did-begin-checking-for-update')
      }),
      updateEventEmitter.onDidCompleteDownloadingUpdate(() => {
        this.emitter.emit('did-complete-downloading-update')
      }),
      updateEventEmitter.onUpdateNotAvailable(() => {
        this.emitter.emit('update-not-available')
      })
    )
  }

  dispose () {
    this.subscriptions.dispose()
  }

  onDidBeginCheckingForUpdate (callback) {
    this.subscriptions.add(
      this.emitter.on('did-begin-checking-for-update', callback)
    )
  }

  onDidBeginDownload (callback) {
    this.subscriptions.add(
      this.emitter.on('did-begin-downloading-update', callback)
    )
  }

  onDidCompleteDownload (callback) {
    this.subscriptions.add(
      this.emitter.on('did-complete-downloading-update', callback)
    )
  }

  onUpdateAvailable (callback) {
    this.subscriptions.add(
      this.emitter.on('update-available', callback)
    )
  }

  onUpdateNotAvailable (callback) {
    this.subscriptions.add(
      this.emitter.on('update-not-available', callback)
    )
  }

  checkForUpdate () {
    ipcRenderer.send('check-for-update')
  }
}

{'fraction_non_alphanumeric': 0.13185495954450105, 'fraction_numerical': 0.0, 'mean_word_length': 3.236040609137056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2981986', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1018, 'n_words': 125}