-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgraded to ember-cli 0.1.1, added unit tests for store
- Loading branch information
Matthew Marcum
committed
Oct 8, 2014
1 parent
e8fa979
commit c72b56c
Showing
37 changed files
with
327 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
/** | ||
Ember CLI sends analytics information by default. The data is completely | ||
anonymous, but there are times when you might want to disable this behavior. | ||
|
||
Setting `disableAnalytics` to true will prevent any data from being sent. | ||
*/ | ||
"disableAnalytics": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ export default function ( container, application ) { | |
|
||
application.inject('adapter', 'store', 'store:main'); | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
{ | ||
"name": "dummy", | ||
"name": "sl-model", | ||
"dependencies": { | ||
"handlebars": "~1.3.0", | ||
"jquery": "^1.11.1", | ||
"ember": "1.7.0", | ||
"ember-resolver": "~0.1.7", | ||
"loader": "stefanpenner/loader.js#1.0.1", | ||
"loader.js": "stefanpenner/loader.js#1.0.1", | ||
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3", | ||
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4", | ||
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2", | ||
"ember-qunit": "0.1.8", | ||
"ember-qunit-notifications": "0.0.4", | ||
"qunit": "~1.15.0" | ||
"qunit": "~1.15.0", | ||
"pretender": "0.1.0" | ||
}, | ||
"devDependencies": { | ||
"sinonjs": "~1.10.2", | ||
"sinon-qunit": "~2.0.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = function(/* environment, appConfig */) { | ||
return { }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "sl-model", | ||
"version": "0.0.0", | ||
"version": "0.1.7", | ||
"directories": { | ||
"doc": "doc", | ||
"test": "test" | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"start": "ember server", | ||
|
@@ -14,27 +14,30 @@ | |
"engines": { | ||
"node": ">= 0.10.0" | ||
}, | ||
"keywords": [ | ||
"ember-addon" | ||
], | ||
"ember-addon": { | ||
"configPath": "tests/dummy/config" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"body-parser": "^1.2.0", | ||
"broccoli-asset-rev": "0.0.17", | ||
"broccoli-asset-rev": "0.3.0", | ||
"broccoli-ember-hbs-template-compiler": "^1.6.1", | ||
"broccoli-static-compiler": "^0.2.0", | ||
"connect-restreamer": "^1.0.0", | ||
"ember-cli": "0.0.44", | ||
"ember-cli-ember-data": "0.1.0", | ||
"ember-cli": "0.1.1", | ||
"ember-cli-content-security-policy": "0.2.0", | ||
"ember-cli-ic-ajax": "0.1.1", | ||
"ember-cli-qunit": "0.0.5", | ||
"ember-cli-inject-live-reload": "^1.2.2", | ||
"ember-cli-pretender": "^0.3.1", | ||
"ember-cli-qunit": "0.1.0", | ||
"express": "^4.8.5", | ||
"glob": "^4.0.5" | ||
}, | ||
"keywords": [ | ||
"ember-addon" | ||
], | ||
"ember-addon": { | ||
"configPath": "tests/dummy/config" | ||
}, | ||
"dependencies": { | ||
"sl-modelize": "git+ssh://[email protected]:interface/sl-modelize.git#addon" | ||
"sl-modelize": "git+ssh://[email protected]:interface/sl-modelize.git#v0.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = function(app) { | ||
var express = require('express'); | ||
var barApiRouter = express.Router(); | ||
barApiRouter.get('/', function(req, res) { | ||
res.send({"bar":[ | ||
{ | ||
id: 1, | ||
name: 'cheers' | ||
} | ||
]}); | ||
}); | ||
app.use('/api/bar', barApiRouter); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = function(app) { | ||
var express = require('express'); | ||
var carApiRouter = express.Router(); | ||
carApiRouter.get('/', function(req, res) { | ||
res.send({"car":[ | ||
{ | ||
id: 1, | ||
name: 'ford' | ||
}, | ||
{ | ||
id: 2, | ||
name: 'chevy' | ||
}, | ||
{ | ||
id: 3, | ||
name: 'lambo' | ||
} | ||
]}); | ||
}); | ||
app.use('/api/car', carApiRouter); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = function(app) { | ||
var express = require('express'); | ||
var fooApiRouter = express.Router(); | ||
fooApiRouter.get('/', function(req, res) { | ||
res.send({"foo":[ | ||
{ | ||
id: 1, | ||
name: 'fighters', | ||
bar: { | ||
id: 2, | ||
name: 'cheers2' | ||
} | ||
} | ||
]}); | ||
}); | ||
app.use('/api/foo', fooApiRouter); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import Ember from 'ember'; | ||
import Resolver from 'ember/resolver'; | ||
import loadInitializers from 'ember/load-initializers'; | ||
import config from './config/environment'; | ||
|
||
Ember.MODEL_FACTORY_INJECTIONS = true; | ||
|
||
var App = Ember.Application.extend({ | ||
modulePrefix: 'dummy', // TODO: loaded via config | ||
modulePrefix: config.modulePrefix, | ||
podModulePrefix: config.podModulePrefix, | ||
Resolver: Resolver | ||
}); | ||
|
||
loadInitializers(App, 'dummy'); | ||
loadInitializers(App, config.modulePrefix); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import SlModel from 'sl-model/model'; | ||
|
||
var Bar = SlModel.extend({ | ||
}); | ||
|
||
Bar.reopenClass({ | ||
adapter: 'localstorage', | ||
url: '/api/bar', | ||
serializer: function( result ){ | ||
return result.bar; | ||
} | ||
}); | ||
|
||
export default Bar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import SlModel from 'sl-model/model'; | ||
|
||
var Car = SlModel.extend({ | ||
}); | ||
|
||
Car.reopenClass({ | ||
url: '/api/car', | ||
serializer: function( result ){ | ||
return result.car; | ||
} | ||
}); | ||
|
||
export default Car; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import SlModel from 'sl-model/model'; | ||
|
||
var Foo = SlModel.extend({ | ||
}); | ||
|
||
Foo.reopenClass({ | ||
url: '/api/foo', | ||
serializer: function( result ){ | ||
return result.foo; | ||
} | ||
}); | ||
|
||
export default Foo; |
Oops, something went wrong.