add version information to

* build (as html meta tag)
* stored polls and users

Closes #65
This commit is contained in:
jelhan 2015-06-20 19:04:19 +02:00
parent 90a7e6dbe1
commit d6cf7efa3c
6 changed files with 16 additions and 5 deletions

View file

@ -5,6 +5,10 @@ var pickFiles = require('broccoli-static-compiler');
var trees = [];
var app = new EmberApp({
buildInfoOptions: {
metaTemplate: 'version={VERSION}-{COMMIT}'
},
// do not fingerprint webshim
fingerprint: {
exclude: ['assets/shims']

View file

@ -50,7 +50,8 @@ export default Ember.ObjectController.extend(EmberValidations.Mixin, {
name: user.name,
creationDate: new Date(),
poll: this.get('model'),
selections: user.selections
selections: user.selections,
version: this.buildInfo.version + '-' + this.buildInfo.commit
});
// save new user

View file

@ -39,6 +39,8 @@ export default DS.Model.extend({
encryptedTimezoneOffset : DS.attr('string'),
timezoneOffset : Ember.computed.encrypted('encryptedTimezoneOffset', 'number'),
version : DS.attr('string'),
// computed properties
isFindADate: function() {
return this.get('pollType') === 'FindADate';

View file

@ -13,5 +13,7 @@ export default DS.Model.extend({
selections : Ember.computed.encrypted('encryptedSelections', 'array'),
encryptedCreationDate : DS.attr('string'),
creationDate : Ember.computed.encrypted('encryptedCreationDate', 'date')
creationDate : Ember.computed.encrypted('encryptedCreationDate', 'date'),
version : DS.attr('string')
});

View file

@ -17,7 +17,8 @@ export default Ember.Route.extend({
anonymousUser: false,
datetime: false,
datetimesInputFields: 2,
timezoneOffset: new Date().getTimezoneOffset()
timezoneOffset: new Date().getTimezoneOffset(),
version: this.buildInfo.version + '-' + this.buildInfo.commit
});
}
});

View file

@ -28,6 +28,7 @@
"ember-cli-app-version": "0.3.3",
"ember-cli-babel": "^4.0.0",
"ember-cli-bootstrap-datepicker": "git://github.com/soulim/ember-cli-bootstrap-datepicker.git#5cc3fdf114cece954cbb4af60c5584e362c1cdc3",
"ember-cli-build-info": "^0.1.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "0.0.8",
"ember-cli-htmlbars": "0.7.4",