diff --git a/wherehows-web/.bowerrc b/wherehows-web/.bowerrc new file mode 100644 index 0000000000..959e1696e7 --- /dev/null +++ b/wherehows-web/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory": "bower_components", + "analytics": false +} diff --git a/wherehows-web/.editorconfig b/wherehows-web/.editorconfig new file mode 100644 index 0000000000..219985c228 --- /dev/null +++ b/wherehows-web/.editorconfig @@ -0,0 +1,20 @@ +# 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 + +[*.hbs] +insert_final_newline = false + +[*.{diff,md}] +trim_trailing_whitespace = false diff --git a/wherehows-web/.ember-cli b/wherehows-web/.ember-cli new file mode 100644 index 0000000000..ee64cfed2a --- /dev/null +++ b/wherehows-web/.ember-cli @@ -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 +} diff --git a/wherehows-web/.jshintrc b/wherehows-web/.jshintrc new file mode 100644 index 0000000000..d421faa302 --- /dev/null +++ b/wherehows-web/.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, + "esversion": 6, + "unused": true +} diff --git a/wherehows-web/.travis.yml b/wherehows-web/.travis.yml new file mode 100644 index 0000000000..d98801699b --- /dev/null +++ b/wherehows-web/.travis.yml @@ -0,0 +1,25 @@ +--- +language: node_js +node_js: + - "4" + +sudo: false + +cache: + directories: + - $HOME/.npm + - $HOME/.cache # includes bowers cache + +before_install: + - npm config set spin false + - npm install -g bower + - bower --version + - npm install phantomjs-prebuilt + - node_modules/phantomjs-prebuilt/bin/phantomjs --version + +install: + - npm install + - bower install + +script: + - npm test diff --git a/wherehows-web/.watchmanconfig b/wherehows-web/.watchmanconfig new file mode 100644 index 0000000000..e7834e3e4f --- /dev/null +++ b/wherehows-web/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["tmp", "dist"] +} diff --git a/wherehows-web/README.md b/wherehows-web/README.md new file mode 100644 index 0000000000..787b7ad5c3 --- /dev/null +++ b/wherehows-web/README.md @@ -0,0 +1,52 @@ +# wherehows-web + +This README outlines the details of collaborating on this Ember application. +A short introduction of this app could easily go here. + +## Prerequisites + +You will need the following things properly installed on your computer. + +* [Git](https://git-scm.com/) +* [Node.js](https://nodejs.org/) (with NPM) +* [Bower](https://bower.io/) +* [Ember CLI](https://ember-cli.com/) +* [PhantomJS](http://phantomjs.org/) + +## Installation + +* `git clone ` this repository +* `cd wherehows-web` +* `npm install` +* `bower install` + +## Running / Development + +* `ember serve` +* Visit your app at [http://localhost:4200](http://localhost:4200). + +### Code Generators + +Make use of the many generators for code, try `ember help generate` for more details + +### Running Tests + +* `ember test` +* `ember test --server` + +### Building + +* `ember build` (development) +* `ember build --environment production` (production) + +### Deploying + +Specify what it takes to deploy your app. + +## Further Reading / Useful Links + +* [ember.js](http://emberjs.com/) +* [ember-cli](https://ember-cli.com/) +* Development Browser Extensions + * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) + * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) diff --git a/wherehows-web/app/app.js b/wherehows-web/app/app.js new file mode 100644 index 0000000000..831ad6106d --- /dev/null +++ b/wherehows-web/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/wherehows-web/app/components/.gitkeep b/wherehows-web/app/components/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/app/controllers/.gitkeep b/wherehows-web/app/controllers/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/app/helpers/.gitkeep b/wherehows-web/app/helpers/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/app/index.html b/wherehows-web/app/index.html new file mode 100644 index 0000000000..e1e9bc9bba --- /dev/null +++ b/wherehows-web/app/index.html @@ -0,0 +1,25 @@ + + + + + + WherehowsWeb + + + + {{content-for "head"}} + + + + + {{content-for "head-footer"}} + + + {{content-for "body"}} + + + + + {{content-for "body-footer"}} + + diff --git a/wherehows-web/app/models/.gitkeep b/wherehows-web/app/models/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/app/resolver.js b/wherehows-web/app/resolver.js new file mode 100644 index 0000000000..2fb563d6c0 --- /dev/null +++ b/wherehows-web/app/resolver.js @@ -0,0 +1,3 @@ +import Resolver from 'ember-resolver'; + +export default Resolver; diff --git a/wherehows-web/app/router.js b/wherehows-web/app/router.js new file mode 100644 index 0000000000..cdc257875f --- /dev/null +++ b/wherehows-web/app/router.js @@ -0,0 +1,12 @@ +import Ember from 'ember'; +import config from './config/environment'; + +const Router = Ember.Router.extend({ + location: config.locationType, + rootURL: config.rootURL +}); + +Router.map(function() { +}); + +export default Router; diff --git a/wherehows-web/app/routes/.gitkeep b/wherehows-web/app/routes/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/app/styles/app.css b/wherehows-web/app/styles/app.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/app/templates/components/.gitkeep b/wherehows-web/app/templates/components/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/bower.json b/wherehows-web/bower.json new file mode 100644 index 0000000000..7895556d94 --- /dev/null +++ b/wherehows-web/bower.json @@ -0,0 +1,7 @@ +{ + "name": "wherehows-web", + "dependencies": { + "ember": "~2.10.0", + "ember-cli-shims": "0.1.3" + } +} diff --git a/wherehows-web/config/environment.js b/wherehows-web/config/environment.js new file mode 100644 index 0000000000..5f7907a734 --- /dev/null +++ b/wherehows-web/config/environment.js @@ -0,0 +1,50 @@ +/* jshint node: true */ + +module.exports = function(environment) { + var ENV = { + modulePrefix: 'wherehows-web', + environment: environment, + rootURL: '/', + locationType: 'auto', + EmberENV: { + FEATURES: { + // Here you can enable experimental features on an ember canary build + // e.g. 'with-controller': true + }, + EXTEND_PROTOTYPES: { + // Prevent Ember Data from overriding Date.parse. + Date: false + } + }, + + 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.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/wherehows-web/ember-cli-build.js b/wherehows-web/ember-cli-build.js new file mode 100644 index 0000000000..2537ce2cae --- /dev/null +++ b/wherehows-web/ember-cli-build.js @@ -0,0 +1,24 @@ +/*jshint node:true*/ +/* global require, module */ +var EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +module.exports = function(defaults) { + var app = new EmberApp(defaults, { + // Add options here + }); + + // Use `app.import` to add additional libraries to the generated + // output files. + // + // If you need to use different assets in different + // environments, specify an object as the first parameter. That + // object's keys should be the environment name and the values + // should be the asset to use in that environment. + // + // If the library that you are including contains AMD or ES6 + // modules that you would like to import into your application + // please specify an object with the list of modules as keys + // along with the exports of each module as its value. + + return app.toTree(); +}; diff --git a/wherehows-web/package.json b/wherehows-web/package.json new file mode 100644 index 0000000000..9c442ae749 --- /dev/null +++ b/wherehows-web/package.json @@ -0,0 +1,43 @@ +{ + "name": "wherehows-web", + "version": "0.0.0", + "description": "Small description for wherehows-web goes here", + "license": "MIT", + "author": "", + "directories": { + "doc": "doc", + "test": "tests" + }, + "repository": "", + "scripts": { + "build": "ember build", + "start": "ember server", + "test": "ember test" + }, + "devDependencies": { + "broccoli-asset-rev": "^2.4.5", + "ember-ajax": "^2.4.1", + "ember-cli": "2.10.0", + "ember-cli-app-version": "^2.0.0", + "ember-cli-babel": "^5.1.7", + "ember-cli-dependency-checker": "^1.3.0", + "ember-cli-htmlbars": "^1.0.10", + "ember-cli-htmlbars-inline-precompile": "^0.3.3", + "ember-cli-inject-live-reload": "^1.4.1", + "ember-cli-jshint": "^2.0.1", + "ember-cli-qunit": "^3.0.1", + "ember-cli-release": "^0.2.9", + "ember-cli-sri": "^2.1.0", + "ember-cli-test-loader": "^1.1.0", + "ember-cli-uglify": "^1.2.0", + "ember-data": "^2.10.0", + "ember-export-application-global": "^1.0.5", + "ember-load-initializers": "^0.5.1", + "ember-resolver": "^2.0.3", + "loader.js": "^4.0.10" + }, + "engines": { + "node": ">= 0.12.0" + }, + "private": true +} diff --git a/wherehows-web/public/crossdomain.xml b/wherehows-web/public/crossdomain.xml new file mode 100644 index 0000000000..0c16a7a07b --- /dev/null +++ b/wherehows-web/public/crossdomain.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/wherehows-web/public/robots.txt b/wherehows-web/public/robots.txt new file mode 100644 index 0000000000..f5916452e5 --- /dev/null +++ b/wherehows-web/public/robots.txt @@ -0,0 +1,3 @@ +# http://www.robotstxt.org +User-agent: * +Disallow: diff --git a/wherehows-web/testem.js b/wherehows-web/testem.js new file mode 100644 index 0000000000..26044b2f85 --- /dev/null +++ b/wherehows-web/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/wherehows-web/tests/.jshintrc b/wherehows-web/tests/.jshintrc new file mode 100644 index 0000000000..d2bd11343b --- /dev/null +++ b/wherehows-web/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, + "esversion": 6, + "unused": true +} diff --git a/wherehows-web/tests/helpers/destroy-app.js b/wherehows-web/tests/helpers/destroy-app.js new file mode 100644 index 0000000000..c3d4d1abb5 --- /dev/null +++ b/wherehows-web/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/wherehows-web/tests/helpers/module-for-acceptance.js b/wherehows-web/tests/helpers/module-for-acceptance.js new file mode 100644 index 0000000000..76996fd042 --- /dev/null +++ b/wherehows-web/tests/helpers/module-for-acceptance.js @@ -0,0 +1,23 @@ +import { module } from 'qunit'; +import Ember from 'ember'; +import startApp from '../helpers/start-app'; +import destroyApp from '../helpers/destroy-app'; + +const { RSVP: { Promise } } = Ember; + +export default function(name, options = {}) { + module(name, { + beforeEach() { + this.application = startApp(); + + if (options.beforeEach) { + return options.beforeEach.apply(this, arguments); + } + }, + + afterEach() { + let afterEach = options.afterEach && options.afterEach.apply(this, arguments); + return Promise.resolve(afterEach).then(() => destroyApp(this.application)); + } + }); +} diff --git a/wherehows-web/tests/helpers/resolver.js b/wherehows-web/tests/helpers/resolver.js new file mode 100644 index 0000000000..b208d38d09 --- /dev/null +++ b/wherehows-web/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/wherehows-web/tests/helpers/start-app.js b/wherehows-web/tests/helpers/start-app.js new file mode 100644 index 0000000000..54c33c16cb --- /dev/null +++ b/wherehows-web/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; + + // use defaults, but you can override + let attributes = Ember.assign({}, config.APP, attrs); + + Ember.run(() => { + application = Application.create(attributes); + application.setupForTesting(); + application.injectTestHelpers(); + }); + + return application; +} diff --git a/wherehows-web/tests/index.html b/wherehows-web/tests/index.html new file mode 100644 index 0000000000..11eeb81842 --- /dev/null +++ b/wherehows-web/tests/index.html @@ -0,0 +1,33 @@ + + + + + + WherehowsWeb 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/wherehows-web/tests/integration/.gitkeep b/wherehows-web/tests/integration/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/tests/test-helper.js b/wherehows-web/tests/test-helper.js new file mode 100644 index 0000000000..e6cfb70fe8 --- /dev/null +++ b/wherehows-web/tests/test-helper.js @@ -0,0 +1,6 @@ +import resolver from './helpers/resolver'; +import { + setResolver +} from 'ember-qunit'; + +setResolver(resolver); diff --git a/wherehows-web/tests/unit/.gitkeep b/wherehows-web/tests/unit/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/wherehows-web/vendor/.gitkeep b/wherehows-web/vendor/.gitkeep new file mode 100644 index 0000000000..e69de29bb2