Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
danielspaniel committed May 5, 2017
1 parent 0f15924 commit 32085b0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions addon/factory-guy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class FactoryGuy {
*
* logLevel: 0 is off, 1 is on
*
* @param opts
* @param logLevel [0/1]
*/
settings({ logLevel = 0 } = {}) {
this.logLevel = logLevel;
Expand Down Expand Up @@ -155,7 +155,7 @@ class FactoryGuy {
```
@param {String|Function} value previously declared sequence name or
@param {String|Function} nameOrFunction value previously declared sequence name or
an inline function to use as the sequence
@returns {Function} wrapper function that is called by the model
definition containing the sequence
Expand Down Expand Up @@ -201,7 +201,7 @@ class FactoryGuy {
@returns {Function} wrapper function that will build the association json
*/
belongsTo(fixtureName, opts) {
return ()=> this.buildRaw(fixtureName, opts);
return () => this.buildRaw(fixtureName, opts);
}

/**
Expand Down Expand Up @@ -233,7 +233,7 @@ class FactoryGuy {
@returns {Function} wrapper function that will build the association json
*/
hasMany(...args) {
return ()=> this.buildRawList.apply(this, args);
return () => this.buildRawList.apply(this, args);
}

/**
Expand Down Expand Up @@ -350,7 +350,7 @@ class FactoryGuy {
let fixture = this.buildRaw.apply(this, arguments);
let data = this.fixtureBuilder(modelName).convertForMake(modelName, fixture);

const model = Ember.run(()=> this.store.push(data));
const model = Ember.run(() => this.store.push(data));

let definition = lookupDefinitionForFixtureName(args.name);
if (definition.hasAfterMake()) {
Expand Down Expand Up @@ -382,7 +382,7 @@ class FactoryGuy {

let data = this.fixtureBuilder(modelName).convertForBuild(modelName, fixture, { transformKeys: false });

const model = Ember.run(()=> this.store.createRecord(modelName, data.get()));
const model = Ember.run(() => this.store.createRecord(modelName, data.get()));
return model;
}

Expand Down Expand Up @@ -431,7 +431,7 @@ class FactoryGuy {
return arr;
}

return args.map((innerArgs)=> {
return args.map((innerArgs) => {
if (Ember.typeOf(innerArgs) !== 'array') {
innerArgs = [innerArgs];
}
Expand Down Expand Up @@ -542,13 +542,13 @@ class FactoryGuy {
@params {Array} except list of models you don't want to mark as cached
*/
cacheOnlyMode({ except=[] }={}) {
cacheOnlyMode({ except = [] } = {}) {
let store = this.store;
let findAdapter = store.adapterFor.bind(store);

store.adapterFor = function(name) {
let adapter = findAdapter(name);
let shouldCache = ()=> {
let shouldCache = () => {
if (Ember.isPresent(except)) {
return (Ember.A(except).includes(name));
}
Expand Down

0 comments on commit 32085b0

Please sign in to comment.