<commit_before>export default Ember.Route.extend({
  model: function () {
    // later we'll use this hook to grab weather data from *somewhere*
    // or we'll realize that the index route hook won't allow query params
    // so we'll move this.
    return {
      weatherData: 'some weather data from <some weather api>',
      imageData: 'some data returned by <insert your fav image api here>'
    };
  }
});<commit_msg>explain how promises work, use Ember.RSVP.hash to resolve data from two sources inside model hook<commit_after>function getJSON(something) {
  console.log("something is: ", something);
  return new Ember.RSVP.Promise(function (resolve, reject) {
    if (something == 'weather.json') {
      setTimeout(function () {
        console.log('from inside weather.json option')
        resolve('some weather data');
      }, 2000);
    }

    if (something == 'image.json') {
      setTimeout(function () {
        resolve('some image data');
      }, 500);
    }
  });
}


export default Ember.Route.extend({
  model: function () {

    var promises = {
      weatherData: getJSON('weather.json'),
      imageData: getJSON('image.json')
    };

    return Ember.RSVP.hash(promises);
  }
});
{'fraction_non_alphanumeric': 0.12748344370860928, 'fraction_numerical': 0.005794701986754967, 'mean_word_length': 2.976973684210526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7106679', 'n_tokens_mistral': 357, 'n_tokens_neox': 342, 'n_words': 109}