<commit_before>import Media from 'ember-responsive/media';

/**
 * An initializer that sets up `ember-responsive`.
 *
 * Refer to {{#crossLink "Ember.Application.responsive"}}{{/crossLink}}
 * for examples of how to configure this library before the initializer
 * before it's run by Ember.
 *
 * @static
 * @constructor
 * @module            ember-responsive
 * @namespace         Ember.Application
 * @class             initializer
 */
export default {
    /**
    * @property  name
    * @type      string
    * @default   responsive
    */
  name: 'responsive',

    /**
    * @method  initialize
    * @param   Ember.Container   container
    * @param   Ember.Application app
    */
  initialize: function(container, app) {
    var breakpoints = container.lookupFactory('breakpoints:main');
    var media = Media.create();
    if (breakpoints) {
      for (var name in breakpoints) {
        if (media.hasOwnProperty(name)) {
          media.match(name, breakpoints[name]);
        }
      }
    }

    app.register('responsive:media', media, { instantiate: false });
    app.inject('controller', 'media', 'responsive:media');
    app.inject('component', 'media', 'responsive:media');
    app.inject('route', 'media', 'responsive:media');
    app.inject('view', 'media', 'responsive:media');
  }
};
<commit_msg>Add a warning if breakpoints are still define in app.js<commit_after>import Media from 'ember-responsive/media';

/**
 * An initializer that sets up `ember-responsive`.
 *
 * Refer to {{#crossLink "Ember.Application.responsive"}}{{/crossLink}}
 * for examples of how to configure this library before the initializer
 * before it's run by Ember.
 *
 * @static
 * @constructor
 * @module            ember-responsive
 * @namespace         Ember.Application
 * @class             initializer
 */
export default {
    /**
    * @property  name
    * @type      string
    * @default   responsive
    */
  name: 'responsive',

    /**
    * @method  initialize
    * @param   Ember.Container   container
    * @param   Ember.Application app
    */
  initialize: function(container, app) {
    if (app.responsive) {
      Ember.warn('Your breakpoints should be defined in /app/breakpoints.js');
    }
    var breakpoints = container.lookupFactory('breakpoints:main');
    var media = Media.create();
    if (breakpoints) {
      for (var name in breakpoints) {
        if (media.hasOwnProperty(name)) {
          media.match(name, breakpoints[name]);
        }
      }
    }

    app.register('responsive:media', media, { instantiate: false });
    app.inject('controller', 'media', 'responsive:media');
    app.inject('component', 'media', 'responsive:media');
    app.inject('route', 'media', 'responsive:media');
    app.inject('view', 'media', 'responsive:media');
  }
};

{'fraction_non_alphanumeric': 0.13967684021543986, 'fraction_numerical': 0.0, 'mean_word_length': 2.8965034965034966, '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': '6865280', 'n_tokens_mistral': 818, 'n_tokens_neox': 788, 'n_words': 202}