<commit_before>/* jshint node: true */
'use strict';

module.exports = {
  name: 'ember-cli-jquery-flot',
  included: function (app) {
    this.app = app;
    var configMessage = [];
    var fs = require("fs"), path = require('path');
    var o = app.options['ember-cli-flot'] || {
        plugins: true
      };
    var flotPath = 'bower_components/flot/';
    var modulePath = path.relative(app.project.root, __dirname);
    var path_join = function () {
      // fix path with windows back slash with path_join
      return path.join.apply(this, arguments).replace(/\\/g, '/');
    };

    var emberCLIVersion = app.project.emberCLIVersion().split(',').map(function (item) {
      return Number(item);
    });
    if (emberCLIVersion[1] === 0 || emberCLIVersion[2] < 8) {
      throw new Error('ember-cli-flot requires ember-cli version 0.1.8 or greater.\n');
    }

    app.import(path_join(flotPath, 'jquery.flot.js'));

    // Import JS from flot
    if (o.plugins instanceof Array) {
      o.plugins.forEach(function (fileName) {
        app.import(flotPath + 'jquery.flot.' + fileName + '.js');
      });
      configMessage.push('some plugins loaded [' + o.plugins.join(',') + ']');
    } else if (o.js !== false) {
      fs.readdir(flotPath, function (err, files) {
        if (err) {
          throw err;
        }

        files.filter(function (file) {
          return fs.statSync(file).isFile();
        }).filter(function (file) {
          return file !== "jquery.flot.js" && file.startsWith("jquery.flot.")
        }).forEach(function (file) {
          app.import(path_join(flotPath, file));
        })
      });

      configMessage.push('all plugins enabled');
    } else {
      configMessage.push('no plugins enabled');
    }

    if (o.quiet !== false) {
      console.log('flot config: ', configMessage.join(', '));
    }
  }
};
<commit_msg>fixing paths<commit_after>/* jshint node: true */
'use strict';

module.exports = {
  name: 'ember-cli-jquery-flot',
  included: function (app) {
    this.app = app;
    var configMessage = [];
    var fs = require("fs"), path = require('path');
    var o = app.options['ember-cli-flot'] || {
        plugins: true
      };
    var flotPath = 'bower_components/flot/';
    var modulePath = path.relative(app.project.root, __dirname);

    var emberCLIVersion = app.project.emberCLIVersion().split(',').map(function (item) {
      return Number(item);
    });
    if (emberCLIVersion[1] === 0 || emberCLIVersion[2] < 8) {
      throw new Error('ember-cli-flot requires ember-cli version 0.1.8 or greater.\n');
    }

    app.import(flotPath + 'jquery.flot.js');

    // Import JS from flot
    if (o.plugins instanceof Array) {
      o.plugins.forEach(function (fileName) {
        app.import(flotPath + 'jquery.flot.' + fileName + '.js');
      });
      configMessage.push('some plugins loaded [' + o.plugins.join(',') + ']');
    } else if (o.js !== false) {
      fs.readdir(flotPath, function (err, files) {
        if (err) {
          throw err;
        }

        files.filter(function (file) {
          return fs.statSync(file).isFile();
        }).filter(function (file) {
          return file !== "jquery.flot.js" && file.startsWith("jquery.flot.")
        }).forEach(function (file) {
          app.import(flotPath + file);
        })
      });

      configMessage.push('all plugins enabled');
    } else {
      configMessage.push('no plugins enabled');
    }

    if (o.quiet !== false) {
      console.log('flot config: ', configMessage.join(', '));
    }
  }
};

{'fraction_non_alphanumeric': 0.17117879300620417, 'fraction_numerical': 0.003948110547095319, 'mean_word_length': 2.477450980392157, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6373840', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1141, 'n_words': 239}