Reorganizes the entire app to follow Google's best practice recommendations for Angular App Structure.

see: https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub

The files are now grouped by view / component.
Tests are located beside tested js files. The Grunt build will be responsible for only distributing actual files without the tests.
Each partial is at the same level as the js files related to it.
Ideally css files should be at the same level, maybe I'll refactor this later.

Moves all non-bower plugins to app/vendor.
Moves all images to app/images and styles to app/styles.
Merges the test and non-test jshintrc files.

Adds all the Jamstash contributors to the package.json file while I was refactoring.

Conflicts:
	app/app.js
	app/images/vgrabber.gif
	app/images/vgrabber2-active.gif
	app/images/vgrabber2-normal.gif
	app/index.html
This commit is contained in:
Hyzual 2014-11-07 00:06:07 +01:00
parent b190d2f99f
commit a1d48bbd30
135 changed files with 78 additions and 103 deletions

View file

@ -0,0 +1,27 @@
describe("model service", function() {
'use strict';
var model;
beforeEach(function() {
module('jamstash.model');
inject(function (_model_) {
model = _model_;
});
});
it("given a name and artist, when calling Index() then the model name and artist are changed", function() {
model.Index("CoolAlbum", "HipArtist");
expect(model.name).toBe("CoolAlbum");
expect(model.artist).toBe("HipArtist");
});
it("given all the arguments, when calling Song() then the composite attributes are computed", function() {
model.Song(21, 43, 3, "Know Your Enemy", "Yoko Kanno", "27", "Ghost in the Shell - Stand Alone Complex OST 3",
"51", "cover.jpg", "big-cover.jpg", "385", "5", true, "mp3", "specs", "url", "0", "Awesome track");
expect(model.selected).toBe(false);
expect(model.playing).toBe(false);
expect(model.time).toBe("06:25");
expect(model.displayName).toBe("Know Your Enemy - Ghost in the Shell - Stand Alone Complex OST 3 - Yoko Kanno");
});
});