diff --git a/.editorconfig b/.editorconfig index 5d5dea4..47c5438 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,6 +18,7 @@ indent_style = space indent_size = 2 [*.hbs] +insert_final_newline = false indent_style = space indent_size = 2 @@ -29,5 +30,5 @@ indent_size = 2 indent_style = space indent_size = 2 -[*.md] +[*.{diff,md}] trim_trailing_whitespace = false diff --git a/.jshintrc b/.jshintrc index b77cf17..e8bdb46 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,25 +1,15 @@ { "predef": [ - "console", - "it", - "describe", - "beforeEach", - "afterEach", - "before", - "after", + "document", + "window", "-Promise" ], - "proto": true, - "strict": true, - "indent": 2, - "camelcase": true, "node": true, - "browser": false, + "browser": true, "boss": true, "curly": true, - "latedef": "nofunc", "debug": false, - "devel": false, + "devel": true, "eqeqeq": true, "evil": true, "forin": false, @@ -28,17 +18,16 @@ "newcap": true, "noarg": true, "noempty": false, - "quotmark": true, "nonew": false, "nomen": false, "onevar": false, "plusplus": false, "regexp": false, "undef": true, - "unused": true, "sub": true, - "trailing": true, + "strict": false, "white": false, "eqnull": true, - "esnext": true + "esnext": true, + "unused": true } diff --git a/.npmignore b/.npmignore index c771600..5bae6b4 100644 --- a/.npmignore +++ b/.npmignore @@ -1,11 +1,11 @@ -# compiled output -/dist -/tmp +bower_components/ +tests/ +tmp/ +dist/ # dependencies -/node_modules +node_modules/ !tests/fixtures/**/node_modules -/bower_components # misc /.sass-cache @@ -17,22 +17,19 @@ testem.log *.tgz # other ember-cli dirs -/addon -/app -/config -/tests -/vendor - -# other ember-cli files -/Brocfile.js -/testem.json -/bower.json - -# other ember-cli dotfiles -/.bowerrc -/.editorconfig -/.ember-cli -/.jshintrc -/.travis.yml - +addon/ +app/ +config/ +tests/ +vendor/ +.jshintrc +.bowerrc +.editorconfig +.ember-cli +.travis.yml +.npmignore +**/.gitkeep +bower.json +Brocfile.js +testem.json diff --git a/.travis.yml b/.travis.yml index df6253d..5d44f72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ --- language: node_js +node_js: + - "0.12" sudo: false @@ -7,6 +9,14 @@ cache: directories: - node_modules +matrix: + fast_finish: true + +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 diff --git a/Brocfile.js b/Brocfile.js index 8c25bfe..042a64d 100644 --- a/Brocfile.js +++ b/Brocfile.js @@ -1,3 +1,4 @@ +/* jshint node: true */ /* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); diff --git a/LICENSE b/LICENSE index d7d3ec1..55bb909 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Emre Unal +Copyright (c) 2015 Emre Unal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bower.json b/bower.json index d8b4d86..df0e5fc 100644 --- a/bower.json +++ b/bower.json @@ -1,17 +1,16 @@ { "name": "ember-cli-dependency-checker", "dependencies": { - "handlebars": "~1.3.0", + "ember": "1.11.3", + "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3", + "ember-cli-test-loader": "ember-cli-test-loader#0.1.3", + "ember-data": "1.0.0-beta.16.1", + "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4", + "ember-qunit": "0.3.1", + "ember-qunit-notifications": "0.0.7", + "ember-resolver": "~0.1.15", "jquery": "^1.11.1", - "ember": "1.7.0", - "ember-data": "1.0.0-beta.10", - "ember-resolver": "~0.1.7", - "loader.js": "stefanpenner/loader.js#1.0.1", - "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3", - "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4", - "ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2", - "ember-qunit": "0.1.8", - "ember-qunit-notifications": "0.0.4", - "qunit": "~1.15.0" + "loader.js": "ember-cli/loader.js#3.2.0", + "qunit": "~1.17.1" } } \ No newline at end of file diff --git a/package.json b/package.json index 0cdca4e..3a9ccb1 100644 --- a/package.json +++ b/package.json @@ -26,19 +26,21 @@ "license": "MIT", "readmeFile": "README.md", "devDependencies": { - "body-parser": "^1.2.0", - "broccoli-asset-rev": "0.3.1", - "broccoli-ember-hbs-template-compiler": "^1.6.1", + "broccoli-asset-rev": "^2.0.2", "chai": "^1.9.2", - "ember-cli": "git://github.com/stefanpenner/ember-cli#master", - "ember-cli-content-security-policy": "0.3.0", + "ember-cli": "0.2.3", + "ember-cli-app-version": "0.3.3", + "ember-cli-content-security-policy": "0.4.0", + "ember-cli-dependency-checker": "0.0.8", + "ember-cli-htmlbars": "0.7.4", "ember-cli-ic-ajax": "0.1.1", "ember-cli-inject-live-reload": "^1.3.0", - "ember-cli-qunit": "0.1.0", - "ember-data": "1.0.0-beta.10", - "ember-export-application-global": "^1.0.0", - "express": "^4.8.5", - "glob": "^4.0.5", + "ember-cli-qunit": "0.3.10", + "ember-cli-uglify": "1.0.1", + "ember-data": "1.0.0-beta.16.1", + "ember-export-application-global": "^1.0.2", + "ember-disable-prototype-extensions": "^1.0.0", + "glob": "^5.0.5", "mocha": "^2.0.1", "mocha-jshint": "0.0.9" }, @@ -52,12 +54,10 @@ "dependency", "check" ], - "ember-addon": { - "configPath": "tests/dummy/config" - }, "dependencies": { "chalk": "^0.5.1", "is-git-url": "^0.2.0", - "semver": "^4.1.0" + "semver": "^4.1.0", + "ember-cli-babel": "^5.0.0" } } diff --git a/testem.json b/testem.json index eff93f9..0f35392 100644 --- a/testem.json +++ b/testem.json @@ -1,6 +1,7 @@ { "framework": "qunit", - "test_page": "tests/index.html", + "test_page": "tests/index.html?hidepassed", + "disable_watching": true, "launch_in_ci": [ "PhantomJS" ], diff --git a/tests/.jshintrc b/tests/.jshintrc new file mode 100644 index 0000000..0f96fcc --- /dev/null +++ b/tests/.jshintrc @@ -0,0 +1,57 @@ +{ + "predef": [ + "document", + "window", + "location", + "setTimeout", + "$", + "-Promise", + "define", + "console", + "visit", + "exists", + "fillIn", + "click", + "keyEvent", + "triggerEvent", + "find", + "findWithAssert", + "wait", + "DS", + "andThen", + "currentURL", + "currentPath", + "currentRouteName", + "it", + "describe", + "beforeEach", + "afterEach", + "before", + "after" + ], + "node": true, + "browser": false, + "boss": true, + "curly": false, + "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 +} diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js new file mode 100644 index 0000000..28f4ece --- /dev/null +++ b/tests/helpers/resolver.js @@ -0,0 +1,11 @@ +import Resolver from 'ember/resolver'; +import config from '../../config/environment'; + +var 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..16cc7c3 --- /dev/null +++ b/tests/helpers/start-app.js @@ -0,0 +1,19 @@ +import Ember from 'ember'; +import Application from '../../app'; +import Router from '../../router'; +import config from '../../config/environment'; + +export default function startApp(attrs) { + var application; + + var attributes = Ember.merge({}, config.APP); + attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; + + Ember.run(function() { + 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..8fea6fe --- /dev/null +++ b/tests/index.html @@ -0,0 +1,33 @@ + + + + + + Dummy 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/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);