From 8794391140a4fb1910fb68c5d1e43b417265935b Mon Sep 17 00:00:00 2001 From: Luc-Olivier Boulet Date: Thu, 3 Sep 2015 10:38:07 -0400 Subject: [PATCH 1/5] Fix typo in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f9eadd0..4e3fd8d 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,8 @@ export default Ember.Route.extend({ ``` ```hbs -{{#bread-crumbs outputStyle='bootstrap" linkable=true as |component cow|}} - {{bread-crumb route=cow breadCrumbs=component}} +{{#bread-crumbs outputStyle="bootstrap" linkable=true as |component cow|}} + {{#bread-crumb route=cow breadCrumbs=component}} {{#if cow.title}} {{cow.title}} {{else}} From 8e08e4e9f38f36bd09e6a2a7f4e0d23eae85fec6 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 28 Sep 2015 17:23:46 -0400 Subject: [PATCH 2/5] Update license --- LICENSE.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 00e9fbb..2e2b867 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,9 +1,21 @@ The MIT License (MIT) -Copyright (c) 2015 +Copyright (c) 2015 Lauren Elizabeth Tan -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: +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: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -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. +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. From 4dae8805953064fcdfe1d98333112e979d7ffd99 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Tue, 27 Oct 2015 10:10:10 -0700 Subject: [PATCH 3/5] Backward and forward compatibility updates - Include ember-new-computed - Fix initializer deprecation warning on Ember 2.x - Update ember-try scenarios --- README.md | 3 +++ addon/components/bread-crumb.js | 16 ++++++++++------ addon/components/bread-crumbs.js | 18 +++++++++++------- addon/initializers/crumbly.js | 3 ++- app/acceptance-tests/integration.js | 1 - config/ember-try.js | 20 ++++++++++++++++++++ package.json | 3 ++- 7 files changed, 48 insertions(+), 16 deletions(-) delete mode 100644 app/acceptance-tests/integration.js diff --git a/README.md b/README.md index 4e3fd8d..063f378 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ This addon provides a very declarative way to generate dynamic breadcrumbs. $ ember install ember-crumbly ``` +## Compatibility +This addon is tested against the `release`, `beta` and `canary` channels, `~1.11.x`, and `1.12.x`. + ## Usage ### Basic usage diff --git a/addon/components/bread-crumb.js b/addon/components/bread-crumb.js index 763807e..2a6aad4 100644 --- a/addon/components/bread-crumb.js +++ b/addon/components/bread-crumb.js @@ -1,17 +1,21 @@ import Ember from 'ember'; import layout from '../templates/components/bread-crumb'; +import computed from 'ember-new-computed'; const { - Component, - computed + Component } = Ember; +const { + oneWay, + bool +} = computed; export default Component.extend({ layout, tagName: 'li', - classNameBindings: [ 'crumbClass' ], + classNameBindings: ['crumbClass'], - crumbClass: computed.oneWay('breadCrumbs.crumbClass'), - linkClass: computed.oneWay('breadCrumbs.linkClass'), - hasBlock: computed.bool('template').readOnly() + crumbClass: oneWay('breadCrumbs.crumbClass'), + linkClass: oneWay('breadCrumbs.linkClass'), + hasBlock: bool('template').readOnly() }); diff --git a/addon/components/bread-crumbs.js b/addon/components/bread-crumbs.js index 8da86a9..fda2959 100644 --- a/addon/components/bread-crumbs.js +++ b/addon/components/bread-crumbs.js @@ -1,10 +1,10 @@ import Ember from 'ember'; import layout from '../templates/components/bread-crumbs'; +import computed from 'ember-new-computed'; const { get, Component, - computed, getWithDefault, assert, typeOf, @@ -12,16 +12,20 @@ const { A: emberArray, String: { classify } } = Ember; +const { + bool, + readOnly +} = computed; export default Component.extend({ layout, tagName: 'ol', linkable: true, reverse: false, - classNameBindings: [ 'breadCrumbClass' ], - hasBlock: computed.bool('template').readOnly(), - currentUrl: computed.readOnly('applicationRoute.router.url'), - currentRouteName: computed.readOnly('applicationRoute.controller.currentRouteName'), + classNameBindings: ['breadCrumbClass'], + hasBlock: bool('template').readOnly(), + currentUrl: readOnly('applicationRoute.router.url'), + currentRouteName: readOnly('applicationRoute.controller.currentRouteName'), routeHierarchy: computed('currentUrl', 'currentRouteName', 'reverse', { get() { @@ -60,9 +64,9 @@ export default Component.extend({ if (routes.length === 1) { return `${name}.index`; - } else { - return routes.join('.'); } + + return routes.join('.'); }, _filterIndexRoutes(routeNames) { diff --git a/addon/initializers/crumbly.js b/addon/initializers/crumbly.js index 328bf81..3dbbf38 100644 --- a/addon/initializers/crumbly.js +++ b/addon/initializers/crumbly.js @@ -1,4 +1,5 @@ -export function initialize(container, application) { +export function initialize() { + const application = arguments[1] || arguments[0]; application.inject('component:bread-crumbs', 'applicationRoute', 'route:application'); } diff --git a/app/acceptance-tests/integration.js b/app/acceptance-tests/integration.js deleted file mode 100644 index f9da8ad..0000000 --- a/app/acceptance-tests/integration.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from 'ember-crumbly/acceptance-tests/integration'; \ No newline at end of file diff --git a/config/ember-try.js b/config/ember-try.js index 83dab0f..f99e13f 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -1,9 +1,29 @@ +/* jshint node: true */ + module.exports = { scenarios: [ { name: 'default', dependencies: { } }, + { + name: 'ember-1.11', + dependencies: { + 'ember': '~1.11.0' + }, + resolutions: { + 'ember': '~1.11.0' + } + }, + { + name: 'ember-1.12.1', + dependencies: { + 'ember': '1.12.1' + }, + resolutions: { + 'ember': '1.12.1' + } + }, { name: 'ember-release', dependencies: { diff --git a/package.json b/package.json index 64451d0..5195cae 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,10 @@ "ember-cli-release": "0.2.3", "ember-cli-sri": "^1.0.3", "ember-cli-uglify": "^1.2.0", + "ember-disable-prototype-extensions": "^1.0.0", "ember-disable-proxy-controllers": "^1.0.0", "ember-export-application-global": "^1.0.3", - "ember-disable-prototype-extensions": "^1.0.0", + "ember-new-computed": "^1.0.3", "ember-suave": "1.0.0", "ember-try": "0.0.6" }, From 5b95cd6990d40b7cd40076dfb1f3d196cc8ed94f Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Tue, 27 Oct 2015 10:25:41 -0700 Subject: [PATCH 4/5] Remove chrome from testem --- testem.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testem.json b/testem.json index 0f35392..5de2d54 100644 --- a/testem.json +++ b/testem.json @@ -6,7 +6,6 @@ "PhantomJS" ], "launch_in_dev": [ - "PhantomJS", - "Chrome" + "PhantomJS" ] } From b189c24b5d20c0a31b7037210ba3601983ac5d93 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Tue, 27 Oct 2015 10:26:33 -0700 Subject: [PATCH 5/5] Version bump to 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5195cae..85643f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-crumbly", - "version": "0.2.2", + "version": "1.0.0", "description": "Declarative breadcrumb navigation for Ember apps", "directories": { "doc": "doc",