/*jshint node:true*/

'use strict';

var path = require('path');
var existsSync = require('exists-sync');
var chalk = require('chalk');
var EOL = require('os').EOL;

module.exports = {
  normalizeEntityName: function() {
    // this prevents an error when the entityName is
    // not specified (since that doesn't actually matter
    // to us
  },

  fileMapTokens: function() {
    return {
      __root__: function(options) {
        if (options.inAddon) {
          return path.join('tests', 'dummy');
        }

        return '/';
      }
    };
  },

  afterInstall: function() {
    this.insertIntoFile('.jshintrc', '    "server",', {
      after: '"predef": [\n'
    });

    this.insertIntoFile('tests/.jshintrc', '    "server",', {
      after: '"predef": [\n'
    });

    if (existsSync('tests/helpers/destroy-app.js')) {
      this.insertIntoFile('tests/helpers/destroy-app.js', '  server.shutdown();', {
        after: "Ember.run(application, 'destroy');\n"
      });
    } else {
      this.ui.writeLine(
        EOL +
        chalk.yellow(
          '******************************************************' + EOL +
          'destroy-app.js helper is not present. Please read this' + EOL +
          'https://gist.github.com/blimmer/35d3efbb64563029505a'   + EOL +
          'to see how to fix the problem.'                         + EOL +
          '******************************************************' + EOL
        )
      );
    }

    return this.addPackagesToProject([
      { name: 'ember-lodash', target: '0.0.5' }
    ]).then(function() {
      return this.addBowerPackagesToProject([
        { name: 'pretender', target: '~0.10.1' },
        { name: 'Faker', target: '~3.0.0' }
      ]);
    }.bind(this));
  }
};

@@ -1453,122 +1453,8 @@
  %7D%0A%0A
-    return this.addPackagesToProject(%5B%0A      %7B name: 'ember-lodash', target: '0.0.5' %7D%0A    %5D).then(function() %7B%0A  
     
@@ -1495,26 +1495,24 @@
 ect(%5B%0A      
-  
 %7B name: 'pre
@@ -1541,18 +1541,16 @@
 0.1' %7D,%0A
-  
       %7B 
@@ -1591,30 +1591,9 @@
     
-  %5D);%0A    %7D.bind(this)
+%5D
 );%0A 

Remove ember-lodash from blueprint