From 56a7d755e05ff2632148a6556ed75b3c842a7904 Mon Sep 17 00:00:00 2001 From: Jeffrey Horn Date: Tue, 22 Mar 2016 13:38:37 -0400 Subject: [PATCH] Add latest ember-template and talk-template files --- .bowerrc | 4 + .editorconfig | 34 +++++++ .ember-cli | 10 ++ .gitignore | 117 ++++++++++++++++++++++ .jscsrc | 15 +++ .jshintignore | 1 + .jshintrc | 32 ++++++ .remarkrc | 23 +++++ .travis.yml | 23 +++++ .watchmanconfig | 3 + Gruntfile.js | 12 +++ LICENSE | 6 +- app/app.js | 18 ++++ app/application/adapter.js | 4 + app/application/serializer.js | 4 + app/application/template.hbs | 3 + app/components/.gitkeep | 0 app/helpers/.gitkeep | 0 app/index.html | 25 +++++ app/resolver.js | 3 + app/router.js | 11 ++ app/styles/app.scss | 2 + bower.json | 10 ++ config/environment.js | 47 +++++++++ ember-cli-build.js | 17 ++++ grunt/aliases.json | 5 + grunt/jscs.json | 21 ++++ grunt/jshint.json | 8 ++ grunt/jsonlint.json | 5 + grunt/paths.json | 26 +++++ package.json | 52 ++++++++++ public/crossdomain.xml | 15 +++ public/favicon.ico | 0 public/robots.txt | 3 + testem.js | 13 +++ tests/.jshintrc | 52 ++++++++++ tests/helpers/destroy-app.js | 5 + tests/helpers/module-for-acceptance.js | 23 +++++ tests/helpers/resolver.js | 11 ++ tests/helpers/start-app.js | 18 ++++ tests/index.html | 34 +++++++ tests/integration/.gitkeep | 0 tests/test-helper.js | 6 ++ tests/unit/.gitkeep | 0 tests/unit/application/adapter-test.js | 12 +++ tests/unit/application/serializer-test.js | 15 +++ vendor/.gitkeep | 0 47 files changed, 745 insertions(+), 3 deletions(-) create mode 100644 .bowerrc create mode 100644 .editorconfig create mode 100644 .ember-cli create mode 100644 .gitignore create mode 100644 .jscsrc create mode 100644 .jshintignore create mode 100644 .jshintrc create mode 100644 .remarkrc create mode 100644 .travis.yml create mode 100644 .watchmanconfig create mode 100644 Gruntfile.js create mode 100644 app/app.js create mode 100644 app/application/adapter.js create mode 100644 app/application/serializer.js create mode 100644 app/application/template.hbs create mode 100644 app/components/.gitkeep create mode 100644 app/helpers/.gitkeep create mode 100644 app/index.html create mode 100644 app/resolver.js create mode 100644 app/router.js create mode 100644 app/styles/app.scss create mode 100644 bower.json create mode 100644 config/environment.js create mode 100644 ember-cli-build.js create mode 100644 grunt/aliases.json create mode 100644 grunt/jscs.json create mode 100644 grunt/jshint.json create mode 100644 grunt/jsonlint.json create mode 100644 grunt/paths.json create mode 100644 package.json create mode 100644 public/crossdomain.xml create mode 100644 public/favicon.ico create mode 100644 public/robots.txt create mode 100644 testem.js create mode 100644 tests/.jshintrc create mode 100644 tests/helpers/destroy-app.js create mode 100644 tests/helpers/module-for-acceptance.js create mode 100644 tests/helpers/resolver.js create mode 100644 tests/helpers/start-app.js create mode 100644 tests/index.html create mode 100644 tests/integration/.gitkeep create mode 100644 tests/test-helper.js create mode 100644 tests/unit/.gitkeep create mode 100644 tests/unit/application/adapter-test.js create mode 100644 tests/unit/application/serializer-test.js create mode 100644 vendor/.gitkeep diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..959e169 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory": "bower_components", + "analytics": false +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..47c5438 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,34 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.hbs] +insert_final_newline = false +indent_style = space +indent_size = 2 + +[*.css] +indent_style = space +indent_size = 2 + +[*.html] +indent_style = space +indent_size = 2 + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/.ember-cli b/.ember-cli new file mode 100644 index 0000000..927fabe --- /dev/null +++ b/.ember-cli @@ -0,0 +1,10 @@ +{ + /** + 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, + "usePods": true +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..073a289 --- /dev/null +++ b/.gitignore @@ -0,0 +1,117 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp + +# dependencies +/node_modules +/bower_components + +# misc +/.sass-cache +/connect.lock +/coverage/* +/libpeerconnection.log +npm-debug.log +testem.log + +# Created by https://www.gitignore.io/api/node,osx,linux,windows + +### Node ### +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history + + +### OSX ### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..10991fa --- /dev/null +++ b/.jscsrc @@ -0,0 +1,15 @@ +{ + "preset": "airbnb", + "disallowMultipleVarDecl": "exceptUndefined", + "disallowSpaceAfterObjectKeys": { + "allExcept": ["method"] + }, + "requirePaddingNewLinesAfterBlocks": { + "allExcept": ["inCallExpressions", "inArrayExpressions", "inProperties"] + }, + "requireSpacesInAnonymousFunctionExpression": { + "beforeOpeningRoundBrace": true, + "beforeOpeningCurlyBrace": true + }, + "validateIndentation": 2 +} diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..08096ef --- /dev/null +++ b/.jshintrc @@ -0,0 +1,32 @@ +{ + "predef": [ + "document", + "window", + "-Promise" + ], + "browser": true, + "boss": true, + "curly": true, + "debug": false, + "devel": true, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "eqnull": true, + "esnext": true, + "unused": true +} diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 0000000..65b4f4f --- /dev/null +++ b/.remarkrc @@ -0,0 +1,23 @@ +{ + "plugins": { + "lint": { + "blockquote-indentation": "2", + "checkbox-character-style": { + "checked": "x", + "unchecked": " " + }, + "code-block-style": "fenced", + "heading-style": "atx", + "list-item-spacing": false, + "no-html": false, + "no-shortcut-reference-link": true, + "no-undefined-references": true, + "ordered-list-marker-value": "one", + "rule-style": "---", + "unordered-list-marker-style": "-" + } + }, + "settings": { + "commonmark": true + } +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..66dd107 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +--- +language: node_js +node_js: + - "0.12" + +sudo: false + +cache: + directories: + - node_modules + +before_install: + - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH + - "npm config set spin false" + - "npm install -g npm@^2" + +install: + - npm install -g bower + - npm install + - bower install + +script: + - npm test diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000..e7834e3 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..c158c2c --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,12 @@ +'use strict'; + +// http://ericnish.io/blog/how-to-neatly-separate-grunt-files +// http://www.html5rocks.com/en/tutorials/tooling/supercharging-your-gruntfile/ +// discuss how to break up gruntfiles + +module.exports = function(grunt) { + + require('time-grunt')(grunt); + require('load-grunt-config')(grunt); + +}; diff --git a/LICENSE b/LICENSE index 5138ba1..5cb2aff 100644 --- a/LICENSE +++ b/LICENSE @@ -5,7 +5,7 @@ General Assembly, Inc., all rights reserved. The MIT License -Copyright (c) 2015 General Assembly, Inc. http://generalassemb.ly +Copyright (c) 2015--2016 General Assembly, Inc. http://generalassemb.ly Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27,7 +27,7 @@ THE SOFTWARE. -------------------------------------------------------------------------------- -Copyright (c) 2015 General Assembly, Inc. http://generalassemb.ly +Copyright (c) 2015--2016 General Assembly, Inc. http://generalassemb.ly All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including @@ -35,7 +35,7 @@ photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the publisher, -addressed “Attention: Permissions Coordinator,” at the address below. +addressed "Attention: Permissions Coordinator," at the address below. GA New York City 902 Broadway, 4th Floor diff --git a/app/app.js b/app/app.js new file mode 100644 index 0000000..ad66c93 --- /dev/null +++ b/app/app.js @@ -0,0 +1,18 @@ +import Ember from 'ember'; +import Resolver from './resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from './config/environment'; + +let App; + +Ember.MODEL_FACTORY_INJECTIONS = true; + +App = Ember.Application.extend({ + modulePrefix: config.modulePrefix, + podModulePrefix: config.podModulePrefix, + Resolver, +}); + +loadInitializers(App, config.modulePrefix); + +export default App; diff --git a/app/application/adapter.js b/app/application/adapter.js new file mode 100644 index 0000000..45c119a --- /dev/null +++ b/app/application/adapter.js @@ -0,0 +1,4 @@ +import ActiveModelAdapter from 'active-model-adapter'; + +export default ActiveModelAdapter.extend({ +}); diff --git a/app/application/serializer.js b/app/application/serializer.js new file mode 100644 index 0000000..2ace980 --- /dev/null +++ b/app/application/serializer.js @@ -0,0 +1,4 @@ +import { ActiveModelSerializer } from 'active-model-adapter'; + +export default ActiveModelSerializer.extend({ +}); diff --git a/app/application/template.hbs b/app/application/template.hbs new file mode 100644 index 0000000..f649a63 --- /dev/null +++ b/app/application/template.hbs @@ -0,0 +1,3 @@ +

