<commit_before>import {
  which,
  rm,
  exec
} from 'shelljs';
import SubCommand from '../models/sub-command';
import CreateAndStepIntoDirectory from '../tasks/create-and-step-into-directory';
import GitPull from '../tasks/git-pull';
import ProjectSettings from '../models/project-settings';

// eventually allow users to create new projects based on a flag
// ie. they can create a new react-redux-starter-kit or a new
// universal react starter kit, etc.

class New extends SubCommand {
  constructor() {
    super();
    this.createDirTask = new CreateAndStepIntoDirectory(this.environment);
    this.gitPullTask = new GitPull(this.environment);
  }

  printUserHelp() {
    this.ui.write('Command used for generating new redux projects');
  }

  run(cliArgs) {
    this.confirmGit();
    this.createDirTask.run(cliArgs).then(() => {
      let fetch_url = 'https://github.com/jiay0u/generator-react-redux.git';
      if (cliArgs.useSsh) {
        console.log('USING SSH');
        fetch_url = 'jiay0u@github.com/jiay0u/generator-react-redux.git';
      }
      this.gitPullTask.run(fetch_url).then(() => {
        this.createProjectSettings();
        this.resetGitHistory();
      });
    });
  }

  confirmGit() {<commit_msg>no message<commit_after>import {
  which,
  rm,
  exec
} from 'shelljs';
import SubCommand from '../models/sub-command';
import CreateAndStepIntoDirectory from '../tasks/create-and-step-into-directory';
import GitPull from '../tasks/git-pull';
import ProjectSettings from '../models/project-settings';

// eventually allow users to create new projects based on a flag
// ie. they can create a new react-redux-starter-kit or a new
// universal react starter kit, etc.

class New extends SubCommand {
  constructor() {
    super();
    this.createDirTask = new CreateAndStepIntoDirectory(this.environment);
    this.gitPullTask = new GitPull(this.environment);
  }

  printUserHelp() {
    this.ui.write('Command used for generating new redux projects');
  }

  run(cliArgs) {
    this.confirmGit();
    this.createDirTask.run(cliArgs).then(() => {
      let fetch_url = 'https://github.com/jiay0u/generator-react-redux.git';
      if (cliArgs.useSsh) {
        fetch_url = 'jiay0u@github.com/jiay0u/generator-react-redux.git';
      }
      this.gitPullTask.run(fetch_url).then(() => {
        this.createProjectSettings();
        this.resetGitHistory();
      });
    });
  }

  confirmGit() {
{'fraction_non_alphanumeric': 0.1377319587628866, 'fraction_numerical': 0.002474226804123711, 'mean_word_length': 3.2786596119929454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2064406', 'n_tokens_mistral': 765, 'n_tokens_neox': 739, 'n_words': 167}