<commit_before>'use strict';

var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');


var ProtractorGenerator = module.exports = function ProtractorGenerator(args, options) {
  yeoman.generators.Base.apply(this, arguments);

  var self = this;

  this.on('end', function() {
    this.installDependencies({
      bower: false,
      skipInstall: options['skip-install'],
      callback: function() {
        var readme = self.readFileAsString('README.txt');
        console.log('Done! Now follow these steps:\n');
        console.log(readme);
        console.log('\nYou can read these instructions in README.txt\n');
      }
    });
  });

  this.pkg = JSON.parse(this.readFileAsString(path.join(__dirname, '../package.json')));
};

util.inherits(ProtractorGenerator, yeoman.generators.Base);

ProtractorGenerator.prototype.askForConfigName = function() {
  var cb = this.async();

  console.log('Welcome to the protractor code generator.\n');

  var prompts = [
    {
      type: 'input',
      name: 'configName',
      message: 'Choose a name for the protractor configuration file',
      default: 'protractor-config.js'
    },
    {
      type: 'input',
      name: 'baseUrl',
      message: 'Choose a base URL',
      default: 'http://localhost:8000'
    }
  ];

  this.prompt(prompts, function(props) {
    this.configName = props.configName;
    this.baseUrl = props.baseUrl;
    cb();
  }.bind(this));
};

ProtractorGenerator.prototype.app = function app() {
  this.mkdir('spec');
};

ProtractorGenerator.prototype.createFiles = function() {
  this.copy('configTemplate.js', this.configName);
  this.copy('package.json');
  this.copy('example_spec.js', 'spec/example_spec.js');
  this.copy('README.txt');
};<commit_msg>upgrade to new format. Start using log<commit_after>'use strict';
var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');
var chalk = require('chalk');


var ProtractorGenerator = yeoman.generators.Base.extend({
  init: function() {
    this.pkg = require('../package.json');
    var self = this;

    this.on('end', function() {
      this.installDependencies({
        bower: false,
        skipInstall: this.options['skip-install'],
        callback: function() {
          var readme = self.readFileAsString('README.txt');
          self.log('Done! Now follow these steps:');
          self.log(readme);
          self.log('You can read these instructions in README.txt');
        }
      });
    });
  },

  askFor: function() {
    var done = this.async();

    this.log(chalk.magenta('Welcome to the protractor code generator.'));

    var prompts = [
      {
        type: 'input',
        name: 'configName',
        message: 'Choose a name for the protractor configuration file',
        default: 'protractor-config.js'
      },
      {
        type: 'input',
        name: 'baseUrl',
        message: 'Choose a base URL',
        default: 'http://localhost:8000'
      }
    ];

    this.prompt(prompts, function(props) {
      this.configName = props.configName;
      this.baseUrl = props.baseUrl;
      done();
    }.bind(this));
  },

  app: function() {
    this.mkdir('spec');
  },

  projectfiles: function() {
    this.copy('configTemplate.js', this.configName);
    this.copy('package.json');
    this.copy('example_spec.js', 'spec/example_spec.js');
    this.copy('README.txt');
  }
});

module.exports = ProtractorGenerator;
{'fraction_non_alphanumeric': 0.15587044534412955, 'fraction_numerical': 0.002313475997686524, 'mean_word_length': 3.0127610208816704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '594955', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1041, 'n_words': 226}