Welcome to Ember!

+ +{{outlet}} diff --git a/app/components/.gitkeep b/app/components/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/helpers/.gitkeep b/app/helpers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/index.html b/app/index.html new file mode 100644 index 0000000..8cdb4ce --- /dev/null +++ b/app/index.html @@ -0,0 +1,25 @@ + + + + + + EmberTemplate + + + + {{content-for 'head'}} + + + + + {{content-for 'head-footer'}} + + + {{content-for 'body'}} + + + + + {{content-for 'body-footer'}} + + diff --git a/app/resolver.js b/app/resolver.js new file mode 100644 index 0000000..2fb563d --- /dev/null +++ b/app/resolver.js @@ -0,0 +1,3 @@ +import Resolver from 'ember-resolver'; + +export default Resolver; diff --git a/app/router.js b/app/router.js new file mode 100644 index 0000000..c295574 --- /dev/null +++ b/app/router.js @@ -0,0 +1,11 @@ +import Ember from 'ember'; +import config from './config/environment'; + +const Router = Ember.Router.extend({ + location: config.locationType, +}); + +Router.map(function () { +}); + +export default Router; diff --git a/app/styles/app.scss b/app/styles/app.scss new file mode 100644 index 0000000..f12e223 --- /dev/null +++ b/app/styles/app.scss @@ -0,0 +1,2 @@ +@import 'bootstrap'; +@import 'bootstrap/theme'; diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..512f39f --- /dev/null +++ b/bower.json @@ -0,0 +1,10 @@ +{ + "name": "ember-template", + "dependencies": { + "ember": "~2.4.1", + "ember-cli-shims": "0.1.0", + "ember-cli-test-loader": "0.2.2", + "ember-qunit-notifications": "0.1.0", + "bootstrap-sass": "^3.3.6" + } +} diff --git a/config/environment.js b/config/environment.js new file mode 100644 index 0000000..ce02b39 --- /dev/null +++ b/config/environment.js @@ -0,0 +1,47 @@ +/* jshint node: true */ + +module.exports = function(environment) { + var ENV = { + modulePrefix: 'ember-template', + environment: environment, + baseURL: '/', + locationType: 'auto', + EmberENV: { + FEATURES: { + // Here you can enable experimental features on an ember canary build + // e.g. 'with-controller': true + } + }, + + APP: { + // Here you can pass flags/options to your application instance + // when it is created + } + }; + + if (environment === 'development') { + // ENV.APP.LOG_RESOLVER = true; + // ENV.APP.LOG_ACTIVE_GENERATION = true; + // ENV.APP.LOG_TRANSITIONS = true; + // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; + // ENV.APP.LOG_VIEW_LOOKUPS = true; + } + + if (environment === 'test') { + // Testem prefers this... + ENV.baseURL = '/'; + ENV.locationType = 'none'; + + // keep test console output quieter + ENV.APP.LOG_ACTIVE_GENERATION = false; + ENV.APP.LOG_VIEW_LOOKUPS = false; + + ENV.APP.rootElement = '#ember-testing'; + } + + if (environment === 'production') { + + } + + return ENV; +}; diff --git a/ember-cli-build.js b/ember-cli-build.js new file mode 100644 index 0000000..248f753 --- /dev/null +++ b/ember-cli-build.js @@ -0,0 +1,17 @@ +/*jshint node:true*/ +/* global require, module */ +var EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function(defaults) { + var app = new EmberApp(defaults, { + sassOptions: { + includePaths: [ + 'bower_components/bootstrap-sass/assets/stylesheets' + ] + } + }); + + app.import('bower_components/bootstrap-sass/assets/javascripts/bootstrap.js'); + + return app.toTree(); +}; diff --git a/grunt/aliases.json b/grunt/aliases.json new file mode 100644 index 0000000..abaa05c --- /dev/null +++ b/grunt/aliases.json @@ -0,0 +1,5 @@ +{ + "default": ["nag"], + "nag": ["jshint", "jsonlint:all", "jscs:status"], + "reformat": ["jscs:write"] +} diff --git a/grunt/jscs.json b/grunt/jscs.json new file mode 100644 index 0000000..a0d56ee --- /dev/null +++ b/grunt/jscs.json @@ -0,0 +1,21 @@ +{ + "options": { + "config": ".jscsrc", + "esnext": true, + "verbose": true + }, + + "status": { + "src": ["<%= paths.scripts.all %>"], + "options": { + "force": true + } + }, + + "write": { + "src": ["<%= paths.scripts.all %>"], + "options": { + "fix": true + } + } +} diff --git a/grunt/jshint.json b/grunt/jshint.json new file mode 100644 index 0000000..a7e19ab --- /dev/null +++ b/grunt/jshint.json @@ -0,0 +1,8 @@ +{ + "all": { + "src": ["<%= paths.scripts.all %>"] + }, + "options": { + "jshintrc": true + } +} diff --git a/grunt/jsonlint.json b/grunt/jsonlint.json new file mode 100644 index 0000000..b46151d --- /dev/null +++ b/grunt/jsonlint.json @@ -0,0 +1,5 @@ +{ + "all": { + "src": ["<%= paths.json.all %>"] + } +} diff --git a/grunt/paths.json b/grunt/paths.json new file mode 100644 index 0000000..e643d62 --- /dev/null +++ b/grunt/paths.json @@ -0,0 +1,26 @@ +{ + "scripts": { + "all": [ + "app/**/*.js", + "tests/**/*.js" + ], + "src": [ + "app/**/*.js" + ] + }, + + "grunt": { + "all": [ + "Gruntfile.js", + "grunt/*.js" + ] + }, + + "json": { + "all": [ + "app/**/*.json", + "tests/**/*.json", + "grunt/*.json" + ] + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..bbf5bde --- /dev/null +++ b/package.json @@ -0,0 +1,52 @@ +{ + "name": "ember-template", + "version": "0.0.0", + "description": "Small description for ember-template goes here", + "private": true, + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "build": "ember build", + "start": "ember server", + "test": "ember test" + }, + "repository": "", + "engines": { + "node": ">= 0.10.0" + }, + "author": "", + "license": "MIT", + "devDependencies": { + "active-model-adapter": "2.1.1", + "broccoli-asset-rev": "^2.2.0", + "ember-ajax": "0.7.1", + "ember-cli": "2.4.2", + "ember-cli-app-version": "^1.0.0", + "ember-cli-autoprefixer": "0.6.0", + "ember-cli-babel": "^5.1.5", + "ember-cli-dependency-checker": "^1.2.0", + "ember-cli-htmlbars": "^1.0.1", + "ember-cli-htmlbars-inline-precompile": "^0.3.1", + "ember-cli-inject-live-reload": "^1.3.1", + "ember-cli-qunit": "^1.2.1", + "ember-cli-release": "0.2.8", + "ember-cli-sass": "5.3.0", + "ember-cli-sri": "^2.1.0", + "ember-cli-uglify": "^1.2.0", + "ember-data": "^2.4.0", + "ember-disable-proxy-controllers": "^1.0.1", + "ember-export-application-global": "^1.0.4", + "ember-load-initializers": "^0.5.0", + "ember-resolver": "^2.0.3", + "grunt": "^0.4.5", + "grunt-concurrent": "^2.1.0", + "grunt-contrib-jshint": "^0.12.0", + "grunt-jscs": "^2.6.0", + "grunt-jsonlint": "^1.0.7", + "load-grunt-config": "^0.19.1", + "loader.js": "^4.0.0", + "time-grunt": "^1.3.0" + } +} diff --git a/public/crossdomain.xml b/public/crossdomain.xml new file mode 100644 index 0000000..0c16a7a --- /dev/null +++ b/public/crossdomain.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..f591645 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/testem.js b/testem.js new file mode 100644 index 0000000..26044b2 --- /dev/null +++ b/testem.js @@ -0,0 +1,13 @@ +/*jshint node:true*/ +module.exports = { + "framework": "qunit", + "test_page": "tests/index.html?hidepassed", + "disable_watching": true, + "launch_in_ci": [ + "PhantomJS" + ], + "launch_in_dev": [ + "PhantomJS", + "Chrome" + ] +}; diff --git a/tests/.jshintrc b/tests/.jshintrc new file mode 100644 index 0000000..6ec0b7c --- /dev/null +++ b/tests/.jshintrc @@ -0,0 +1,52 @@ +{ + "predef": [ + "document", + "window", + "location", + "setTimeout", + "$", + "-Promise", + "define", + "console", + "visit", + "exists", + "fillIn", + "click", + "keyEvent", + "triggerEvent", + "find", + "findWithAssert", + "wait", + "DS", + "andThen", + "currentURL", + "currentPath", + "currentRouteName" + ], + "node": false, + "browser": false, + "boss": true, + "curly": true, + "debug": false, + "devel": false, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "eqnull": true, + "esnext": true, + "unused": true +} diff --git a/tests/helpers/destroy-app.js b/tests/helpers/destroy-app.js new file mode 100644 index 0000000..c3d4d1a --- /dev/null +++ b/tests/helpers/destroy-app.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; + +export default function destroyApp(application) { + Ember.run(application, 'destroy'); +} diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js new file mode 100644 index 0000000..bb7e8af --- /dev/null +++ b/tests/helpers/module-for-acceptance.js @@ -0,0 +1,23 @@ +import { module } from 'qunit'; +import startApp from '../helpers/start-app'; +import destroyApp from '../helpers/destroy-app'; + +export default function(name, options = {}) { + module(name, { + beforeEach () { + this.application = startApp(); + + if (options.beforeEach) { + options.beforeEach.apply(this, arguments); + } + }, + + afterEach () { + if (options.afterEach) { + options.afterEach.apply(this, arguments); + } + + destroyApp(this.application); + }, + }); +} diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js new file mode 100644 index 0000000..319b45f --- /dev/null +++ b/tests/helpers/resolver.js @@ -0,0 +1,11 @@ +import Resolver from '../../resolver'; +import config from '../../config/environment'; + +const resolver = Resolver.create(); + +resolver.namespace = { + modulePrefix: config.modulePrefix, + podModulePrefix: config.podModulePrefix, +}; + +export default resolver; diff --git a/tests/helpers/start-app.js b/tests/helpers/start-app.js new file mode 100644 index 0000000..e098f1d --- /dev/null +++ b/tests/helpers/start-app.js @@ -0,0 +1,18 @@ +import Ember from 'ember'; +import Application from '../../app'; +import config from '../../config/environment'; + +export default function startApp(attrs) { + let application; + + let attributes = Ember.merge({}, config.APP); + attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; + + Ember.run(() => { + application = Application.create(attributes); + application.setupForTesting(); + application.injectTestHelpers(); + }); + + return application; +} diff --git a/tests/index.html b/tests/index.html new file mode 100644 index 0000000..a8d17ca --- /dev/null +++ b/tests/index.html @@ -0,0 +1,34 @@ + + + + + + EmberTemplate Tests + + + + {{content-for "head"}} + {{content-for "test-head"}} + + + + + + {{content-for "head-footer"}} + {{content-for "test-head-footer"}} + + + {{content-for "body"}} + {{content-for "test-body"}} + + + + + + + + + {{content-for "body-footer"}} + {{content-for "test-body-footer"}} + + diff --git a/tests/integration/.gitkeep b/tests/integration/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/test-helper.js b/tests/test-helper.js new file mode 100644 index 0000000..e6cfb70 --- /dev/null +++ b/tests/test-helper.js @@ -0,0 +1,6 @@ +import resolver from './helpers/resolver'; +import { + setResolver +} from 'ember-qunit'; + +setResolver(resolver); diff --git a/tests/unit/.gitkeep b/tests/unit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/application/adapter-test.js b/tests/unit/application/adapter-test.js new file mode 100644 index 0000000..f0a2101 --- /dev/null +++ b/tests/unit/application/adapter-test.js @@ -0,0 +1,12 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('adapter:application', 'Unit | Adapter | application', { + // Specify the other units that are required for this test. + // needs: ['serializer:foo'] +}); + +// Replace this with your real tests. +test('it exists', function(assert) { + let adapter = this.subject(); + assert.ok(adapter); +}); diff --git a/tests/unit/application/serializer-test.js b/tests/unit/application/serializer-test.js new file mode 100644 index 0000000..705e9ec --- /dev/null +++ b/tests/unit/application/serializer-test.js @@ -0,0 +1,15 @@ +import { moduleForModel, test } from 'ember-qunit'; + +moduleForModel('application', 'Unit | Serializer | application', { + // Specify the other units that are required for this test. + needs: ['serializer:application'] +}); + +// Replace this with your real tests. +test('it serializes records', function(assert) { + let record = this.subject(); + + let serializedRecord = record.serialize(); + + assert.ok(serializedRecord); +}); diff --git a/vendor/.gitkeep b/vendor/.gitkeep new file mode 100644 index 0000000..e69de29