<commit_before>'use babel';

import JunitRunnerView from './junit-runner-view';
import {BufferedProcess, CompositeDisposable} from 'atom';
import path from 'path';

export default
{
	junitRunnerView: null,
	subscriptions: null,
	cwd: null,
	baseName: null,
	fileName: null,
	output: '',
	stack: '',

	activate(state)
	{
		this.junitRunnerView = new JunitRunnerView(state.junitRunnerViewState);

		this.subscriptions = new CompositeDisposable();
		this.subscriptions.add(atom.commands.add('atom-text-editor', {'junit-runner:run': () => this.run()}));
	},

	deactivate()
	{
		this.subscriptions.dispose();
		this.junitRunnerView.destroy();
	},

	serialize()
	{
		return {junitRunnerViewState: this.junitRunnerView.serialize()};
	},

	setup()
	{
		const editor = atom.workspace.getActiveTextEditor();
		if(editor === null) return;
		const filePath = editor.getPath();
		this.cwd = path.dirname(filePath);
		this.baseName = path.basename(filePath, path.extname(filePath));
		this.fileName = path.basename(filePath);
	},

	run()
	{
		this.setup();

		this.output = '';
		this.stack = '';<commit_msg>:bug:<commit_after>'use babel';

import JunitRunnerView from './junit-runner-view';
import {BufferedProcess, CompositeDisposable} from 'atom';
import path from 'path';

export default
{
	junitRunnerView: null,
	subscriptions: null,
	cwd: null,
	filePath: null,
	baseName: null,
	fileName: null,
	output: '',
	stack: '',

	activate(state)
	{
		this.junitRunnerView = new JunitRunnerView(state.junitRunnerViewState);

		this.subscriptions = new CompositeDisposable();
		this.subscriptions.add(atom.commands.add('atom-text-editor', {'junit-runner:run': () => this.run()}));
	},

	deactivate()
	{
		this.subscriptions.dispose();
		this.junitRunnerView.destroy();
	},

	serialize()
	{
		return {junitRunnerViewState: this.junitRunnerView.serialize()};
	},

	setup()
	{
		const editor = atom.workspace.getActiveTextEditor();
		if(editor === null) return;
		this.filePath = editor.getPath();
		this.cwd = path.dirname(filePath);
		this.baseName = path.basename(filePath, path.extname(filePath));
		this.fileName = path.basename(filePath);
	},

	run()
	{
		this.setup();

		this.output = '';
		this.stack = '';
{'fraction_non_alphanumeric': 0.16074681238615665, 'fraction_numerical': 0.0, 'mean_word_length': 4.843085106382978, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2086997', 'n_tokens_mistral': 788, 'n_tokens_neox': 745, 'n_words': 135}