├── .bowerrc ├── .editorconfig ├── .ember-cli ├── .gitignore ├── .jshintrc ├── .npmignore ├── .travis.yml ├── .watchmanconfig ├── LICENSE.md ├── README.md ├── addon └── .gitkeep ├── app └── .gitkeep ├── assets └── lambda-package │ ├── index.js │ └── package.json ├── bower.json ├── config ├── ember-try.js └── environment.js ├── ember-cli-build.js ├── index.js ├── lib └── fastboot-lambda-deploy-plugin.js ├── package.json ├── testem.json ├── tests ├── .jshintrc ├── dummy │ ├── app │ │ ├── app.js │ │ ├── components │ │ │ └── .gitkeep │ │ ├── controllers │ │ │ └── .gitkeep │ │ ├── helpers │ │ │ └── .gitkeep │ │ ├── index.html │ │ ├── models │ │ │ └── .gitkeep │ │ ├── resolver.js │ │ ├── router.js │ │ ├── routes │ │ │ └── .gitkeep │ │ ├── styles │ │ │ └── app.css │ │ └── templates │ │ │ ├── application.hbs │ │ │ └── components │ │ │ └── .gitkeep │ ├── config │ │ └── environment.js │ └── public │ │ ├── crossdomain.xml │ │ └── robots.txt ├── helpers │ ├── destroy-app.js │ ├── module-for-acceptance.js │ ├── resolver.js │ └── start-app.js ├── index.html ├── integration │ └── .gitkeep ├── test-helper.js └── unit │ └── .gitkeep └── vendor └── .gitkeep /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components", 3 | "analytics": false 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.js] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [*.hbs] 21 | insert_final_newline = false 22 | indent_style = space 23 | indent_size = 2 24 | 25 | [*.css] 26 | indent_style = space 27 | indent_size = 2 28 | 29 | [*.html] 30 | indent_style = space 31 | indent_size = 2 32 | 33 | [*.{diff,md}] 34 | trim_trailing_whitespace = false 35 | -------------------------------------------------------------------------------- /.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # misc 12 | /.sass-cache 13 | /connect.lock 14 | /coverage/* 15 | /libpeerconnection.log 16 | npm-debug.log 17 | testem.log 18 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ 3 | "document", 4 | "window", 5 | "-Promise" 6 | ], 7 | "browser": true, 8 | "boss": true, 9 | "curly": true, 10 | "debug": false, 11 | "devel": true, 12 | "eqeqeq": true, 13 | "evil": true, 14 | "forin": false, 15 | "immed": false, 16 | "laxbreak": false, 17 | "newcap": true, 18 | "noarg": true, 19 | "noempty": false, 20 | "nonew": false, 21 | "nomen": false, 22 | "onevar": false, 23 | "plusplus": false, 24 | "regexp": false, 25 | "undef": true, 26 | "sub": true, 27 | "strict": false, 28 | "white": false, 29 | "eqnull": true, 30 | "esnext": true, 31 | "unused": true 32 | } 33 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /bower_components 2 | /config/ember-try.js 3 | /dist 4 | /tests 5 | /tmp 6 | **/.gitkeep 7 | .bowerrc 8 | .editorconfig 9 | .ember-cli 10 | .gitignore 11 | .jshintrc 12 | .watchmanconfig 13 | .travis.yml 14 | bower.json 15 | ember-cli-build.js 16 | testem.json 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "0.12" 5 | 6 | sudo: false 7 | 8 | cache: 9 | directories: 10 | - node_modules 11 | 12 | env: 13 | - EMBER_TRY_SCENARIO=default 14 | - EMBER_TRY_SCENARIO=ember-release 15 | - EMBER_TRY_SCENARIO=ember-beta 16 | - EMBER_TRY_SCENARIO=ember-canary 17 | 18 | matrix: 19 | fast_finish: true 20 | allow_failures: 21 | - env: EMBER_TRY_SCENARIO=ember-canary 22 | 23 | before_install: 24 | - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH 25 | - "npm config set spin false" 26 | - "npm install -g npm@^2" 27 | 28 | install: 29 | - npm install -g bower 30 | - npm install 31 | - bower install 32 | 33 | script: 34 | - ember try $EMBER_TRY_SCENARIO test 35 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ember-cli-deploy-fastboot-lambda 2 | 3 | An ember-cli-deploy plugin for building FastBoot and deploying to AWS Lambda. 4 | 5 | ## Usage 6 | * An AWS Lambda function must first be created. It must use the NodeJS runtime and have a handler of `index.handler`. 7 | * Run `ember deploy` as usual. 8 | * Run `ember deploy:activate` with the appropriate revision. **Only then will the Lambda function be uploaded.** This is to prevent activated browser deploys and Lambda deploys from going out of sync. 9 | 10 | 11 | ## Config 12 | The following config is required. 13 | 14 | ```javascript 15 | ENV['fastboot-lambda'] = { 16 | "lambda-function": '' 17 | } 18 | ``` 19 | 20 | 21 | For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/). 22 | -------------------------------------------------------------------------------- /addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/addon/.gitkeep -------------------------------------------------------------------------------- /app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/app/.gitkeep -------------------------------------------------------------------------------- /assets/lambda-package/index.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var FastBootServer = require('ember-fastboot-server'); 3 | var outputPath = 'fastboot-dist'; 4 | var appName = 'bustle'; 5 | 6 | var server = new FastBootServer({ 7 | distPath: 'fastboot-dist' 8 | }); 9 | 10 | function insertIntoIndexHTML(res) { 11 | return server.insertIntoIndexHTML(res.title, res.body, res.head); 12 | } 13 | 14 | exports.handler = function(event, context) { 15 | server.app.visit(event.path, { request: { get: function() {} }, response: {} }) 16 | .then(insertIntoIndexHTML) 17 | .then(context.succeed) 18 | .catch(function() { 19 | context.fail(new Error('500 AWS Lambda Error')) 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /assets/lambda-package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "ember-fastboot-server": "0.6.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-deploy-fastboot-lambda", 3 | "dependencies": { 4 | "ember": "~2.3.1", 5 | "ember-cli-shims": "0.1.0", 6 | "ember-cli-test-loader": "0.2.2", 7 | "ember-qunit-notifications": "0.1.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /config/ember-try.js: -------------------------------------------------------------------------------- 1 | /*jshint node:true*/ 2 | module.exports = { 3 | scenarios: [ 4 | { 5 | name: 'default', 6 | bower: { 7 | dependencies: { } 8 | } 9 | }, 10 | { 11 | name: 'ember-release', 12 | bower: { 13 | dependencies: { 14 | 'ember': 'components/ember#release' 15 | }, 16 | resolutions: { 17 | 'ember': 'release' 18 | } 19 | } 20 | }, 21 | { 22 | name: 'ember-beta', 23 | bower: { 24 | dependencies: { 25 | 'ember': 'components/ember#beta' 26 | }, 27 | resolutions: { 28 | 'ember': 'beta' 29 | } 30 | } 31 | }, 32 | { 33 | name: 'ember-canary', 34 | bower: { 35 | dependencies: { 36 | 'ember': 'components/ember#canary' 37 | }, 38 | resolutions: { 39 | 'ember': 'canary' 40 | } 41 | } 42 | } 43 | ] 44 | }; 45 | -------------------------------------------------------------------------------- /config/environment.js: -------------------------------------------------------------------------------- 1 | /*jshint node:true*/ 2 | 'use strict'; 3 | 4 | module.exports = function(/* environment, appConfig */) { 5 | return { }; 6 | }; 7 | -------------------------------------------------------------------------------- /ember-cli-build.js: -------------------------------------------------------------------------------- 1 | /*jshint node:true*/ 2 | /* global require, module */ 3 | var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 4 | 5 | module.exports = function(defaults) { 6 | var app = new EmberAddon(defaults, { 7 | // Add options here 8 | }); 9 | 10 | /* 11 | This build file specifies the options for the dummy test app of this 12 | addon, located in `/tests/dummy` 13 | This build file does *not* influence how the addon or the app using it 14 | behave. You most likely want to be modifying `./index.js` or app's build file 15 | */ 16 | 17 | return app.toTree(); 18 | }; 19 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 'use strict'; 3 | 4 | var FastbootLambdaDeployPlugin = require('./lib/fastboot-lambda-deploy-plugin'); 5 | 6 | module.exports = { 7 | name: 'ember-cli-deploy-fastboot-lambda', 8 | 9 | createDeployPlugin: function(options) { 10 | return new FastbootLambdaDeployPlugin({ 11 | name: options.name 12 | }); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /lib/fastboot-lambda-deploy-plugin.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs-promise'); 2 | var glob = require('glob'); 3 | var path = require('path'); 4 | var RSVP = require('rsvp'); 5 | var AWS = require('aws-sdk'); 6 | var Lambda = new AWS.Lambda({ region: 'us-east-1' }); 7 | var UpdateLambdaFunc = RSVP.denodeify(Lambda.updateFunctionCode.bind(Lambda)); 8 | var exec = RSVP.denodeify(require('child_process').exec); 9 | var DeployPlugin = require('ember-cli-deploy-plugin'); 10 | 11 | module.exports = DeployPlugin.extend({ 12 | 13 | requiredConfig: ['lambda-function'], 14 | 15 | didBuild: function(context) { 16 | var packageSkeletonPath = path.join(__dirname, '..', 'assets', 'lambda-package'); 17 | var self = this; 18 | 19 | return fs.copy(packageSkeletonPath, 'tmp/lambda-package') 20 | // npm install ember-fastboot-server dependency 21 | .then(function() { 22 | return exec("npm install --production", { cwd: 'tmp/lambda-package' }) 23 | }) 24 | .then(function() { 25 | // Copy application's deploy-dist build 26 | return fs.copy(context.distDir, 'tmp/lambda-package/fastboot-dist') 27 | }) 28 | .then(function() { 29 | return exec('npm install --production', { cwd: 'tmp/lambda-package/fastboot-dist' }); 30 | }) 31 | .then(function() { 32 | self.log('created tmp/lambda-package', { verbose: true }); 33 | }); 34 | }, 35 | 36 | activate: function(context) { 37 | var self = this; 38 | var lambdaFunction = this.readConfig('lambda-function'); 39 | 40 | this.log('zipping up tmp/lambda-package', { verbose: true }); 41 | return exec("zip -qr lambda-package.zip *", { cwd: 'tmp/lambda-package' }) 42 | .then(function() { 43 | return exec("mv lambda-package.zip ../", { cwd: 'tmp/lambda-package' }) 44 | }) 45 | .then(function() { 46 | return fs.readFile('tmp/lambda-package.zip'); 47 | }) 48 | .then(function(fileBuf) { 49 | return UpdateLambdaFunc({ 50 | FunctionName: lambdaFunction, 51 | ZipFile: fileBuf 52 | }) 53 | }) 54 | .then(function() { 55 | self.log('uploaded tmp/lambda-package.zip to AWS Lambda', { verbose: true }); 56 | }); 57 | } 58 | }); 59 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-deploy-fastboot-lambda", 3 | "version": "0.0.9", 4 | "description": "An ember-cli-deploy plugin for building FastBoot and deploying to AWS Lambda.", 5 | "directories": { 6 | "doc": "doc", 7 | "test": "tests" 8 | }, 9 | "scripts": { 10 | "build": "ember build", 11 | "start": "ember server", 12 | "test": "ember try:testall" 13 | }, 14 | "repository": "https://github.com/bustlelabs/ember-cli-deploy-fastboot-lambda", 15 | "engines": { 16 | "node": ">= 0.10.0" 17 | }, 18 | "author": "Jeff Lang ", 19 | "contributors": [ 20 | "Tom Dale " 21 | ], 22 | "license": "MIT", 23 | "devDependencies": { 24 | "broccoli-asset-rev": "^2.2.0", 25 | "ember-ajax": "0.7.1", 26 | "ember-cli": "2.3.0", 27 | "ember-cli-app-version": "^1.0.0", 28 | "ember-cli-dependency-checker": "^1.2.0", 29 | "ember-cli-htmlbars": "^1.0.1", 30 | "ember-cli-htmlbars-inline-precompile": "^0.3.1", 31 | "ember-cli-inject-live-reload": "^1.3.1", 32 | "ember-cli-qunit": "^1.2.1", 33 | "ember-cli-release": "0.2.8", 34 | "ember-cli-sri": "^2.0.0", 35 | "ember-cli-uglify": "^1.2.0", 36 | "ember-data": "^2.3.0", 37 | "ember-disable-prototype-extensions": "^1.1.0", 38 | "ember-disable-proxy-controllers": "^1.0.1", 39 | "ember-export-application-global": "^1.0.4", 40 | "ember-load-initializers": "^0.5.0", 41 | "ember-resolver": "^2.0.3", 42 | "ember-try": "^0.1.2", 43 | "loader.js": "^4.0.0", 44 | "node-ssh": "2.0.7" 45 | }, 46 | "keywords": [ 47 | "ember-addon", 48 | "ember-cli-deploy-plugin" 49 | ], 50 | "dependencies": { 51 | "aws-sdk": "^2.2.39", 52 | "ember-cli-babel": "^5.1.5", 53 | "ember-cli-deploy-plugin": "^0.2.2", 54 | "fs-promise": "^0.5.0", 55 | "glob": "^7.0.0", 56 | "rsvp": "^3.2.1" 57 | }, 58 | "ember-addon": { 59 | "configPath": "tests/dummy/config", 60 | "after": [ 61 | "ember-cli-deploy-lightning-pack", 62 | "ember-cli-deploy-build" 63 | ] 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /testem.json: -------------------------------------------------------------------------------- 1 | { 2 | "framework": "qunit", 3 | "test_page": "tests/index.html?hidepassed", 4 | "disable_watching": true, 5 | "launch_in_ci": [ 6 | "PhantomJS" 7 | ], 8 | "launch_in_dev": [ 9 | "PhantomJS", 10 | "Chrome" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /tests/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ 3 | "document", 4 | "window", 5 | "location", 6 | "setTimeout", 7 | "$", 8 | "-Promise", 9 | "define", 10 | "console", 11 | "visit", 12 | "exists", 13 | "fillIn", 14 | "click", 15 | "keyEvent", 16 | "triggerEvent", 17 | "find", 18 | "findWithAssert", 19 | "wait", 20 | "DS", 21 | "andThen", 22 | "currentURL", 23 | "currentPath", 24 | "currentRouteName" 25 | ], 26 | "node": false, 27 | "browser": false, 28 | "boss": true, 29 | "curly": true, 30 | "debug": false, 31 | "devel": false, 32 | "eqeqeq": true, 33 | "evil": true, 34 | "forin": false, 35 | "immed": false, 36 | "laxbreak": false, 37 | "newcap": true, 38 | "noarg": true, 39 | "noempty": false, 40 | "nonew": false, 41 | "nomen": false, 42 | "onevar": false, 43 | "plusplus": false, 44 | "regexp": false, 45 | "undef": true, 46 | "sub": true, 47 | "strict": false, 48 | "white": false, 49 | "eqnull": true, 50 | "esnext": true, 51 | "unused": true 52 | } 53 | -------------------------------------------------------------------------------- /tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | let App; 7 | 8 | Ember.MODEL_FACTORY_INJECTIONS = true; 9 | 10 | App = Ember.Application.extend({ 11 | modulePrefix: config.modulePrefix, 12 | podModulePrefix: config.podModulePrefix, 13 | Resolver 14 | }); 15 | 16 | loadInitializers(App, config.modulePrefix); 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | 12 | 13 | 14 | 15 | {{content-for "head-footer"}} 16 | 17 | 18 | {{content-for "body"}} 19 | 20 | 21 | 22 | 23 | {{content-for "body-footer"}} 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import config from './config/environment'; 3 | 4 | const Router = Ember.Router.extend({ 5 | location: config.locationType 6 | }); 7 | 8 | Router.map(function() { 9 | }); 10 | 11 | export default Router; 12 | -------------------------------------------------------------------------------- /tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/styles/app.css -------------------------------------------------------------------------------- /tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 |

Welcome to Ember

2 | 3 | {{outlet}} 4 | -------------------------------------------------------------------------------- /tests/dummy/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/dummy/app/templates/components/.gitkeep -------------------------------------------------------------------------------- /tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 3 | module.exports = function(environment) { 4 | var ENV = { 5 | modulePrefix: 'dummy', 6 | environment: environment, 7 | baseURL: '/', 8 | locationType: 'auto', 9 | EmberENV: { 10 | FEATURES: { 11 | // Here you can enable experimental features on an ember canary build 12 | // e.g. 'with-controller': true 13 | } 14 | }, 15 | 16 | APP: { 17 | // Here you can pass flags/options to your application instance 18 | // when it is created 19 | } 20 | }; 21 | 22 | if (environment === 'development') { 23 | // ENV.APP.LOG_RESOLVER = true; 24 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 25 | // ENV.APP.LOG_TRANSITIONS = true; 26 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 27 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 28 | } 29 | 30 | if (environment === 'test') { 31 | // Testem prefers this... 32 | ENV.baseURL = '/'; 33 | ENV.locationType = 'none'; 34 | 35 | // keep test console output quieter 36 | ENV.APP.LOG_ACTIVE_GENERATION = false; 37 | ENV.APP.LOG_VIEW_LOOKUPS = false; 38 | 39 | ENV.APP.rootElement = '#ember-testing'; 40 | } 41 | 42 | if (environment === 'production') { 43 | 44 | } 45 | 46 | return ENV; 47 | }; 48 | -------------------------------------------------------------------------------- /tests/dummy/public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default function destroyApp(application) { 4 | Ember.run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /tests/helpers/module-for-acceptance.js: -------------------------------------------------------------------------------- 1 | import { module } from 'qunit'; 2 | import startApp from '../helpers/start-app'; 3 | import destroyApp from '../helpers/destroy-app'; 4 | 5 | export default function(name, options = {}) { 6 | module(name, { 7 | beforeEach() { 8 | this.application = startApp(); 9 | 10 | if (options.beforeEach) { 11 | options.beforeEach.apply(this, arguments); 12 | } 13 | }, 14 | 15 | afterEach() { 16 | destroyApp(this.application); 17 | 18 | if (options.afterEach) { 19 | options.afterEach.apply(this, arguments); 20 | } 21 | } 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from '../../resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Application from '../../app'; 3 | import config from '../../config/environment'; 4 | 5 | export default function startApp(attrs) { 6 | let application; 7 | 8 | let attributes = Ember.merge({}, config.APP); 9 | attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; 10 | 11 | Ember.run(() => { 12 | application = Application.create(attributes); 13 | application.setupForTesting(); 14 | application.injectTestHelpers(); 15 | }); 16 | 17 | return application; 18 | } 19 | -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy Tests 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | {{content-for "test-head"}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for "head-footer"}} 18 | {{content-for "test-head-footer"}} 19 | 20 | 21 | {{content-for "body"}} 22 | {{content-for "test-body"}} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {{content-for "body-footer"}} 32 | {{content-for "test-body-footer"}} 33 | 34 | 35 | -------------------------------------------------------------------------------- /tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/integration/.gitkeep -------------------------------------------------------------------------------- /tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import resolver from './helpers/resolver'; 2 | import { 3 | setResolver 4 | } from 'ember-qunit'; 5 | 6 | setResolver(resolver); 7 | -------------------------------------------------------------------------------- /tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/tests/unit/.gitkeep -------------------------------------------------------------------------------- /vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bustle/ember-cli-deploy-fastboot-lambda/0c460b27809ad8afec839a454723862671dbc959/vendor/.gitkeep --------------------------------------------------------------------------------