<commit_before>/* eslint-env node */
'use strict';

module.exports = {
  name: 'ember-cli-chart',
  included: function(app, parentAddon) {
    this._super.included.apply(this, arguments);
    
    var target = (parentAddon || app);
    if (target.app) {
      target = target.app;
    }
    
    var bowerDir = target.bowerDirectory;
    app.import(bowerDir + '/chartjs/dist/Chart.js');
  }
};
<commit_msg>Use the find host method<commit_after>/* eslint-env node */
'use strict';

module.exports = {
  name: 'ember-cli-chart',
  included: function() {
    this._super.included.apply(this, arguments);

    var app;

    // If the addon has the _findHost() method (in ember-cli >= 2.7.0), we'll just
    // use that.
    if (typeof this._findHost === 'function') {
      app = this._findHost();
    } else {
      // Otherwise, we'll use this implementation borrowed from the _findHost()
      // method in ember-cli.
      var current = this;
      do {
        app = current.app || app;
      } while (current.parent.parent && (current = current.parent));
    }
    
    app.import(app.bowerDirectory + '/chartjs/dist/Chart.js');
  }
};

{'fraction_non_alphanumeric': 0.15202108963093147, 'fraction_numerical': 0.0026362038664323375, 'mean_word_length': 2.5817610062893084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '578513', 'n_tokens_mistral': 380, 'n_tokens_neox': 371, 'n_words': 90}