blueFast
blueFast

Reputation: 44511

Show version of ember-data

Ember does the following when starting an application:

if ( Ember.LOG_VERSION ) {
  Ember.LOG_VERSION = false; // we only need to see this once per Application#init
  Ember.debug('-------------------------------');
  Ember.debug('Ember.VERSION : ' + Ember.VERSION);
  Ember.debug('Handlebars.VERSION : ' + Ember.Handlebars.VERSION);
  Ember.debug('jQuery.VERSION : ' + Ember.$().jquery);
  Ember.debug('-------------------------------');
}

I would like to show the version of ember-data as well. How can I do this? I see no VERSION in ember-data.

Upvotes: 0

Views: 284

Answers (1)

intuitivepixel
intuitivepixel

Reputation: 23322

Since ember-data is still considered alpha it has no version information. This might change as soon as the core team begins to publish RC releases. Also till revision 12 there was a need to define the revision of the API you where using in the store like:

App.Store = DS.Store.extend({
  revision: 12,
  ...
});

But the need to define a revision is removed now in revision 13 as you can read here.

The only thing what comes in mind you could do, is to read out the first line in the ember-data js file that looks like this:

// Last commit: 3981a7c (2013-05-28 05:00:14 -0700)

and extract at least the commit hash nor the date.

Hope it helps

Update

finally the version number was included and can be accessed with DS.VERSION example here.

Upvotes: 1

Related Questions