language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | emberjs | ember.js | a7bee11b5e358548d20bf842589e8515fea96b71.json | Send custom events in Ember.runLoadHooks. | packages/ember-runtime/lib/system/lazy_load.js | @@ -1,3 +1,5 @@
+/*globals CustomEvent */
+
var forEach = Ember.ArrayPolyfills.forEach;
/**
@@ -49,6 +51,11 @@ Ember.onLoad = function(name, callback) {
Ember.runLoadHooks = function(name, object) {
loaded[name] = object;
+ if (typeof window === 'object' && typeof window.dispatchEvent === 'function' && typeof CustomEvent === "function") {
+ var event = new CustomEvent(name, {detail: object, name: name});
+ window.dispatchEvent(event);
+ }
+
if (loadHooks[name]) {
forEach.call(loadHooks[name], function(callback) {
callback(object); | true |
Other | emberjs | ember.js | a7bee11b5e358548d20bf842589e8515fea96b71.json | Send custom events in Ember.runLoadHooks. | packages/ember-runtime/tests/system/lazy_load_test.js | @@ -1,3 +1,5 @@
+/* globals CustomEvent */
+
module("Lazy Loading");
test("if a load hook is registered, it is executed when runLoadHooks are exected", function() {
@@ -49,3 +51,18 @@ test("hooks in ENV.EMBER_LOAD_HOOKS['hookName'] get executed", function() {
equal(window.ENV.__test_hook_count__, 1, "the object was passed into the load hook");
});
+
+if (typeof window === 'object' && typeof window.dispatchEvent === 'function' && typeof CustomEvent === "function") {
+ test("load hooks trigger a custom event", function() {
+ var eventObject = "super duper awesome events";
+
+ window.addEventListener('__test_hook_for_events__', function(e) {
+ ok(true, 'custom event was fired');
+ equal(e.detail, eventObject, 'event details are provided properly');
+ });
+
+ Ember.run(function() {
+ Ember.runLoadHooks("__test_hook_for_events__", eventObject);
+ });
+ });
+} | true |
Other | emberjs | ember.js | 3bcd9bdca42b1398322a9f14588248ff7b870a2b.json | Update CHANGELOG for 1.5.0-beta.2. | CHANGELOG.md | @@ -1,5 +1,13 @@
# Ember Changelog
+
+### Ember 1.5.0-beta.2 (February 23, 2014)
+
+* [SECURITY] Ensure that `ember-routing-auto-location` cannot be forced to redirect to another domain.
+* [BUGFIX beta] Handle ES6 transpiler errors.
+* [BUGFIX beta] Ensure namespaces are cleaned up.
+* Many documentation updates.
+
### Ember 1.5.0-beta.1 (February 14, 2014)
* [FEATURE ember-handlebars-log-primitives] | false |
Other | emberjs | ember.js | 4a250b3b7062e531955bcad3d017f998e60fe75f.json | Remove old reference to RootResponder | packages/ember-handlebars/tests/handlebars_test.js | @@ -876,12 +876,12 @@ test("Child views created using the view helper should have their IDs registered
var childView = firstChild(view);
var id = childView.$()[0].id;
- equal(Ember.View.views[id], childView, 'childView without passed ID is registered with Ember.View.views so that it can properly receive events from RootResponder');
+ equal(Ember.View.views[id], childView, 'childView without passed ID is registered with Ember.View.views so that it can properly receive events from EventDispatcher');
childView = nthChild(view, 1);
id = childView.$()[0].id;
equal(id, 'templateViewTest', 'precond -- id of childView should be set correctly');
- equal(Ember.View.views[id], childView, 'childView with passed ID is registered with Ember.View.views so that it can properly receive events from RootResponder');
+ equal(Ember.View.views[id], childView, 'childView with passed ID is registered with Ember.View.views so that it can properly receive events from EventDispatcher');
});
test("Child views created using the view helper and that have a viewName should be registered as properties on their parentView", function() { | false |
Other | emberjs | ember.js | 52be8919216abc125d59df0a96c3f51695d1253e.json | Update CHANGELOG for 1.4.0 and 1.5.0-beta.1. | CHANGELOG.md | @@ -1,43 +1,42 @@
# Ember Changelog
+### Ember 1.5.0-beta.1 (February 14, 2014)
+
+* [FEATURE ember-handlebars-log-primitives]
+* [FEATURE ember-testing-routing-helpers]
+* [FEATURE ember-testing-triggerEvent-helper]
+* [FEATURE computed-read-only]
+* [FEATURE ember-metal-is-blank]
+* [FEATURE ember-eager-url-update]
+* [FEATURE ember-routing-auto-location]
+* [FEATURE ember-routing-bound-action-name]
+* [FEATURE ember-routing-inherits-parent-model]
* [BREAKING CHANGE] `Ember.run.throttle` now supports leading edge execution. To follow industry standard leading edge is the default.
* [BUGFIX] Fixed how parentController property of an itemController when nested. Breaking for apps that rely on previous broken behavior of an itemController's `parentController` property skipping its ArrayController when nested.
-### Ember 1.4.0-beta.5 (February 3, 2014)
+### Ember 1.4.0 (February 13, 2014)
+* [SECURITY] Ensure link-to non-block escapes title.
* Deprecate quoteless action names.
-* [BUGFIX beta] Make Ember.RenderBuffer#addClass work as expected.
-* [DOC beta] Display Ember Inspector hint in Firefox.
-* [Bugfix BETA] App.destroy resets routes before destroying the container.
-
-### Ember 1.4.0-beta.4 (January 29, 2014)
-
-* [BUGFIX beta] reduceComputed fires observers when invalidating with undefined.
-* [BUGFIX beta] Provide helpful error even if Model isn't found.
-* [BUGFIX beta] Do not deprecate the block form of {{render}}.
-* [BUGFIX beta] allow enumerable/any to match undefined as value
-* [BUGFIX release] Allow canceling of Timers in IE8.
+* [BUGFIX] Make Ember.RenderBuffer#addClass work as expected.
+* [DOC] Display Ember Inspector hint in Firefox.
+* [BUGFIX] App.destroy resets routes before destroying the container.
+* [BUGFIX] reduceComputed fires observers when invalidating with undefined.
+* [BUGFIX] Provide helpful error even if Model isn't found.
+* [BUGFIX] Do not deprecate the block form of {{render}}.
+* [BUGFIX] allow enumerable/any to match undefined as value
+* [BUGFIX] Allow canceling of Timers in IE8.
* [BUGFIX] Calling toString at extend time causes Ember.View to memoize and return the same value for different instances.
-* [BUGFIX release] Fix ember-testing-lazy-routing.
+* [BUGFIX] Fix ember-testing-lazy-routing.
* [BUGFIX] Fixed how parentController property of an itemController when nested. Breaking for apps that rely on previous broken behavior of an itemController's `parentController` property skipping its ArrayController when nested.
-* Slight, sensible alteration to URL parsing logic: prefer fewer stars to more stars; if any stars, prefer more dynamics and statics to fewer; if no stars, prefer fewer dynamics and more statics
-
-### Ember 1.4.0-beta.3 (January 20, 2014)
-
* Document the send method on Ember.ActionHandler.
* Document Ember.Route #controllerName and #viewName properties.
* Allow jQuery version 1.11 and 2.1.
-
-### Ember 1.4.0-beta.2 (January 14, 2014)
-
* [BUGFIX] Fix stripping trailing slashes for * routes.
* [SECURITY] Ensure primitive value contexts are escaped.
* [SECURITY] Ensure {{group}} helper escapes properly.
* Performance improvements.
* [BUGFIX] Templete-less components properties should not collide with internal properties.
-
-### Ember 1.4.0-beta.1 (January 6, 2014)
-
* Unbound helper supports bound helper static strings.
* Preserve `<base>` URL when using history location for routing.
* Begin adding names for anonymous functions to aid in debugging. | false |
Other | emberjs | ember.js | 723495850ba64236f9259d8b3cd3d5e61afbe0cd.json | Fix minor typo: use `packageName` instead of hardcoding it | bin/transpile-packages.js | @@ -95,6 +95,6 @@ ES6Package.prototype = {
['container'].forEach(function(packageName) {
- pkg = new ES6Package('container');
+ pkg = new ES6Package(packageName);
pkg.process();
}); | false |
Other | emberjs | ember.js | a542ca8a699419247f3c7106278aa53673fccf49.json | prevent ComputedProperty shape from changing | packages/ember-metal/lib/computed.js | @@ -207,6 +207,7 @@ ComputedProperty.prototype = new Ember.Descriptor();
var ComputedPropertyPrototype = ComputedProperty.prototype;
ComputedPropertyPrototype._dependentKeys = undefined;
ComputedPropertyPrototype._suspended = undefined;
+ComputedPropertyPrototype._meta = undefined;
if (Ember.FEATURES.isEnabled('composable-computed-properties')) {
ComputedPropertyPrototype._dependentCPs = undefined; | false |
Other | emberjs | ember.js | 690dfdf06f621619540cee333dd3557dfbbc8ac9.json | remove un-needed toString | packages/ember-routing/lib/helpers/action.js | @@ -61,7 +61,7 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
};
ActionHelper.registerAction = function(actionNameOrPath, options, allowedKeys) {
- var actionId = (++Ember.uuid).toString();
+ var actionId = ++Ember.uuid;
ActionHelper.registeredActions[actionId] = {
eventName: options.eventName, | false |
Other | emberjs | ember.js | b6c0341a863a820daac534b4a0c1dbc44e741a10.json | Add 1.4.0-beta.5 to CHANGELOG.md. | CHANGELOG.md | @@ -3,6 +3,13 @@
* [BREAKING CHANGE] `Ember.run.throttle` now supports leading edge execution. To follow industry standard leading edge is the default.
* [BUGFIX] Fixed how parentController property of an itemController when nested. Breaking for apps that rely on previous broken behavior of an itemController's `parentController` property skipping its ArrayController when nested.
+### Ember 1.4.0-beta.5 (February 3, 2014)
+
+* Deprecate quoteless action names.
+* [BUGFIX beta] Make Ember.RenderBuffer#addClass work as expected.
+* [DOC beta] Display Ember Inspector hint in Firefox.
+* [Bugfix BETA] App.destroy resets routes before destroying the container.
+
### Ember 1.4.0-beta.4 (January 29, 2014)
* [BUGFIX beta] reduceComputed fires observers when invalidating with undefined. | false |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | .jshintrc | @@ -31,6 +31,7 @@
"expectDeprecation",
"expectNoDeprecation",
"ignoreAssertion",
+ "ignoreDeprecation",
// A safe subset of "browser:true":
"window", "location", "document", "XMLSerializer", | true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | Gemfile.lock | @@ -1,6 +1,6 @@
GIT
remote: https://github.com/emberjs/ember-dev.git
- revision: 257349f0f123528f558757de1222828540353c24
+ revision: afead0cde6fad34b2313f4d4299c040eef5198ed
branch: master
specs:
ember-dev (0.1)
@@ -33,7 +33,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- aws-sdk (1.32.0)
+ aws-sdk (1.33.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1) | true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | ember-dev.yml | @@ -12,6 +12,8 @@ testing_suites:
- "package=all&extendprototypes=true&nojshint=true&enableoptionalfeatures=true"
built:
- "package=all&skipPackage=container&dist=build&nojshint=true" # container isn't publicly available in the built version
+ - "skipPackage=container,ember-testing&dist=min&prod=true" # container isn't public, and ember-testing is stripped from prod/min
+ - "skipPackage=container,ember-testing&dist=prod&prod=true" # container isn't public, and ember-testing is stripped from prod/min
runtime:
- "package=ember-metal,ember-runtime"
views:
@@ -34,6 +36,8 @@ testing_suites:
- "package=all&extendprototypes=true&jquery=git&nojshint=true"
- "package=all&extendprototypes=true&jquery=git2&nojshint=true"
- "package=all&skipPackage=container&dist=build&nojshint=true" # container isn't publicly available in the built version
+ - "skipPackage=container,ember-testing&dist=min&prod=true" # container isn't public, and ember-testing is stripped from prod/min
+ - "skipPackage=container,ember-testing&dist=prod&prod=true" # container isn't public, and ember-testing is stripped from prod/min
testing_packages:
- container
- ember-metal | true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | packages/ember-application/tests/system/application_test.js | @@ -1,3 +1,5 @@
+/*globals EmberDev */
+
var view;
var app;
var application;
@@ -89,7 +91,9 @@ test("acts like a namespace", function() {
module("Ember.Application initialization", {
teardown: function() {
- Ember.run(app, 'destroy');
+ if (app) {
+ Ember.run(app, 'destroy');
+ }
Ember.TEMPLATES = {};
}
});
@@ -192,6 +196,11 @@ test("Minimal Application initialized with just an application template", functi
});
test('enable log of libraries with an ENV var', function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Logging does not occur in production builds');
+ return;
+ }
+
var debug = Ember.debug;
var messages = [];
| true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | packages/ember-application/tests/system/logging_test.js | @@ -1,3 +1,5 @@
+/*globals EmberDev */
+
var App, logs, originalLogger;
module("Ember.Application – logging of generated classes", {
@@ -66,6 +68,11 @@ function visit(path) {
}
test("log class generation if logging enabled", function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Logging does not occur in production builds');
+ return;
+ }
+
Ember.run(App, 'advanceReadiness');
visit('/posts').then(function() {
@@ -86,6 +93,11 @@ test("do NOT log class generation if logging disabled", function() {
});
test("actively generated classes get logged", function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Logging does not occur in production builds');
+ return;
+ }
+
Ember.run(App, 'advanceReadiness');
visit('/posts').then(function() {
@@ -155,6 +167,11 @@ module("Ember.Application – logging of view lookups", {
});
test("log when template and view are missing when flag is active", function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Logging does not occur in production builds');
+ return;
+ }
+
App.register('template:application', function() { return ''; });
Ember.run(App, 'advanceReadiness');
@@ -178,6 +195,11 @@ test("do not log when template and view are missing when flag is not true", func
});
test("log which view is used with a template", function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Logging does not occur in production builds');
+ return;
+ }
+
App.register('template:application', function() { return 'Template with default view'; });
App.register('template:foo', function() { return 'Template with custom view'; });
App.register('view:posts', Ember.View.extend({templateName: 'foo'})); | true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | packages/ember-handlebars/tests/helpers/view_test.js | @@ -1,3 +1,5 @@
+/*globals EmberDev */
+
var view, originalLookup;
var container = {
@@ -17,7 +19,10 @@ module("Handlebars {{#view}} helper", {
teardown: function() {
Ember.lookup = originalLookup;
- Ember.run(view, 'destroy');
+
+ if (view) {
+ Ember.run(view, 'destroy');
+ }
}
});
@@ -100,6 +105,10 @@ test("id bindings downgrade to one-time property lookup", function() {
});
test("mixing old and new styles of property binding fires a warning, treats value as if it were quoted", function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Logging does not occur in production builds');
+ return;
+ }
expect(2);
| true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | packages/ember-runtime/tests/system/object/create_test.js | @@ -19,29 +19,32 @@ test("calls computed property setters", function() {
equal(o.get('foo'), 'bar');
});
-test("sets up mandatory setters for watched simple properties", function() {
- var MyClass = Ember.Object.extend({
- foo: null,
- bar: null,
- fooDidChange: Ember.observer('foo', function() {})
- });
+if (Ember.ENV.MANDATORY_SETTER) {
+ test("sets up mandatory setters for watched simple properties", function() {
- var o = MyClass.create({foo: 'bar', bar: 'baz'});
- equal(o.get('foo'), 'bar');
+ var MyClass = Ember.Object.extend({
+ foo: null,
+ bar: null,
+ fooDidChange: Ember.observer('foo', function() {})
+ });
- // Catch IE8 where Object.getOwnPropertyDescriptor exists but only works on DOM elements
- try {
- Object.getOwnPropertyDescriptor({}, 'foo');
- } catch(e) {
- return;
- }
+ var o = MyClass.create({foo: 'bar', bar: 'baz'});
+ equal(o.get('foo'), 'bar');
- var descriptor = Object.getOwnPropertyDescriptor(o, 'foo');
- ok(descriptor.set, 'Mandatory setter was setup');
+ // Catch IE8 where Object.getOwnPropertyDescriptor exists but only works on DOM elements
+ try {
+ Object.getOwnPropertyDescriptor({}, 'foo');
+ } catch(e) {
+ return;
+ }
- descriptor = Object.getOwnPropertyDescriptor(o, 'bar');
- ok(!descriptor.set, 'Mandatory setter was not setup');
-});
+ var descriptor = Object.getOwnPropertyDescriptor(o, 'foo');
+ ok(descriptor.set, 'Mandatory setter was setup');
+
+ descriptor = Object.getOwnPropertyDescriptor(o, 'bar');
+ ok(!descriptor.set, 'Mandatory setter was not setup');
+ });
+}
test("allows bindings to be defined", function() {
var obj = Ember.Object.create({ | true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | packages/ember/tests/states_removal_test.js | @@ -1,6 +1,13 @@
+/*globals EmberDev */
+
module("ember-states removal");
test("errors occur when attempting to use Ember.StateManager or Ember.State", function() {
+ if (EmberDev && EmberDev.runningProdBuild){
+ ok(true, 'Ember.State & Ember.StateManager are not added to production builds');
+ return;
+ }
+
raises(function() {
Ember.StateManager.extend();
}, /has been moved into a plugin/);
@@ -16,4 +23,4 @@ test("errors occur when attempting to use Ember.StateManager or Ember.State", fu
raises(function() {
Ember.State.create();
}, /has been moved into a plugin/);
-});
\ No newline at end of file
+}); | true |
Other | emberjs | ember.js | 3dbf2e46d97d71d39cdbda20e19096e7f214fcc4.json | Add automated testing for prod/min builds. | tests/ember_configuration.js | @@ -31,7 +31,8 @@
spade: 'ember-spade.js',
build: 'ember.js',
prod: 'ember.prod.js',
- runtime: 'ember-runtime.js'
+ runtime: 'ember-runtime.js',
+ min: 'ember.min.js'
};
| true |
Other | emberjs | ember.js | d45ad5a3dd5cce1b6bdcf9cca863f95bbed17c4e.json | Remove controlID inclusion from mustache | packages/ember-handlebars-compiler/lib/main.js | @@ -215,8 +215,6 @@ Ember.Handlebars.JavaScriptCompiler.prototype.ambiguousBlockValue = function() {
stringifyBlockHelperMissing(this.source);
};
-var prefix = "ember" + (+new Date()), incr = 1;
-
/**
Rewrite simple mustaches from `{{foo}}` to `{{bind "foo"}}`. This means that
all simple mustaches in Ember's Handlebars will also set up an observer to
@@ -228,12 +226,7 @@ var prefix = "ember" + (+new Date()), incr = 1;
@param mustache
*/
Ember.Handlebars.Compiler.prototype.mustache = function(mustache) {
- if (mustache.isHelper && mustache.id.string === 'control') {
- mustache.hash = mustache.hash || new Handlebars.AST.HashNode([]);
- mustache.hash.pairs.push(["controlID", new Handlebars.AST.StringNode(prefix + incr++)]);
- } else if (mustache.params.length || mustache.hash) {
- // no changes required
- } else {
+ if (!(mustache.params.length || mustache.hash)) {
var id = new Handlebars.AST.IdNode([{ part: '_triageMustache' }]);
// Update the mustache node to include a hash value indicating whether the original node | false |
Other | emberjs | ember.js | fdfe8495f738c460b0f1595bc8a37a67e568ff0f.json | Define HTML5 fields on input fields.
Previously, binding to this many attributes unnecessarily added a
significant performance penalty. Now these bindings are setup lazily for
values that were not previously defined on the instance. | packages/ember-handlebars/lib/controls/text_area.js | @@ -30,7 +30,7 @@ Ember.TextArea = Ember.Component.extend(Ember.TextSupport, {
classNames: ['ember-text-area'],
tagName: "textarea",
- attributeBindings: ['rows', 'cols', 'name'],
+ attributeBindings: ['rows', 'cols', 'name', 'selectionEnd', 'selectionStart', 'wrap'],
rows: null,
cols: null,
| true |
Other | emberjs | ember.js | fdfe8495f738c460b0f1595bc8a37a67e568ff0f.json | Define HTML5 fields on input fields.
Previously, binding to this many attributes unnecessarily added a
significant performance penalty. Now these bindings are setup lazily for
values that were not previously defined on the instance. | packages/ember-handlebars/lib/controls/text_field.js | @@ -31,7 +31,11 @@ Ember.TextField = Ember.Component.extend(Ember.TextSupport, {
classNames: ['ember-text-field'],
tagName: "input",
- attributeBindings: ['type', 'value', 'size', 'pattern', 'name', 'min', 'max'],
+ attributeBindings: ['type', 'value', 'size', 'pattern', 'name', 'min', 'max',
+ 'accept', 'autocomplete', 'autosave', 'formaction',
+ 'formenctype', 'formmethod', 'formnovalidate', 'formtarget',
+ 'height', 'inputmode', 'list', 'multiple', 'pattern', 'step',
+ 'width'],
/**
The `value` attribute of the input element. As the user inputs text, this | true |
Other | emberjs | ember.js | fdfe8495f738c460b0f1595bc8a37a67e568ff0f.json | Define HTML5 fields on input fields.
Previously, binding to this many attributes unnecessarily added a
significant performance penalty. Now these bindings are setup lazily for
values that were not previously defined on the instance. | packages/ember-handlebars/lib/controls/text_support.js | @@ -20,7 +20,8 @@ var get = Ember.get, set = Ember.set;
Ember.TextSupport = Ember.Mixin.create(Ember.TargetActionSupport, {
value: "",
- attributeBindings: ['placeholder', 'disabled', 'maxlength', 'tabindex', 'readonly'],
+ attributeBindings: ['placeholder', 'disabled', 'maxlength', 'tabindex', 'readonly',
+ 'autofocus', 'form', 'selectionDirection', 'spellcheck', 'required'],
placeholder: null,
disabled: false,
maxlength: null, | true |
Other | emberjs | ember.js | 46b309c94013e7b04f007652627bdb9bd0841cd7.json | Add templateName documentation for Ember.Route
Fixes #4234 | packages/ember-routing/lib/system/route.js | @@ -70,6 +70,28 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
*/
viewName: null,
+ /**
+ The name of the template to use by default when rendering this routes
+ template.
+
+ This is similar with `viewName`, but is useful when you just want a custom
+ template without a view.
+
+ ```js
+ var PostsList = Ember.Route.extend({
+ templateName: 'posts/list'
+ });
+
+ App.PostsIndexRoute = PostsList.extend();
+ App.PostsArchivedRoute = PostsList.extend();
+ ```
+
+ @property templateName
+ @type String
+ @default null
+ */
+ templateName: null,
+
/**
The name of the controller to associate with this route.
| false |
Other | emberjs | ember.js | e238f68b4f09d06b7b832c6361fba563d74f2c3c.json | upgrade QUnit -> 1.13.0 | Gemfile.lock | @@ -1,6 +1,6 @@
GIT
remote: https://github.com/emberjs/ember-dev.git
- revision: d99ab73e754317fde34b82139edd8c433a845aad
+ revision: 605e4c54fc6695d9061bc597d5abc9cf8d1de259
branch: master
specs:
ember-dev (0.1) | false |
Other | emberjs | ember.js | 4bed6d0e6bdae99574b2af1efb1b86b05f18ec95.json | Simplify code for action helper
Functionality remains exactly the same. | packages/ember-routing/lib/helpers/action.js | @@ -275,36 +275,30 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
contexts = a_slice.call(arguments, 1, -1);
var hash = options.hash,
- controller;
+ controller = options.data.keywords.controller;
// create a hash to pass along to registerAction
var action = {
- eventName: hash.on || "click"
+ eventName: hash.on || "click",
+ parameters: {
+ context: this,
+ options: options,
+ params: contexts
+ },
+ view: options.data.view,
+ bubbles: hash.bubbles,
+ preventDefault: hash.preventDefault,
+ target: { options: options }
};
- action.parameters = {
- context: this,
- options: options,
- params: contexts
- };
-
- action.view = options.data.view;
-
- var root, target;
-
if (hash.target) {
- root = this;
- target = hash.target;
- } else if (controller = options.data.keywords.controller) {
- root = controller;
+ action.target.root = this;
+ action.target.target = hash.target;
+ } else if (controller) {
+ action.target.root = controller;
}
- action.target = { root: root, target: target, options: options };
- action.bubbles = hash.bubbles;
- action.preventDefault = hash.preventDefault;
-
var actionId = ActionHelper.registerAction(actionName, action, hash.allowedKeys);
return new SafeString('data-ember-action="' + actionId + '"');
});
-
}); | false |
Other | emberjs | ember.js | d1e07d57ad1bd42d28eeb37b2499b15f4f6eb737.json | Add Array.prototype.filter polyfill.
This is currently required (and only used by) the
composable-computed-properties feature. If that feature is enabled it
will not work in non-ES5 browsers (specifically it is not available in
IE8 and lower). | packages/ember-metal/lib/array.js | @@ -70,6 +70,23 @@ var arrayIndexOf = isNativeFunc(Array.prototype.indexOf) ? Array.prototype.index
return -1;
};
+var arrayFilter = isNativeFunc(Array.prototype.filter) ? Array.prototype.filter : function (fn, context) {
+ var i,
+ value,
+ result = [],
+ length = this.length;
+
+ for (i = 0; i < length; i++) {
+ if (this.hasOwnProperty(i)) {
+ value = this[i];
+ if (fn.call(context, value, i, this)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+};
+
/**
Array polyfills to support ES5 features in older browsers.
@@ -79,6 +96,7 @@ var arrayIndexOf = isNativeFunc(Array.prototype.indexOf) ? Array.prototype.index
Ember.ArrayPolyfills = {
map: arrayMap,
forEach: arrayForEach,
+ filter: arrayFilter,
indexOf: arrayIndexOf
};
@@ -91,6 +109,10 @@ if (Ember.SHIM_ES5) {
Array.prototype.forEach = arrayForEach;
}
+ if (!Array.prototype.filter) {
+ Array.prototype.filter = arrayFilter;
+ }
+
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = arrayIndexOf;
} | false |
Other | emberjs | ember.js | 91e4ad0b5b4dc2e78898d36aef5381c951d74a10.json | Use an apostrophe to indicate ownership. | packages/ember-views/lib/views/component.js | @@ -43,7 +43,7 @@ var get = Ember.get, set = Ember.set, isNone = Ember.isNone,
```handlebars
{{#app-profile person=currentUser}}
<p>Admin mode</p>
- {{! Executed in the controllers context. }}
+ {{! Executed in the controller's context. }}
{{/app-profile}}
```
| false |
Other | emberjs | ember.js | a29ee8b87dab1b13024ce5fc8d48d6ced1344f31.json | Update CHANGELOG.md for 1.4.0-beta.3. | CHANGELOG.md | @@ -1,5 +1,11 @@
# Ember Changelog
+### Ember 1.4.0-beta.3 (January 20, 2014)
+
+* Document the send method on Ember.ActionHandler.
+* Document Ember.Route #controllerName and #viewName properties.
+* Allow jQuery version 1.11 and 2.1.
+
### Ember 1.4.0-beta.2 (January 14, 2014)
* [BUGFIX] Fix stripping trailing slashes for * routes. | false |
Other | emberjs | ember.js | b7faf658b4fe136d522ddf2138bf09be6021fe72.json | Fix a couple of document typos in enumerable | packages/ember-runtime/lib/mixins/enumerable.js | @@ -47,13 +47,13 @@ function iter(key, value) {
To make your own custom class enumerable, you need two items:
1. You must have a length property. This property should change whenever
- the number of items in your enumerable object changes. If you using this
+ the number of items in your enumerable object changes. If you use this
with an `Ember.Object` subclass, you should be sure to change the length
property using `set().`
2. You must implement `nextObject().` See documentation.
- Once you have these two methods implement, apply the `Ember.Enumerable` mixin
+ Once you have these two methods implemented, apply the `Ember.Enumerable` mixin
to your class and you will be able to enumerate the contents of your object
like any other collection.
| false |
Other | emberjs | ember.js | a816a017861473d6f19223a2d311f7fe25cc12d8.json | Fix slight documentation typo | packages/ember-routing/lib/system/route.js | @@ -47,7 +47,7 @@ Ember.Route = Ember.Object.extend(Ember.ActionHandler, {
/**
The name of the view to use by default when rendering this routes template.
- When a rendering a template, the route will, by default, determine the
+ When rendering a template, the route will, by default, determine the
template and view to use from the name of the route itself. If you need to
define a specific view, set this property.
| false |
Other | emberjs | ember.js | 6c09effa13fe9aaf0fdc9e7b092a054761cec9a6.json | Allow jQuery version 1.11 and 2.1
Both RC1's of jQuery 1.11 and 2.1 have just been released.
(I screwed up last PR) | packages/ember-views/lib/core.js | @@ -8,7 +8,7 @@ if (!jQuery && typeof require === 'function') {
jQuery = require('jquery');
}
-Ember.assert("Ember Views require jQuery 1.7, 1.8, 1.9, 1.10, or 2.0", jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10))|2.0)(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
+Ember.assert("Ember Views require jQuery between 1.7 and 2.1", jQuery && (jQuery().jquery.match(/^((1\.(7|8|9|10|11))|(2\.(0|1)))(\.\d+)?(pre|rc\d?)?/) || Ember.ENV.FORCE_JQUERY));
/**
Alias for jQuery | false |
Other | emberjs | ember.js | a46539776feb938c03407be89ace1b3742fd0379.json | Enable features given a 'go' status.
New features as of 2014/01/17:
* `ember-testing-routing-helpers`
* `ember-testing-triggerEvent-helper`
* `computed-read-only`
* `ember-metal-is-blank`
* `ember-eager-url-update`
Also, removed `composable-computed-properties` as it was accidentally
commited in another unrelated PR. | features.json | @@ -9,13 +9,13 @@
"ember-routing-named-substates": null,
"ember-handlebars-caps-lookup": null,
"ember-testing-simple-setup": null,
- "ember-testing-routing-helpers": null,
- "ember-testing-triggerEvent-helper": null,
- "computed-read-only": null,
- "composable-computed-properties": true,
+ "ember-testing-routing-helpers": true,
+ "ember-testing-triggerEvent-helper": true,
+ "computed-read-only": true,
+ "composable-computed-properties": null,
"ember-routing-drop-deprecated-action-style": null,
- "ember-metal-is-blank": null,
- "ember-eager-url-update": null
+ "ember-metal-is-blank": true,
+ "ember-eager-url-update": true
},
"debugStatements": ["Ember.warn", "Ember.assert", "Ember.deprecate", "Ember.debug", "Ember.Logger.info"]
} | false |
Other | emberjs | ember.js | bdd9c62b0cf8b2be62291203bd16f2f191f7f00f.json | avoid exception due to console miss on IE 8 | packages/ember-metal/lib/logger.js | @@ -13,7 +13,7 @@ function consoleMethod(name) {
if (method) {
// Older IE doesn't support apply, but Chrome needs it
- if (method.apply) {
+ if (typeof method.apply === 'function') {
logToConsole = function() {
method.apply(consoleObj, arguments);
}; | false |
Other | emberjs | ember.js | efafb6cdb34d82a6bb65ad21179065d8c06b3a8c.json | Add link to string-parameterize feature. | FEATURES.md | @@ -23,6 +23,8 @@ for a detailed explanation.
Transforms a string so that it may be used as part of a 'pretty' / SEO friendly URL.
(E.g. `'100 ways Ember.js is better than Angular.'.parameterize(); // '100-ways-emberjs-is-better-than-angular'`)
+ Added in [#3953](https://github.com/emberjs/ember.js/pull/3953).
+
* `ember-routing-named-substates`
Add named substates; e.g. when resolving a `loading` or `error` | false |
Other | emberjs | ember.js | 62076a4bc8c2cc257336331289443b9dbd5cb850.json | Add missing links to FEATURES.md. | FEATURES.md | @@ -105,6 +105,8 @@ for a detailed explanation.
Enables `Ember.run.bind` which is ember run-loop aware variation of
jQuery.proxy. Useful for integrating with 3rd party callbacks.
+ Added in [161113](https://github.com/emberjs/ember.js/commit/161113a9e5fad7f6dfde09a053166a05660a0051).
+
* `ember-metal-is-blank`
Adds `Ember.isBlank` method which returns true for an empty value or
a whitespace string.
@@ -116,3 +118,4 @@ for a detailed explanation.
instead of waiting for the transition to run to completion, unless
the transition was aborted/redirected within the same run loop.
+ Added in [#4122](https://github.com/emberjs/ember.js/pull/4122). | false |
Other | emberjs | ember.js | 34d8830064d1ffc731eeb80fdabd25b82b69500e.json | Remove unused variable | packages/ember-runtime/lib/controllers/array_controller.js | @@ -194,7 +194,7 @@ Ember.ArrayController = Ember.ArrayProxy.extend(Ember.ControllerMixin,
var container = get(this, 'container'),
subControllers = get(this, '_subControllers'),
subController = subControllers[idx],
- factory, fullName;
+ fullName;
if (subController) { return subController; }
| false |
Other | emberjs | ember.js | 543dcf910913bebd2b5963593d536573728fc4f1.json | Add missing entries to CHANGELOG. | CHANGELOG.md | @@ -71,6 +71,11 @@
* Components are lazily looked up.
* Renaming everyBy and anyBy to isEvery and isAny.
+###Ember 1.2.1 _(January 14, 2014)_
+
+* [SECURITY] Ensure primitive value contexts are escaped.
+* [SECURITY] Ensure {{group}} helper escapes properly.
+
###Ember 1.2.0 _(November 22, 2013)_
* [BUGFIX] Publish ember-handlebars-compiler along with builds.
@@ -126,6 +131,19 @@
* Allow apps with custom jquery builds to exclude the event-alias module
* Removes long-deprecated getPath/setPath
+###Ember 1.1.3 _(January 13, 2014)_
+
+* [SECURITY] Ensure primitive value contexts are escaped.
+* [SECURITY] Ensure {{group}} helper escapes properly.
+
+###Ember 1.1.2 _(October 25, 2013)
+
+* [BUGFIX] Fix failures in component rendering. - Fixes #3637
+
+###Ember 1.1.1 _(October 23, 2013)_
+
+* [BUGFIX] Allow Ember.Object.create to accept an Ember.Object.
+
### Ember 1.1.0 _(October 21, 2013)_
* Make Ember.run.later more flexible with arguments - Fixes #3072 | false |
Other | emberjs | ember.js | 55a30aabc15c92d376d3208d029132740b7a56a9.json | remove unneeded get | packages/ember-handlebars/lib/helpers/each.js | @@ -86,7 +86,7 @@ Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember._Metamorph, {
// If {{#each}} is looping over an array of controllers,
// point each child view at their respective controller.
- if (content && get(content, 'isController')) {
+ if (content && content.isController) {
set(view, 'controller', content);
}
| false |
Other | emberjs | ember.js | 33c89fc3ff143820cfb0b5629080817c6cb62bd6.json | Add documentation for Ember.EnumerableUtils. | packages/ember-metal/lib/enumerable_utils.js | @@ -7,34 +7,123 @@ indexOf = Array.prototype.indexOf || Ember.ArrayPolyfills.indexOf;
filter = Array.prototype.filter || Ember.ArrayPolyfills.filter;
splice = Array.prototype.splice;
+/**
+ * Defines some convenience methods for working with Enumerables.
+ * `Ember.EnumerableUtils` uses `Ember.ArrayPolyfills` when necessary.
+ *
+ * @class EnumerableUtils
+ * @namespace Ember
+ * @static
+ * */
var utils = Ember.EnumerableUtils = {
+ /**
+ * Calls the map function on the passed object with a specified callback. This
+ * uses `Ember.ArrayPolyfill`'s-map method when necessary.
+ *
+ * @method map
+ * @param {Object} obj The object that should be mapped
+ * @param {Function} callback The callback to execute
+ * @param {Object} thisArg Value to use as this when executing *callback*
+ *
+ * @return {Array} An array of mapped values.
+ */
map: function(obj, callback, thisArg) {
return obj.map ? obj.map.call(obj, callback, thisArg) : map.call(obj, callback, thisArg);
},
+ /**
+ * Calls the forEach function on the passed object with a specified callback. This
+ * uses `Ember.ArrayPolyfill`'s-forEach method when necessary.
+ *
+ * @method forEach
+ * @param {Object} obj The object to call forEach on
+ * @param {Function} callback The callback to execute
+ * @param {Object} thisArg Value to use as this when executing *callback*
+ *
+ */
forEach: function(obj, callback, thisArg) {
return obj.forEach ? obj.forEach.call(obj, callback, thisArg) : forEach.call(obj, callback, thisArg);
},
+ /**
+ * Calls the filter function on the passed object with a specified callback. This
+ * uses `Ember.ArrayPolyfill`'s-filter method when necessary.
+ *
+ * @method filter
+ * @param {Object} obj The object to call filter on
+ * @param {Function} callback The callback to execute
+ * @param {Object} thisArg Value to use as this when executing *callback*
+ *
+ * @return {Array} An array containing the filtered values
+ */
filter: function(obj, callback, thisArg) {
return obj.filter ? obj.filter.call(obj, callback, thisArg) : filter.call(obj, callback, thisArg);
},
+ /**
+ * Calls the indexOf function on the passed object with a specified callback. This
+ * uses `Ember.ArrayPolyfill`'s-indexOf method when necessary.
+ *
+ * @method indexOf
+ * @param {Object} obj The object to call indexOn on
+ * @param {Function} callback The callback to execute
+ * @param {Object} index The index to start searching from
+ *
+ */
indexOf: function(obj, element, index) {
return obj.indexOf ? obj.indexOf.call(obj, element, index) : indexOf.call(obj, element, index);
},
+ /**
+ * Returns an array of indexes of the first occurrences of the passed elements
+ * on the passed object.
+ *
+ * ```javascript
+ * var array = [1, 2, 3, 4, 5];
+ * Ember.EnumerableUtils.indexesOf(array, [2, 5]); // [1, 4]
+ *
+ * var fubar = "Fubarr";
+ * Ember.EnumerableUtils.indexesOf(fubar, ['b', 'r']); // [2, 4]
+ * ```
+ *
+ * @method indexesOf
+ * @param {Object} obj The object to check for element indexes
+ * @param {Array} elements The elements to search for on *obj*
+ *
+ * @return {Array} An array of indexes.
+ *
+ */
indexesOf: function(obj, elements) {
return elements === undefined ? [] : utils.map(elements, function(item) {
return utils.indexOf(obj, item);
});
},
+ /**
+ * Adds an object to an array. If the array already includes the object this
+ * method has no effect.
+ *
+ * @method addObject
+ * @param {Array} array The array the passed item should be added to
+ * @param {Object} item The item to add to the passed array
+ *
+ * @return 'undefined'
+ */
addObject: function(array, item) {
var index = utils.indexOf(array, item);
if (index === -1) { array.push(item); }
},
+ /**
+ * Removes an object from an array. If the array does not contain the passed
+ * object this method has no effect.
+ *
+ * @method removeObject
+ * @param {Array} array The array to remove the item from.
+ * @param {Object} item The item to remove from the passed array.
+ *
+ * @return 'undefined'
+ */
removeObject: function(array, item) {
var index = utils.indexOf(array, item);
if (index !== -1) { array.splice(index, 1); }
@@ -60,6 +149,31 @@ var utils = Ember.EnumerableUtils = {
return ret;
},
+ /**
+ * Replaces objects in an array with the passed objects.
+ *
+ * ```javascript
+ * var array = [1,2,3];
+ * Ember.EnumerableUtils.replace(array, 1, 2, [4, 5]); // [1, 4, 5]
+ *
+ * var array = [1,2,3];
+ * Ember.EnumerableUtils.replace(array, 1, 1, [4, 5]); // [1, 4, 5, 3]
+ *
+ * var array = [1,2,3];
+ * Ember.EnumerableUtils.replace(array, 10, 1, [4, 5]); // [1, 2, 3, 4, 5]
+ * ```
+ *
+ * @method replace
+ * @param {Array} array The array the objects should be inserted into.
+ * @param {Number} idx Starting index in the array to replace. If *idx* >=
+ * length, then append to the end of the array.
+ * @param {Number} amt Number of elements that should be remove from the array,
+ * starting at *idx*
+ * @param {Array} objects An array of zero or more objects that should be
+ * inserted into the array at *idx*
+ *
+ * @return {Array} The changed array.
+ */
replace: function(array, idx, amt, objects) {
if (array.replace) {
return array.replace(idx, amt, objects);
@@ -68,6 +182,29 @@ var utils = Ember.EnumerableUtils = {
}
},
+ /**
+ * Calculates the intersection of two arrays. This method returns a new array
+ * filled with the records that the two passed arrays share with each other.
+ * If there is no intersection, an empty array will be returned.
+ *
+ * ```javascript
+ * var array1 = [1, 2, 3, 4, 5];
+ * var array2 = [1, 3, 5, 6, 7];
+ *
+ * Ember.EnumerableUtils.intersection(array1, array2); // [1, 3, 5]
+ *
+ * var array1 = [1, 2, 3];
+ * var array2 = [4, 5, 6];
+ *
+ * Ember.EnumerableUtils.intersection(array1, array2); // []
+ * ```
+ *
+ * @method intersection
+ * @param {Array} array1 The first array
+ * @param {Array} array2 The second array
+ *
+ * @return {Array} The intersection of the two passed arrays.
+ */
intersection: function(array1, array2) {
var intersection = [];
| false |
Other | emberjs | ember.js | c2afc59bc90844ab6d6367e78523b058b904ef20.json | Update VERSION post-release. | CHANGELOG.md | @@ -1,14 +1,62 @@
# Ember Changelog
-
-### Ember 1.4.0 _(TBD)_
-
-* In canary
-* {{#with}} can take a controller= option for wrapping the context. Must be an `Ember.ObjectController`
-
-### Ember 1.3.0 _(TBD)_
-
-* In beta
+### Ember 1.4.0-beta.1 (January 6, 2014)
+
+* Unbound helper supports bound helper static strings.
+* Preserve `<base>` URL when using history location for routing.
+* Begin adding names for anonymous functions to aid in debugging.
+* [FEATURE with-controller] {{#with}} can take a controller= option for wrapping the context. Must be an `Ember.ObjectController`
+* [FEATURE propertyBraceExpansion] Add support for brace-expansion in dependent keys, observer and watch properties.
+* [FEATURE ember-metal-run-bind] Enables `Ember.run.bind` which is ember run-loop aware variation of jQuery.proxy.
+
+### Ember 1.3.0 (January 6, 2014)
+
+* Many documentation updates.
+* Update to RSVP 3.0.3.
+* Use defeatureify to strip debug statements allowing multi-line assert statements.
+* Added fail(), catch() and finally() methods to PromiseProxyMixin.
+* [BUGFIX Add 'view' option to {{outlet}} helper
+* Make `Ember.compare` return `date` when appropriate.
+* Prefer `EmberENV` over `ENV`, and do not create a global `ENV` if it was not supplied.
+* `{{unbound}}` helper supports bound helper static strings.
+* [BUGFIX] Make sure mandatory setters don't change default enumerable.
+* [BUGFIX] The `render` helper now sets a `parentController` property on the child controller.
+* `{{render}}` helper now creates the controller with its model.
+* Fix bug in Metamorph.js with nested `if` statements.
+* Label promises for debugging.
+* Deprecate `RSVP.Promise.prototype.fail`.
+* Cleanup header comment: remove duplication and add version.
+* [BUGFIX] Do not attempt to serialize undefined models.
+* [BUGFIX] Ensure {{link-to}} path observers are reregistered after render.
+* [BUGFIX] Ensure that the rootURL is available to location.
+* [BUGFIX] Make routePath smarter w/ stacked resource names
+* Better link-to error for invalid dest routes
+* Use imported handlebars before global Handlebars
+* Update router.js
+* Update RSVP.js
+* Improved a handeful of error messages
+* Provide more information for debugging
+* Added more assertions and deprecation warnings
+* [BUGFIX] Add preventDefault option to link-to and action.
+* [BUGFIX] contextualizeBindingPath should be aware of empty paths
+* Expose helpful vars in {{debugger}} helper body
+* [BUGFIX] container.has should not cause injections to be run.
+* [BUGFIX] Make flag LOG_TRANSITIONS_INTERNAL work again
+* [BUGFIX] Fix default {{yield}} for Components.
+* [BUGFIX] Ensure aliased {{with}} blocks are not shared.
+* [BUGFIX] Update to latest Backburner.js.
+* [BUGFIX] Fix issue with Ember.Test.unregisterHelper.
+* [BUGFIX] Make Ember.Handlebars.makeViewHelper warning useful.
+* [FEATURE reduceComputed-non-array-dependencies] `ReduceComputedProperty`s may have non-array dependent keys. When a non-array dependent key changes, the entire property is invalidated.
+* [FEATURE ember-testing-lazy-routing] Uses an initializer to defer readiness while testing. Readiness is advanced upon the first call to `visit`.
+* [FEATURE ember-testing-wait-hooks] Allows registration of additional functions that the `wait` testing helper will call to determine if it's ready to continue.
+* [FEATURE propertyBraceExpansion] Add simple brace expansion for dependent keys and watched properties specified declaratively. This is primarily useful with reduce computed properties, for specifying dependencies on multiple item properties of a dependent array, as with `Ember.computed.sort('items.@each.{propertyA,propertyB}', userSortFn)`.
+* [BUGFIX release] Update to Handlebars 1.1.2.
+* [BUGFIX] Register a default RSVP error handler.
+* Update to latest RSVP (80cec268).
+* [BUGFIX] Ember.Object.create now takes `undefined` as an argument.
+* Components are lazily looked up.
+* Renaming everyBy and anyBy to isEvery and isAny.
###Ember 1.2.0 _(November 22, 2013)_
| true |
Other | emberjs | ember.js | c2afc59bc90844ab6d6367e78523b058b904ef20.json | Update VERSION post-release. | Gemfile.lock | @@ -27,7 +27,7 @@ GIT
PATH
remote: .
specs:
- ember-source (1.4.0.beta.1.canary)
+ ember-source (1.5.0.beta.1.canary)
handlebars-source (~> 1.3.0)
GEM | true |
Other | emberjs | ember.js | c2afc59bc90844ab6d6367e78523b058b904ef20.json | Update VERSION post-release. | VERSION | @@ -1 +1 @@
-1.4.0-beta.1+canary
+1.5.0-beta.1+canary | true |
Other | emberjs | ember.js | df45fdb43fdf0af775a8f9403c8e718434ca2cdd.json | Remove garbage file | hangover.md | @@ -1,30 +0,0 @@
-
- test("routeless transitionTo in mid-transition uses transition's destination route for query params, not the router's current route", function() {
- expect(2);
- Router.map(function() {
- this.resource('woot', { path: '/woot' }, function() {
- this.route('yeah');
- });
- });
-
- App.WootYeahController = Ember.Controller.extend({
- queryParams: ['foo'],
- foo: 'lol'
- });
-
- var redirectCount = 0;
- App.WootRoute = Ember.Route.extend({
- redirect: function() {
- redirectCount++;
- // Keep transitioning to WootYeah but alter its
- // query params to foo: 'yeah'
- this.transitionTo({ queryParams: { foo: 'yeah' } });
- }
- });
-
- bootApplication();
-
- Ember.run(router, 'transitionTo', 'woot.yeah');
- equal(router.get('location.path'), "/woot/yeah?woot.yeah[foo]=yeah");
- equal(redirectCount, 1, "redirect was only run once");
- }); | false |
Other | emberjs | ember.js | 147fb6f637dcf788249f622df6f38b591dc81b4d.json | Fix property name in code comment
The property name of `Ember.Array#hasArrayObservers` is incorrect. | packages/ember-runtime/lib/mixins/array.js | @@ -300,7 +300,7 @@ Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.protot
Becomes true whenever the array currently has observers watching changes
on the array.
- @property Boolean
+ @property {Boolean} hasArrayObservers
*/
hasArrayObservers: Ember.computed(function() {
return Ember.hasListeners(this, '@array:change') || Ember.hasListeners(this, '@array:before'); | false |
Other | emberjs | ember.js | 149af8a3f37e1f21929f1365525f1508fb9cf022.json | Remove Vagrant references from CONTRIBUTING.md. | CONTRIBUTING.md | @@ -71,34 +71,6 @@ npm install
rake
```
-For those having issues with some of the build tool dependencies, an optional VagrantFile is provided.
-
-Using Vagrant to build latest version of Ember.js is quite simple. Just
-follow these 4 steps:
-
-1. Install Virtual Box - [Download](https://www.virtualbox.org/wiki/Downloads)
-
-2. Install Vagrant - [Download](http://downloads.vagrantup.com/)
-
-3. Retrieve chef cookbooks
-~~~
-git submodule init
-git submodule update
-~~~
-4. Lauch your vagrant virtual machine
-~~~
-vagrant up
-vagrant ssh
-~~~
-5. Use it!
-~~~
-cd /vagrant
-bundle install
-rake dist
-rake test
-...
-~~~
-
# Pull Requests
We love pull requests. Here's a quick guide: | false |
Other | emberjs | ember.js | d77268b9866f6aff77484c9630b099840000acf4.json | remove cookbooks because we don't have vagrant | cookbooks/build-essential | @@ -1 +0,0 @@
-Subproject commit 0c636536fb1236f792974f3af38f2950a03ed4b2 | true |
Other | emberjs | ember.js | d77268b9866f6aff77484c9630b099840000acf4.json | remove cookbooks because we don't have vagrant | cookbooks/nodejs | @@ -1 +0,0 @@
-Subproject commit 9e39a20f5c9a08542fc21915aa357672634ce589 | true |
Other | emberjs | ember.js | d77268b9866f6aff77484c9630b099840000acf4.json | remove cookbooks because we don't have vagrant | cookbooks/phantomjs | @@ -1 +0,0 @@
-Subproject commit b8c40cb48770941f7b09ef11eab0a329db0c7162 | true |
Other | emberjs | ember.js | ddef9c960a943f3ac81481caf45595a2977f331a.json | Fix typo in `unordered list` | packages/ember-views/lib/views/collection_view.js | @@ -68,15 +68,15 @@ var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt;
Given an empty `<body>` and the following code:
```javascript
- anUndorderedListView = Ember.CollectionView.create({
+ anUnorderedListView = Ember.CollectionView.create({
tagName: 'ul',
content: ['A','B','C'],
itemViewClass: Ember.View.extend({
template: Ember.Handlebars.compile("the letter: {{view.content}}")
})
});
- anUndorderedListView.appendTo('body');
+ anUnorderedListView.appendTo('body');
```
Will result in the following HTML structure | false |
Other | emberjs | ember.js | 559fda6d93927b103a6dd02b411b8db5d5125c46.json | Use imported handlebars before global Handlebars
Prioritizing the global Handlebars causes problems in environments with multiple versions of Handlebars. One should be able to import a desired version. | packages/ember-handlebars-compiler/lib/main.js | @@ -10,7 +10,7 @@ var objectCreate = Object.create || function(parent) {
return new F();
};
-var Handlebars = (this && this.Handlebars) || (Ember.imports && Ember.imports.Handlebars);
+var Handlebars = (Ember.imports && Ember.imports.Handlebars) || (this && this.Handlebars);
if (!Handlebars && typeof require === 'function') {
Handlebars = require('handlebars');
} | false |
Other | emberjs | ember.js | 8eb4e53a478c086d93d2414114e0bd8704237ecc.json | Add support for min & max on HTML 5 inputs
This will allow support of the min & max attributes on the `number` and
`range` input types from HTML5. | packages/ember-handlebars/lib/controls/text_field.js | @@ -32,7 +32,7 @@ Ember.TextField = Ember.Component.extend(Ember.TextSupport,
classNames: ['ember-text-field'],
tagName: "input",
- attributeBindings: ['type', 'value', 'size', 'pattern', 'name'],
+ attributeBindings: ['type', 'value', 'size', 'pattern', 'name', 'min', 'max'],
/**
The `value` attribute of the input element. As the user inputs text, this
@@ -63,11 +63,29 @@ Ember.TextField = Ember.Component.extend(Ember.TextSupport,
size: null,
/**
- The `pattern` the pattern attribute of input element.
+ The `pattern` attribute of input element.
@property pattern
@type String
@default null
*/
- pattern: null
+ pattern: null,
+
+ /**
+ The `min` attribute of input element used with `type="number"` or `type="range"`.
+
+ @property min
+ @type String
+ @default null
+ */
+ min: null,
+
+ /**
+ The `max` attribute of input element used with `type="number"` or `type="range"`.
+
+ @property max
+ @type String
+ @default null
+ */
+ max: null
}); | false |
Other | emberjs | ember.js | 2632209ad66c52adbc0f85f6b189382ee53ca83c.json | move Ember.inspect to ember-metal | packages/ember-metal/lib/utils.js | @@ -666,3 +666,38 @@ Ember.typeOf = function(item) {
return ret;
};
+
+/**
+ Convenience method to inspect an object. This method will attempt to
+ convert the object into a useful string description.
+
+ It is a pretty simple implementation. If you want something more robust,
+ use something like JSDump: https://github.com/NV/jsDump
+
+ @method inspect
+ @for Ember
+ @param {Object} obj The object you want to inspect.
+ @return {String} A description of the object
+*/
+Ember.inspect = function(obj) {
+ var type = Ember.typeOf(obj);
+ if (type === 'array') {
+ return '[' + obj + ']';
+ }
+ if (type !== 'object') {
+ return obj + '';
+ }
+
+ var v, ret = [];
+ for(var key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ v = obj[key];
+ if (v === 'toString') { continue; } // ignore useless items
+ if (Ember.typeOf(v) === 'function') { v = "function() { ... }"; }
+ ret.push(key + ": " + v);
+ }
+ }
+ return "{" + ret.join(", ") + "}";
+};
+
+ | true |
Other | emberjs | ember.js | 2632209ad66c52adbc0f85f6b189382ee53ca83c.json | move Ember.inspect to ember-metal | packages/ember-runtime/lib/core.js | @@ -184,39 +184,6 @@ Ember.copy = function(obj, deep) {
return _copy(obj, deep, deep ? [] : null, deep ? [] : null);
};
-/**
- Convenience method to inspect an object. This method will attempt to
- convert the object into a useful string description.
-
- It is a pretty simple implementation. If you want something more robust,
- use something like JSDump: https://github.com/NV/jsDump
-
- @method inspect
- @for Ember
- @param {Object} obj The object you want to inspect.
- @return {String} A description of the object
-*/
-Ember.inspect = function(obj) {
- var type = Ember.typeOf(obj);
- if (type === 'array') {
- return '[' + obj + ']';
- }
- if (type !== 'object') {
- return obj + '';
- }
-
- var v, ret = [];
- for(var key in obj) {
- if (obj.hasOwnProperty(key)) {
- v = obj[key];
- if (v === 'toString') { continue; } // ignore useless items
- if (Ember.typeOf(v) === 'function') { v = "function() { ... }"; }
- ret.push(key + ": " + v);
- }
- }
- return "{" + ret.join(", ") + "}";
-};
-
/**
Compares two objects, returning true if they are logically equal. This is
a deeper comparison than a simple triple equal. For sets it will compare the | true |
Other | emberjs | ember.js | 2632209ad66c52adbc0f85f6b189382ee53ca83c.json | move Ember.inspect to ember-metal | packages/ember-runtime/tests/core/inspect_test.js | @@ -1,48 +0,0 @@
-module("Ember.inspect");
-
-var inspect = Ember.inspect;
-
-test("strings", function() {
- equal(inspect("foo"), "foo");
-});
-
-test("numbers", function() {
- equal(inspect(2.6), "2.6");
-});
-
-test("null", function() {
- equal(inspect(null), "null");
-});
-
-test("undefined", function() {
- equal(inspect(undefined), "undefined");
-});
-
-test("true", function() {
- equal(inspect(true), "true");
-});
-
-test("false", function() {
- equal(inspect(false), "false");
-});
-
-test("object", function() {
- equal(inspect({}), "{}");
- equal(inspect({ foo: 'bar' }), "{foo: bar}");
- equal(inspect({ foo: Ember.K }), "{foo: function() { ... }}");
-});
-
-test("array", function() {
- equal(inspect([1,2,3]), "[1,2,3]");
-});
-
-test("regexp", function() {
- equal(inspect(/regexp/), "/regexp/");
-});
-
-test("date", function() {
- var inspected = inspect(new Date("Sat Apr 30 2011 13:24:11"));
- ok(inspected.match(/Sat Apr 30/), "The inspected date has its date");
- ok(inspected.match(/2011/), "The inspected date has its year");
- ok(inspected.match(/13:24:11/), "The inspected date has its time");
-}); | true |
Other | emberjs | ember.js | c3c283b6c031031cb7778a48ab88622365b52c59.json | fix emberjs/website#1027 with unique header title | packages/ember-handlebars/lib/helpers/collection.js | @@ -51,7 +51,7 @@ var get = Ember.get, handlebarsGet = Ember.Handlebars.get, fmt = Ember.String.fm
</div>
```
- ### Blockless Use
+ ### Blockless use in a collection
If you provide an `itemViewClass` option that has its own `template` you can
omit the block. | false |
Other | emberjs | ember.js | b18bf88e1e2b16dc7750de3b8d7397c2ada6bf6e.json | remove unnecessary uses of `call` / `apply` | packages/ember-runtime/lib/computed/reduce_computed.js | @@ -731,7 +731,7 @@ ReduceComputedProperty.prototype.property = function () {
```javascript
Ember.computed.max = function (dependentKey) {
- return Ember.reduceComputed.call(null, dependentKey, {
+ return Ember.reduceComputed(dependentKey, {
initialValue: -Infinity,
addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) { | true |
Other | emberjs | ember.js | b18bf88e1e2b16dc7750de3b8d7397c2ada6bf6e.json | remove unnecessary uses of `call` / `apply` | packages/ember-runtime/lib/computed/reduce_computed_macros.js | @@ -44,7 +44,7 @@ var get = Ember.get,
@return {Ember.ComputedProperty} computes the largest value in the dependentKey's array
*/
Ember.computed.max = function (dependentKey) {
- return Ember.reduceComputed.call(null, dependentKey, {
+ return Ember.reduceComputed(dependentKey, {
initialValue: -Infinity,
addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -86,7 +86,7 @@ Ember.computed.max = function (dependentKey) {
@return {Ember.ComputedProperty} computes the smallest value in the dependentKey's array
*/
Ember.computed.min = function (dependentKey) {
- return Ember.reduceComputed.call(null, dependentKey, {
+ return Ember.reduceComputed(dependentKey, {
initialValue: Infinity,
addedItem: function (accumulatedValue, item, changeMeta, instanceMeta) {
@@ -477,7 +477,7 @@ Ember.computed.setDiff = function (setAProperty, setBProperty) {
if (arguments.length !== 2) {
throw new Ember.Error("setDiff requires exactly two dependent arrays.");
}
- return Ember.arrayComputed.call(null, setAProperty, setBProperty, {
+ return Ember.arrayComputed(setAProperty, setBProperty, {
addedItem: function (array, item, changeMeta, instanceMeta) {
var setA = get(this, setAProperty),
setB = get(this, setBProperty);
@@ -679,7 +679,7 @@ Ember.computed.sort = function (itemsKey, sortDefinition) {
};
}
- return Ember.arrayComputed.call(null, itemsKey, {
+ return Ember.arrayComputed(itemsKey, {
initialize: initFn,
addedItem: function (array, item, changeMeta, instanceMeta) { | true |
Other | emberjs | ember.js | b18bf88e1e2b16dc7750de3b8d7397c2ada6bf6e.json | remove unnecessary uses of `call` / `apply` | packages/ember-runtime/lib/mixins/enumerable.js | @@ -728,7 +728,7 @@ Ember.Enumerable = Ember.Mixin.create({
var ret = initialValue;
this.forEach(function(item, i) {
- ret = callback.call(null, ret, item, i, this, reducerProperty);
+ ret = callback(ret, item, i, this, reducerProperty);
}, this);
return ret;
@@ -751,7 +751,7 @@ Ember.Enumerable = Ember.Mixin.create({
this.forEach(function(x, idx) {
var method = x && x[methodName];
if ('function' === typeof method) {
- ret[idx] = args ? method.apply(x, args) : method.call(x);
+ ret[idx] = args ? method.apply(x, args) : x[methodName]();
}
}, this);
| true |
Other | emberjs | ember.js | b18bf88e1e2b16dc7750de3b8d7397c2ada6bf6e.json | remove unnecessary uses of `call` / `apply` | packages/ember-testing/lib/helpers.js | @@ -159,7 +159,7 @@ function wait(app, value) {
if (Test.waiters && Test.waiters.any(function(waiter) {
var context = waiter[0];
var callback = waiter[1];
- return !callback.apply(context);
+ return !callback.call(context);
})) { return; }
}
// Stop polling | true |
Other | emberjs | ember.js | b18bf88e1e2b16dc7750de3b8d7397c2ada6bf6e.json | remove unnecessary uses of `call` / `apply` | packages/ember-testing/lib/test.js | @@ -484,7 +484,7 @@ function isolate(fn, val) {
// Reset lastPromise for nested helpers
Ember.Test.lastPromise = null;
- value = fn.call(null, val);
+ value = fn(val);
lastPromise = Ember.Test.lastPromise;
| true |
Other | emberjs | ember.js | 4d5d0f62c64abb8d47a975035ccfd62cf1b1c86a.json | Remove another duplicate changelog entry. | CHANGELOG.md | @@ -31,7 +31,6 @@
* [BUGFIX] Bubble `loading` action above pivot route
* [BUGFIX] reduceComputed ignore changes during reset.
* [BUGFIX] reduceComputed handle out-of-range index.
-* [BUGFIX] Allow Ember.Object.create to accept an Ember.Object.
* [FEATURE] Add support for nested loading/error substates. A loading substate will be entered when a slow-to-resolve promise is returned from one of the Route#model hooks during a transition and an appropriately-named loading template/route can be found. An error substate will be entered when one of the Route#model hooks returns a rejecting promise and an appropriately-named error template/route can be found.
* [FEATURE] Components and helpers registered on the container can be rendered in templates via their dasherized names. E.g. {{helper-name}} or {{component-name}}
* [FEATURE] Add a `didTransition` hook to the router. | false |
Other | emberjs | ember.js | c2a83893f5df634c0037b8a194c78734ba21ef5f.json | Add a helpful warning
Because almost every property on a class definition is a function, it's
easy to accidentally say this out of habit:
````javascript
App.MyController = Ember.Controller.extend({
actions: function() {
doThing: function() { ... }
}
});
````
When you meant to say this:
````javascript
App.MyController = Ember.Controller.extend({
actions: {
doThing: function() { ... }
}
});
````
This doesn't product any errors or warning, it just makes your handlers
invisible. My change adds an assertion. | packages/ember-runtime/lib/mixins/action_handler.js | @@ -32,6 +32,8 @@ Ember.ActionHandler = Ember.Mixin.create({
var hashName;
if (!props._actions) {
+ Ember.assert(this + " 'actions' should not be a function", typeof(props.actions) !== 'function');
+
if (typeOf(props.actions) === 'object') {
hashName = 'actions';
} else if (typeOf(props.events) === 'object') { | true |
Other | emberjs | ember.js | c2a83893f5df634c0037b8a194c78734ba21ef5f.json | Add a helpful warning
Because almost every property on a class definition is a function, it's
easy to accidentally say this out of habit:
````javascript
App.MyController = Ember.Controller.extend({
actions: function() {
doThing: function() { ... }
}
});
````
When you meant to say this:
````javascript
App.MyController = Ember.Controller.extend({
actions: {
doThing: function() { ... }
}
});
````
This doesn't product any errors or warning, it just makes your handlers
invisible. My change adds an assertion. | packages/ember-runtime/tests/mixins/action_handler_test.js | @@ -0,0 +1,13 @@
+test("passing a function for the actions hash triggers an assertion", function() {
+ expect(1);
+
+ var controller = Ember.Controller.extend({
+ actions: function(){}
+ });
+
+ expectAssertion(function(){
+ Ember.run(function(){
+ controller.create();
+ });
+ });
+}); | true |
Other | emberjs | ember.js | 7b2d76400591a1f2ed066dfe16b97631ff97d6b0.json | Remove duplicate changelog entry. | CHANGELOG.md | @@ -36,7 +36,6 @@
* [FEATURE] Components and helpers registered on the container can be rendered in templates via their dasherized names. E.g. {{helper-name}} or {{component-name}}
* [FEATURE] Add a `didTransition` hook to the router.
* [FEATURE] Add a non-block form link-to helper. E.g {{link-to "About us" "about"}} will have "About us" as link text and will transition to the "about" route. Everything works as with the block form link-to.
-* [FEATURE] Add support for nested loading/error substates. A loading substate will be entered when a slow-to-resolve promise is returned from one of the Route#model hooks during a transition and an appropriately-named loading template/route can be found. An error substate will be entered when one of the Route#model hooks returns a rejecting promise and an appropriately-named error template/route can be found.
* [FEATURE] Add sortBy using Ember.compare to the Enumerable mixin
* [FEATURE reduceComputedSelf] reduceComputed dependent keys may refer to @this.
* [BUGFIX] reduceComputed handle out of range indexes. | false |
Other | emberjs | ember.js | 29d75c984fbee48fa93133856ecb3962d1b02963.json | Remove accepted features from FEATURES.md | FEATURES.md | @@ -21,12 +21,6 @@ for a detailed explanation.
Added in [#3614](https://github.com/emberjs/ember.js/pull/3614).
-* `container-renderables`
-
- Components and helpers registered on the container can be rendered in templates
- via their dasherized names. (E.g. {{helper-name}} or {{component-name}})
-
- Added in [#3329](https://github.com/emberjs/ember.js/pull/3329).
* `query-params`
Add query params support to the ember router. You can now define which query
@@ -35,61 +29,25 @@ for a detailed explanation.
helper and the transitionTo method.
Added in [#3182](https://github.com/emberjs/ember.js/pull/3182).
-* `link-to-non-block`
-
- Add a non-block form link-to helper. E.g {{link-to "About us" "about"}} will
- have "About us" as link text and will transition to the "about" route. Everything
- works as with the block form link-to.
-
- Added in [#3443](https://github.com/emberjs/ember.js/pull/3443).
-* `ember-routing-didTransition-hook`
-
- Add `didTransition` hook to the router that gets triggered for each route transition.
-
- Added in [#3452](https://github.com/emberjs/ember.js/pull/3452).
* `propertyBraceExpansion`
Adds support for brace-expansion in dependent keys, observer, and watch properties.
(E.g. `Em.computed.filter('list.@each.{propA,propB}', filterFn)` which will observe both
`propA` and `propB`).
Added in [#3538](https://github.com/emberjs/ember.js/pull/3538).
-* `reduceComputedSelf`
-
- Dependent keys may refer to `@this` to observe changes to the object itself,
- which must be array-like, rather than a property of the object. This is
- mostly useful for array proxies.
-
- Added in [#3365](https://github.com/emberjs/ember.js/pull/3365).
* `string-humanize`
Replaces underscores with spaces, and capitializes first character of string.
Also strips `_id` suffixes. (E.g. `'first_name'.humanize() // 'First name'`)
Added in [#3224](https://github.com/emberjs/ember.js/pull/3224)
-* `ember-runtime-sortBy`
-
- Adds `sortBy` to `Ember.Enumerable`. Allows sorting an enumerable by one or more
- properties.
-
- Added in [#3446](https://github.com/emberjs/ember.js/pull/3446)
* `ember-testing-wait-hooks`
Allows registration of additional functions that the `wait` testing helper
will call to determine if it's ready to continue.
Added in [#3433](https://github.com/emberjs/ember.js/pull/3433)
-* `ember-routing-loading-error-substates`
-
- Adds support for nested loading/error substates. A loading substate will be entered when a
- slow-to-resolve promise is returned from one of the Route#model hooks during a transition
- and an appropriately-named loading template/route can be found. An error substate will be
- entered when one of the Route#model hooks returns a rejecting promise and an appropriately-named
- error template/route can be found.
-
- Added in [#3568](https://github.com/emberjs/ember.js/pull/3568) and feature
- flagged in [#3617](https://github.com/emberjs/ember.js/pull/3617).
-
* `ember-routing-named-substates`
Add named substates; e.g. when resolving a `loading` or `error` | false |
Other | emberjs | ember.js | 69a7acb83eb60eac6803f8dc96dfa41258a6e473.json | Remove feature flags for 'reduceComputedSelf'. | features.json | @@ -1,5 +1,4 @@
{
- "reduceComputedSelf": true,
"reduceComputed-non-array-dependencies": null,
"ember-testing-wait-hooks": null,
"query-params": null, | true |
Other | emberjs | ember.js | 69a7acb83eb60eac6803f8dc96dfa41258a6e473.json | Remove feature flags for 'reduceComputedSelf'. | packages/ember-runtime/lib/computed/reduce_computed.js | @@ -22,10 +22,8 @@ var e_get = Ember.get,
arrayBracketPattern = /\.\[\]$/;
function get(obj, key) {
- if (Ember.FEATURES.isEnabled('reduceComputedSelf')) {
- if (key === '@this') {
- return obj;
- }
+ if (key === '@this') {
+ return obj;
}
return e_get(obj, key); | true |
Other | emberjs | ember.js | 69a7acb83eb60eac6803f8dc96dfa41258a6e473.json | Remove feature flags for 'reduceComputedSelf'. | packages/ember-runtime/tests/computed/reduce_computed_test.js | @@ -494,53 +494,51 @@ test("removedItem is not erroneously called for dependent arrays during a recomp
});
-if (Ember.FEATURES.isEnabled('reduceComputedSelf')) {
- module('Ember.arryComputed - self chains', {
- setup: function() {
- var a = Ember.Object.create({ name: 'a' }),
- b = Ember.Object.create({ name: 'b' });
-
- obj = Ember.ArrayProxy.createWithMixins({
- content: Ember.A([a, b]),
- names: Ember.arrayComputed('@this.@each.name', {
- addedItem: function (array, item, changeMeta, instanceMeta) {
- var mapped = get(item, 'name');
- array.insertAt(changeMeta.index, mapped);
- return array;
- },
- removedItem: function(array, item, changeMeta, instanceMeta) {
- array.removeAt(changeMeta.index, 1);
- return array;
- }
- })
- });
- },
- teardown: function() {
- Ember.run(function() {
- obj.destroy();
- });
- }
- });
-
- test("@this can be used to treat the object as the array itself", function() {
- var names = get(obj, 'names');
-
- deepEqual(names, ['a', 'b'], "precond - names is initially correct");
-
+module('Ember.arryComputed - self chains', {
+ setup: function() {
+ var a = Ember.Object.create({ name: 'a' }),
+ b = Ember.Object.create({ name: 'b' });
+
+ obj = Ember.ArrayProxy.createWithMixins({
+ content: Ember.A([a, b]),
+ names: Ember.arrayComputed('@this.@each.name', {
+ addedItem: function (array, item, changeMeta, instanceMeta) {
+ var mapped = get(item, 'name');
+ array.insertAt(changeMeta.index, mapped);
+ return array;
+ },
+ removedItem: function(array, item, changeMeta, instanceMeta) {
+ array.removeAt(changeMeta.index, 1);
+ return array;
+ }
+ })
+ });
+ },
+ teardown: function() {
Ember.run(function() {
- obj.objectAt(1).set('name', 'c');
+ obj.destroy();
});
+ }
+});
- deepEqual(names, ['a', 'c'], "@this can be used with item property observers");
+test("@this can be used to treat the object as the array itself", function() {
+ var names = get(obj, 'names');
- Ember.run(function() {
- obj.pushObject({ name: 'd' });
- });
+ deepEqual(names, ['a', 'b'], "precond - names is initially correct");
- deepEqual(names, ['a', 'c', 'd'], "@this observes new items");
+ Ember.run(function() {
+ obj.objectAt(1).set('name', 'c');
});
-}
+ deepEqual(names, ['a', 'c'], "@this can be used with item property observers");
+
+ Ember.run(function() {
+ obj.pushObject({ name: 'd' });
+ });
+
+ deepEqual(names, ['a', 'c', 'd'], "@this observes new items");
+});
+
module('Ember.arrayComputed - changeMeta property observers', {
setup: function() {
callbackItems = []; | true |
Other | emberjs | ember.js | 69a7acb83eb60eac6803f8dc96dfa41258a6e473.json | Remove feature flags for 'reduceComputedSelf'. | packages/ember-runtime/tests/controllers/item_controller_class_test.js | @@ -280,47 +280,45 @@ test("array observers can invoke `objectAt` without overwriting existing item co
equal(tywinController.get('name'), "Tywin", "Array observers calling `objectAt` does not overwrite existing controllers' content");
});
-if (Ember.FEATURES.isEnabled('reduceComputedSelf')) {
- module('Ember.ArrayController - itemController with arrayComputed', {
- setup: function() {
- container = new Ember.Container();
-
- cersei = Ember.Object.create({ name: 'Cersei' });
- jaime = Ember.Object.create({ name: 'Jaime' });
- lannisters = Ember.A([ jaime, cersei ]);
-
- controllerClass = Ember.ObjectController.extend({
- title: Ember.computed(function () {
- switch (get(this, 'name')) {
- case 'Jaime': return 'Kingsguard';
- case 'Cersei': return 'Queen';
- }
- }).property('name'),
-
- toString: function() {
- return "itemController for " + this.get('name');
- }
- });
+module('Ember.ArrayController - itemController with arrayComputed', {
+ setup: function() {
+ container = new Ember.Container();
- container.register("controller:Item", controllerClass);
- },
- teardown: function() {
- Ember.run(function() {
- container.destroy();
- });
- }
- });
+ cersei = Ember.Object.create({ name: 'Cersei' });
+ jaime = Ember.Object.create({ name: 'Jaime' });
+ lannisters = Ember.A([ jaime, cersei ]);
- test("item controllers can be used to provide properties for array computed macros", function() {
- createArrayController();
+ controllerClass = Ember.ObjectController.extend({
+ title: Ember.computed(function () {
+ switch (get(this, 'name')) {
+ case 'Jaime': return 'Kingsguard';
+ case 'Cersei': return 'Queen';
+ }
+ }).property('name'),
- ok(Ember.compare(Ember.guidFor(cersei), Ember.guidFor(jaime)) < 0, "precond - guid tiebreaker would fail test");
+ toString: function() {
+ return "itemController for " + this.get('name');
+ }
+ });
- arrayController.reopen({
- sortProperties: Ember.A(['title']),
- sorted: Ember.computed.sort('@this', 'sortProperties')
+ container.register("controller:Item", controllerClass);
+ },
+ teardown: function() {
+ Ember.run(function() {
+ container.destroy();
});
+ }
+});
- deepEqual(arrayController.get('sorted').mapProperty('name'), ['Jaime', 'Cersei'], "ArrayController items can be sorted on itemController properties");
+test("item controllers can be used to provide properties for array computed macros", function() {
+ createArrayController();
+
+ ok(Ember.compare(Ember.guidFor(cersei), Ember.guidFor(jaime)) < 0, "precond - guid tiebreaker would fail test");
+
+ arrayController.reopen({
+ sortProperties: Ember.A(['title']),
+ sorted: Ember.computed.sort('@this', 'sortProperties')
});
-}
+
+ deepEqual(arrayController.get('sorted').mapProperty('name'), ['Jaime', 'Cersei'], "ArrayController items can be sorted on itemController properties");
+}); | true |
Other | emberjs | ember.js | ba5fc1c24b9e95d3bdf421e173819e6366a31080.json | Remove feature flags for 'link-to-non-block'. | features.json | @@ -1,5 +1,4 @@
{
- "link-to-non-block": true,
"reduceComputedSelf": true,
"reduceComputed-non-array-dependencies": null,
"ember-testing-wait-hooks": null, | true |
Other | emberjs | ember.js | ba5fc1c24b9e95d3bdf421e173819e6366a31080.json | Remove feature flags for 'link-to-non-block'. | packages/ember-routing/lib/helpers/link_to.js | @@ -186,12 +186,10 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
length = paths.length,
path, i, normalizedPath;
- if (Ember.FEATURES.isEnabled('link-to-non-block')) {
- var linkTextPath = helperParameters.options.linkTextPath;
- if (linkTextPath) {
- normalizedPath = Ember.Handlebars.normalizePath(templateContext, linkTextPath, helperParameters.options.data);
- this.registerObserver(normalizedPath.root, normalizedPath.path, this, this.rerender);
- }
+ var linkTextPath = helperParameters.options.linkTextPath;
+ if (linkTextPath) {
+ normalizedPath = Ember.Handlebars.normalizePath(templateContext, linkTextPath, helperParameters.options.data);
+ this.registerObserver(normalizedPath.root, normalizedPath.path, this, this.rerender);
}
for(i=0; i < length; i++) {
@@ -724,21 +722,19 @@ Ember.onLoad('Ember.Handlebars', function(Handlebars) {
hash.disabledBinding = hash.disabledWhen;
- if (Ember.FEATURES.isEnabled('link-to-non-block')) {
- if (!options.fn) {
- var linkTitle = params.shift();
- var linkType = options.types.shift();
- var context = this;
- if (linkType === 'ID') {
- options.linkTextPath = linkTitle;
- options.fn = function() {
- return Ember.Handlebars.get(context, linkTitle, options);
- };
- } else {
- options.fn = function() {
- return linkTitle;
- };
- }
+ if (!options.fn) {
+ var linkTitle = params.shift();
+ var linkType = options.types.shift();
+ var context = this;
+ if (linkType === 'ID') {
+ options.linkTextPath = linkTitle;
+ options.fn = function() {
+ return Ember.Handlebars.get(context, linkTitle, options);
+ };
+ } else {
+ options.fn = function() {
+ return linkTitle;
+ };
}
}
| true |
Other | emberjs | ember.js | ba5fc1c24b9e95d3bdf421e173819e6366a31080.json | Remove feature flags for 'link-to-non-block'. | packages/ember/tests/helpers/link_to_test.js | @@ -990,147 +990,145 @@ test("The {{link-to}} helper works in an #each'd array of string route names", f
linksEqual(Ember.$('a', '#qunit-fixture'), ["/bar", "/rar", "/bar", "/rar", "/rar", "/foo"]);
});
-if (Ember.FEATURES.isEnabled('link-to-non-block')) {
- test("The non-block form {{link-to}} helper moves into the named route", function() {
- expect(3);
- Router.map(function(match) {
- this.route("contact");
- });
-
- Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{link-to 'Contact us' 'contact' id='contact-link'}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
- Ember.TEMPLATES.contact = Ember.Handlebars.compile("<h3>Contact</h3>{{link-to 'Home' 'index' id='home-link'}}{{link-to 'Self' 'contact' id='self-link'}}");
+test("The non-block form {{link-to}} helper moves into the named route", function() {
+ expect(3);
+ Router.map(function(match) {
+ this.route("contact");
+ });
- bootApplication();
+ Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{link-to 'Contact us' 'contact' id='contact-link'}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
+ Ember.TEMPLATES.contact = Ember.Handlebars.compile("<h3>Contact</h3>{{link-to 'Home' 'index' id='home-link'}}{{link-to 'Self' 'contact' id='self-link'}}");
- Ember.run(function() {
- Ember.$('#contact-link', '#qunit-fixture').click();
- });
+ bootApplication();
- equal(Ember.$('h3:contains(Contact)', '#qunit-fixture').length, 1, "The contact template was rendered");
- equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
- equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
+ Ember.run(function() {
+ Ember.$('#contact-link', '#qunit-fixture').click();
});
- test("The non-block form {{link-to}} helper updates the link text when it is a binding", function() {
- expect(7);
- Router.map(function(match) {
- this.route("contact");
- });
+ equal(Ember.$('h3:contains(Contact)', '#qunit-fixture').length, 1, "The contact template was rendered");
+ equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
+ equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
+});
- App.IndexController = Ember.Controller.extend({
- contactName: 'Jane'
- });
+test("The non-block form {{link-to}} helper updates the link text when it is a binding", function() {
+ expect(7);
+ Router.map(function(match) {
+ this.route("contact");
+ });
- Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{link-to contactName 'contact' id='contact-link'}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
- Ember.TEMPLATES.contact = Ember.Handlebars.compile("<h3>Contact</h3>{{link-to 'Home' 'index' id='home-link'}}{{link-to 'Self' 'contact' id='self-link'}}");
+ App.IndexController = Ember.Controller.extend({
+ contactName: 'Jane'
+ });
- bootApplication();
+ Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3>{{link-to contactName 'contact' id='contact-link'}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
+ Ember.TEMPLATES.contact = Ember.Handlebars.compile("<h3>Contact</h3>{{link-to 'Home' 'index' id='home-link'}}{{link-to 'Self' 'contact' id='self-link'}}");
- Ember.run(function() {
- router.handleURL("/");
- });
+ bootApplication();
- equal(Ember.$('#contact-link:contains(Jane)', '#qunit-fixture').length, 1, "The link title is correctly resolved");
+ Ember.run(function() {
+ router.handleURL("/");
+ });
- var controller = container.lookup('controller:index');
- Ember.run(function() {
- controller.set('contactName', 'Joe');
- });
- equal(Ember.$('#contact-link:contains(Joe)', '#qunit-fixture').length, 1, "The link title is correctly updated when the bound property changes");
+ equal(Ember.$('#contact-link:contains(Jane)', '#qunit-fixture').length, 1, "The link title is correctly resolved");
- Ember.run(function() {
- Ember.$('#contact-link', '#qunit-fixture').click();
- });
+ var controller = container.lookup('controller:index');
+ Ember.run(function() {
+ controller.set('contactName', 'Joe');
+ });
+ equal(Ember.$('#contact-link:contains(Joe)', '#qunit-fixture').length, 1, "The link title is correctly updated when the bound property changes");
- equal(Ember.$('h3:contains(Contact)', '#qunit-fixture').length, 1, "The contact template was rendered");
- equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
- equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
+ Ember.run(function() {
+ Ember.$('#contact-link', '#qunit-fixture').click();
+ });
- Ember.run(function() {
- Ember.$('#home-link', '#qunit-fixture').click();
- });
+ equal(Ember.$('h3:contains(Contact)', '#qunit-fixture').length, 1, "The contact template was rendered");
+ equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
+ equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
- equal(Ember.$('h3:contains(Home)', '#qunit-fixture').length, 1, "The index template was rendered");
- equal(Ember.$('#contact-link:contains(Joe)', '#qunit-fixture').length, 1, "The link title is correctly updated when the route changes");
+ Ember.run(function() {
+ Ember.$('#home-link', '#qunit-fixture').click();
});
- test("The non-block form {{link-to}} helper moves into the named route with context", function() {
- expect(5);
- Router.map(function(match) {
- this.route("item", { path: "/item/:id" });
- });
+ equal(Ember.$('h3:contains(Home)', '#qunit-fixture').length, 1, "The index template was rendered");
+ equal(Ember.$('#contact-link:contains(Joe)', '#qunit-fixture').length, 1, "The link title is correctly updated when the route changes");
+});
- App.IndexRoute = Ember.Route.extend({
- model: function() {
- return Ember.A([
- { id: "yehuda", name: "Yehuda Katz" },
- { id: "tom", name: "Tom Dale" },
- { id: "erik", name: "Erik Brynroflsson" }
- ]);
- }
- });
+test("The non-block form {{link-to}} helper moves into the named route with context", function() {
+ expect(5);
+ Router.map(function(match) {
+ this.route("item", { path: "/item/:id" });
+ });
- App.ItemRoute = Ember.Route.extend({
- serialize: function(object) {
- return { id: object.id };
- }
- });
+ App.IndexRoute = Ember.Route.extend({
+ model: function() {
+ return Ember.A([
+ { id: "yehuda", name: "Yehuda Katz" },
+ { id: "tom", name: "Tom Dale" },
+ { id: "erik", name: "Erik Brynroflsson" }
+ ]);
+ }
+ });
- Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3><ul>{{#each controller}}<li>{{link-to name 'item' this}}</li>{{/each}}</ul>");
- Ember.TEMPLATES.item = Ember.Handlebars.compile("<h3>Item</h3><p>{{name}}</p>{{#link-to 'index' id='home-link'}}Home{{/link-to}}");
+ App.ItemRoute = Ember.Route.extend({
+ serialize: function(object) {
+ return { id: object.id };
+ }
+ });
- bootApplication();
+ Ember.TEMPLATES.index = Ember.Handlebars.compile("<h3>Home</h3><ul>{{#each controller}}<li>{{link-to name 'item' this}}</li>{{/each}}</ul>");
+ Ember.TEMPLATES.item = Ember.Handlebars.compile("<h3>Item</h3><p>{{name}}</p>{{#link-to 'index' id='home-link'}}Home{{/link-to}}");
- Ember.run(function() {
- Ember.$('li a:contains(Yehuda)', '#qunit-fixture').click();
- });
+ bootApplication();
- equal(Ember.$('h3:contains(Item)', '#qunit-fixture').length, 1, "The item template was rendered");
- equal(Ember.$('p', '#qunit-fixture').text(), "Yehuda Katz", "The name is correct");
+ Ember.run(function() {
+ Ember.$('li a:contains(Yehuda)', '#qunit-fixture').click();
+ });
- Ember.run(function() { Ember.$('#home-link').click(); });
+ equal(Ember.$('h3:contains(Item)', '#qunit-fixture').length, 1, "The item template was rendered");
+ equal(Ember.$('p', '#qunit-fixture').text(), "Yehuda Katz", "The name is correct");
- equal(normalizeUrl(Ember.$('li a:contains(Yehuda)').attr('href')), "/item/yehuda");
- equal(normalizeUrl(Ember.$('li a:contains(Tom)').attr('href')), "/item/tom");
- equal(normalizeUrl(Ember.$('li a:contains(Erik)').attr('href')), "/item/erik");
+ Ember.run(function() { Ember.$('#home-link').click(); });
- });
+ equal(normalizeUrl(Ember.$('li a:contains(Yehuda)').attr('href')), "/item/yehuda");
+ equal(normalizeUrl(Ember.$('li a:contains(Tom)').attr('href')), "/item/tom");
+ equal(normalizeUrl(Ember.$('li a:contains(Erik)').attr('href')), "/item/erik");
- test("The non-block form {{link-to}} performs property lookup", function() {
- Ember.TEMPLATES.index = Ember.Handlebars.compile("{{link-to 'string' 'index' id='string-link'}}{{link-to path foo id='path-link'}}{{link-to view.foo view.foo id='view-link'}}");
+});
- function assertEquality(href) {
- equal(normalizeUrl(Ember.$('#string-link', '#qunit-fixture').attr('href')), '/');
- equal(normalizeUrl(Ember.$('#path-link', '#qunit-fixture').attr('href')), href);
- equal(normalizeUrl(Ember.$('#view-link', '#qunit-fixture').attr('href')), href);
- }
+test("The non-block form {{link-to}} performs property lookup", function() {
+ Ember.TEMPLATES.index = Ember.Handlebars.compile("{{link-to 'string' 'index' id='string-link'}}{{link-to path foo id='path-link'}}{{link-to view.foo view.foo id='view-link'}}");
- App.IndexView = Ember.View.extend({
- foo: 'index',
- elementId: 'index-view'
- });
+ function assertEquality(href) {
+ equal(normalizeUrl(Ember.$('#string-link', '#qunit-fixture').attr('href')), '/');
+ equal(normalizeUrl(Ember.$('#path-link', '#qunit-fixture').attr('href')), href);
+ equal(normalizeUrl(Ember.$('#view-link', '#qunit-fixture').attr('href')), href);
+ }
- App.IndexController = Ember.Controller.extend({
- foo: 'index'
- });
+ App.IndexView = Ember.View.extend({
+ foo: 'index',
+ elementId: 'index-view'
+ });
- App.Router.map(function() {
- this.route('about');
- });
+ App.IndexController = Ember.Controller.extend({
+ foo: 'index'
+ });
- bootApplication();
+ App.Router.map(function() {
+ this.route('about');
+ });
- Ember.run(router, 'handleURL', '/');
+ bootApplication();
- assertEquality('/');
+ Ember.run(router, 'handleURL', '/');
- var controller = container.lookup('controller:index'),
- view = Ember.View.views['index-view'];
- Ember.run(function() {
- controller.set('foo', 'about');
- view.set('foo', 'about');
- });
+ assertEquality('/');
- assertEquality('/about');
+ var controller = container.lookup('controller:index'),
+ view = Ember.View.views['index-view'];
+ Ember.run(function() {
+ controller.set('foo', 'about');
+ view.set('foo', 'about');
});
-}
+
+ assertEquality('/about');
+}); | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | features.json | @@ -1,5 +1,4 @@
{
- "container-renderables": true,
"link-to-non-block": true,
"reduceComputedSelf": true,
"reduceComputed-non-array-dependencies": null, | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember-application/lib/system/application.js | @@ -736,10 +736,7 @@ Ember.Application.reopenClass({
container.optionsForType('component', { singleton: false });
container.optionsForType('view', { singleton: false });
container.optionsForType('template', { instantiate: false });
-
- if (Ember.FEATURES.isEnabled('container-renderables')) {
- container.optionsForType('helper', { instantiate: false });
- }
+ container.optionsForType('helper', { instantiate: false });
container.register('application:main', namespace, { instantiate: false });
| true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember-application/tests/system/dependency_injection/default_resolver_test.js | @@ -58,25 +58,23 @@ test("the default resolver resolves models on the namespace", function() {
detectEqual(application.Post, locator.lookupFactory('model:post'), "looks up Post model on application");
});
-if (Ember.FEATURES.isEnabled('container-renderables')) {
- test("the default resolver resolves helpers from Ember.Handlebars.helpers", function(){
- function fooresolvertestHelper(){ return 'FOO'; }
- function barBazResolverTestHelper(){ return 'BAZ'; }
- Ember.Handlebars.registerHelper('fooresolvertest', fooresolvertestHelper);
- Ember.Handlebars.registerHelper('bar-baz-resolver-test', barBazResolverTestHelper);
- equal(fooresolvertestHelper, locator.lookup('helper:fooresolvertest'), "looks up fooresolvertestHelper helper");
- equal(barBazResolverTestHelper, locator.lookup('helper:bar-baz-resolver-test'), "looks up barBazResolverTestHelper helper");
- });
-
- test("the default resolver resolves container-registered helpers", function(){
- function gooresolvertestHelper(){ return 'GOO'; }
- function gooGazResolverTestHelper(){ return 'GAZ'; }
- application.register('helper:gooresolvertest', gooresolvertestHelper);
- application.register('helper:goo-baz-resolver-test', gooGazResolverTestHelper);
- equal(gooresolvertestHelper, locator.lookup('helper:gooresolvertest'), "looks up gooresolvertest helper");
- equal(gooGazResolverTestHelper, locator.lookup('helper:goo-baz-resolver-test'), "looks up gooGazResolverTestHelper helper");
- });
-}
+test("the default resolver resolves helpers from Ember.Handlebars.helpers", function(){
+ function fooresolvertestHelper(){ return 'FOO'; }
+ function barBazResolverTestHelper(){ return 'BAZ'; }
+ Ember.Handlebars.registerHelper('fooresolvertest', fooresolvertestHelper);
+ Ember.Handlebars.registerHelper('bar-baz-resolver-test', barBazResolverTestHelper);
+ equal(fooresolvertestHelper, locator.lookup('helper:fooresolvertest'), "looks up fooresolvertestHelper helper");
+ equal(barBazResolverTestHelper, locator.lookup('helper:bar-baz-resolver-test'), "looks up barBazResolverTestHelper helper");
+});
+
+test("the default resolver resolves container-registered helpers", function(){
+ function gooresolvertestHelper(){ return 'GOO'; }
+ function gooGazResolverTestHelper(){ return 'GAZ'; }
+ application.register('helper:gooresolvertest', gooresolvertestHelper);
+ application.register('helper:goo-baz-resolver-test', gooGazResolverTestHelper);
+ equal(gooresolvertestHelper, locator.lookup('helper:gooresolvertest'), "looks up gooresolvertest helper");
+ equal(gooGazResolverTestHelper, locator.lookup('helper:goo-baz-resolver-test'), "looks up gooGazResolverTestHelper helper");
+});
test("the default resolver throws an error if the fullName to resolve is invalid", function(){
raises(function(){ locator.resolve(undefined);}, TypeError, /Invalid fullName/ ); | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember-handlebars/lib/ext.js | @@ -145,13 +145,10 @@ Ember.Handlebars.registerHelper('helperMissing', function(path) {
var options = arguments[arguments.length - 1];
- if (Ember.FEATURES.isEnabled('container-renderables')) {
+ var helper = Ember.Handlebars.resolveHelper(options.data.view.container, path);
- var helper = Ember.Handlebars.resolveHelper(options.data.view.container, path);
-
- if (helper) {
- return helper.apply(this, slice.call(arguments, 1));
- }
+ if (helper) {
+ return helper.apply(this, slice.call(arguments, 1));
}
error = "%@ Handlebars error: Could not find property '%@' on object %@.";
@@ -180,15 +177,12 @@ Ember.Handlebars.registerHelper('blockHelperMissing', function(path) {
var options = arguments[arguments.length - 1];
- if (Ember.FEATURES.isEnabled('container-renderables')) {
+ Ember.assert("`blockHelperMissing` was invoked without a helper name, which is most likely due to a mismatch between the version of Ember.js you're running now and the one used to precompile your templates. Please make sure the version of `ember-handlebars-compiler` you're using is up to date.", path);
- Ember.assert("`blockHelperMissing` was invoked without a helper name, which is most likely due to a mismatch between the version of Ember.js you're running now and the one used to precompile your templates. Please make sure the version of `ember-handlebars-compiler` you're using is up to date.", path);
+ var helper = Ember.Handlebars.resolveHelper(options.data.view.container, path);
- var helper = Ember.Handlebars.resolveHelper(options.data.view.container, path);
-
- if (helper) {
- return helper.apply(this, slice.call(arguments, 1));
- }
+ if (helper) {
+ return helper.apply(this, slice.call(arguments, 1));
}
return Handlebars.helpers.blockHelperMissing.apply(this, arguments); | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember-handlebars/lib/helpers/binding.js | @@ -162,12 +162,9 @@ EmberHandlebars.registerHelper('_triageMustache', function(property, options) {
return helpers[property].call(this, options);
}
- if (Ember.FEATURES.isEnabled('container-renderables')) {
-
- var helper = Ember.Handlebars.resolveHelper(options.data.view.container, property);
- if (helper) {
- return helper.call(this, options);
- }
+ var helper = Ember.Handlebars.resolveHelper(options.data.view.container, property);
+ if (helper) {
+ return helper.call(this, options);
}
return helpers.bind.call(this, property, options); | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember-handlebars/lib/loader.js | @@ -59,35 +59,6 @@ function bootstrap() {
Ember.Handlebars.bootstrap( Ember.$(document) );
}
-function registerComponents(container) {
- var templates = Ember.TEMPLATES, match;
- if (!templates) { return; }
-
- for (var prop in templates) {
- if (match = prop.match(/^components\/(.*)$/)) {
- registerComponent(container, match[1]);
- }
- }
-}
-
-
-function registerComponent(container, name) {
- Ember.assert("You provided a template named 'components/" + name + "', but custom components must include a '-'", name.match(/-/));
-
- var fullName = 'component:' + name;
-
- container.injection(fullName, 'layout', 'template:components/' + name);
-
- var Component = container.lookupFactory(fullName);
-
- if (!Component) {
- container.register(fullName, Ember.Component);
- Component = container.lookupFactory(fullName);
- }
-
- Ember.Handlebars.helper(name, Component);
-}
-
function registerComponentLookup(container) {
container.register('component-lookup:main', Ember.ComponentLookup);
}
@@ -109,17 +80,9 @@ Ember.onLoad('Ember.Application', function(Application) {
initialize: bootstrap
});
- if (Ember.FEATURES.isEnabled('container-renderables')) {
- Application.initializer({
- name: 'registerComponentLookup',
- after: 'domTemplates',
- initialize: registerComponentLookup
- });
- } else {
- Application.initializer({
- name: 'registerComponents',
- after: 'domTemplates',
- initialize: registerComponents
- });
- }
+ Application.initializer({
+ name: 'registerComponentLookup',
+ after: 'domTemplates',
+ initialize: registerComponentLookup
+ });
}); | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember/tests/component_registration_test.js | @@ -42,12 +42,10 @@ function boot(callback) {
});
}
-if (!Ember.FEATURES.isEnabled('container-renderables')) {
- test("A helper is registered for templates under the components/ directory", function() {
- boot();
- ok(Ember.Handlebars.helpers['expand-it'], "The helper is registered");
- });
-}
+test("A helper is registered for templates under the components/ directory", function() {
+ boot();
+ ok(Ember.Handlebars.helpers['expand-it'], "The helper is registered");
+});
test("The helper becomes the body of the component", function() {
boot();
@@ -64,79 +62,77 @@ test("If a component is registered, it is used", function() {
equal(Ember.$('div.testing123', '#qunit-fixture').text(), "hello world", "The component is composed correctly");
});
-if (Ember.FEATURES.isEnabled('container-renderables')) {
- test("Late-registered components can be rendered with custom `template` property", function() {
+test("Late-registered components can be rendered with custom `template` property", function() {
- Ember.TEMPLATES.application = compile("<div id='wrapper'>there goes {{my-hero}}</div>");
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>there goes {{my-hero}}</div>");
- boot(function() {
- container.register('component:my-hero', Ember.Component.extend({
- classNames: 'testing123',
- template: function() { return "watch him as he GOES"; }
- }));
- });
-
- equal(Ember.$('#wrapper').text(), "there goes watch him as he GOES", "The component is composed correctly");
- ok(!Ember.Handlebars.helpers['my-hero'], "Component wasn't saved to global Handlebars.helpers hash");
+ boot(function() {
+ container.register('component:my-hero', Ember.Component.extend({
+ classNames: 'testing123',
+ template: function() { return "watch him as he GOES"; }
+ }));
});
- test("Late-registered components can be rendered with template registered on the container", function() {
+ equal(Ember.$('#wrapper').text(), "there goes watch him as he GOES", "The component is composed correctly");
+ ok(!Ember.Handlebars.helpers['my-hero'], "Component wasn't saved to global Handlebars.helpers hash");
+});
- Ember.TEMPLATES.application = compile("<div id='wrapper'>hello world {{sally-rutherford}} {{#sally-rutherford}}!!!{{/sally-rutherford}}</div>");
+test("Late-registered components can be rendered with template registered on the container", function() {
- boot(function() {
- container.register('template:components/sally-rutherford', compile("funkytowny{{yield}}"));
- container.register('component:sally-rutherford', Ember.Component);
- });
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>hello world {{sally-rutherford}} {{#sally-rutherford}}!!!{{/sally-rutherford}}</div>");
- equal(Ember.$('#wrapper').text(), "hello world funkytowny funkytowny!!!", "The component is composed correctly");
- ok(!Ember.Handlebars.helpers['sally-rutherford'], "Component wasn't saved to global Handlebars.helpers hash");
+ boot(function() {
+ container.register('template:components/sally-rutherford', compile("funkytowny{{yield}}"));
+ container.register('component:sally-rutherford', Ember.Component);
});
- test("Late-registered components can be rendered with ONLY the template registered on the container", function() {
+ equal(Ember.$('#wrapper').text(), "hello world funkytowny funkytowny!!!", "The component is composed correctly");
+ ok(!Ember.Handlebars.helpers['sally-rutherford'], "Component wasn't saved to global Handlebars.helpers hash");
+});
- Ember.TEMPLATES.application = compile("<div id='wrapper'>hello world {{borf-snorlax}} {{#borf-snorlax}}!!!{{/borf-snorlax}}</div>");
+test("Late-registered components can be rendered with ONLY the template registered on the container", function() {
- boot(function() {
- container.register('template:components/borf-snorlax', compile("goodfreakingTIMES{{yield}}"));
- });
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>hello world {{borf-snorlax}} {{#borf-snorlax}}!!!{{/borf-snorlax}}</div>");
- equal(Ember.$('#wrapper').text(), "hello world goodfreakingTIMES goodfreakingTIMES!!!", "The component is composed correctly");
- ok(!Ember.Handlebars.helpers['borf-snorlax'], "Component wasn't saved to global Handlebars.helpers hash");
+ boot(function() {
+ container.register('template:components/borf-snorlax', compile("goodfreakingTIMES{{yield}}"));
});
- test("Component-like invocations are treated as bound paths if neither template nor component are registered on the container", function() {
+ equal(Ember.$('#wrapper').text(), "hello world goodfreakingTIMES goodfreakingTIMES!!!", "The component is composed correctly");
+ ok(!Ember.Handlebars.helpers['borf-snorlax'], "Component wasn't saved to global Handlebars.helpers hash");
+});
- Ember.TEMPLATES.application = compile("<div id='wrapper'>{{user-name}} hello {{api-key}} world</div>");
+test("Component-like invocations are treated as bound paths if neither template nor component are registered on the container", function() {
- boot(function() {
- container.register('controller:application', Ember.Controller.extend({
- 'user-name': 'machty'
- }));
- });
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>{{user-name}} hello {{api-key}} world</div>");
- equal(Ember.$('#wrapper').text(), "machty hello world", "The component is composed correctly");
+ boot(function() {
+ container.register('controller:application', Ember.Controller.extend({
+ 'user-name': 'machty'
+ }));
});
- test("Component lookups should take place on components' subcontainers", function() {
+ equal(Ember.$('#wrapper').text(), "machty hello world", "The component is composed correctly");
+});
+
+test("Component lookups should take place on components' subcontainers", function() {
- expect(1);
+ expect(1);
- Ember.TEMPLATES.application = compile("<div id='wrapper'>{{#sally-rutherford}}{{mach-ty}}{{/sally-rutherford}}</div>");
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>{{#sally-rutherford}}{{mach-ty}}{{/sally-rutherford}}</div>");
- boot(function() {
- container.register('component:sally-rutherford', Ember.Component.extend({
- init: function() {
- this._super();
- this.container = new Ember.Container(this.container);
- this.container.register('component:mach-ty', Ember.Component.extend({
- didInsertElement: function() {
- ok(true, "mach-ty was rendered");
- }
- }));
- }
- }));
- });
+ boot(function() {
+ container.register('component:sally-rutherford', Ember.Component.extend({
+ init: function() {
+ this._super();
+ this.container = new Ember.Container(this.container);
+ this.container.register('component:mach-ty', Ember.Component.extend({
+ didInsertElement: function() {
+ ok(true, "mach-ty was rendered");
+ }
+ }));
+ }
+ }));
});
-}
+}); | true |
Other | emberjs | ember.js | 5ac30881521199f8886f2fb2f839d019e80e124b.json | Remove feature flags for 'container-renderables'. | packages/ember/tests/helpers/helper_registration_test.js | @@ -5,97 +5,95 @@ function reverseHelper(value) {
return arguments.length > 1 ? value.split('').reverse().join('') : "--";
}
-if (Ember.FEATURES.isEnabled('container-renderables')) {
-
- module("Application Lifecycle - Helper Registration", {
- teardown: function() {
- Ember.run(function() {
- App.destroy();
- App = null;
- Ember.TEMPLATES = {};
- });
- }
- });
- var boot = function(callback) {
+module("Application Lifecycle - Helper Registration", {
+ teardown: function() {
Ember.run(function() {
- App = Ember.Application.create({
- name: 'App',
- rootElement: '#qunit-fixture'
- });
+ App.destroy();
+ App = null;
+ Ember.TEMPLATES = {};
+ });
+ }
+});
+
+var boot = function(callback) {
+ Ember.run(function() {
+ App = Ember.Application.create({
+ name: 'App',
+ rootElement: '#qunit-fixture'
+ });
- App.deferReadiness();
+ App.deferReadiness();
- App.Router = Ember.Router.extend({
- location: 'none'
- });
+ App.Router = Ember.Router.extend({
+ location: 'none'
+ });
- container = App.__container__;
+ container = App.__container__;
- if (callback) { callback(); }
- });
+ if (callback) { callback(); }
+ });
- var router = container.lookup('router:main');
+ var router = container.lookup('router:main');
- Ember.run(App, 'advanceReadiness');
- Ember.run(function() {
- router.handleURL('/');
- });
- };
+ Ember.run(App, 'advanceReadiness');
+ Ember.run(function() {
+ router.handleURL('/');
+ });
+};
- test("Unbound dashed helpers registered on the container can be late-invoked", function() {
+test("Unbound dashed helpers registered on the container can be late-invoked", function() {
- Ember.TEMPLATES.application = compile("<div id='wrapper'>{{x-borf}} {{x-borf YES}}</div>");
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>{{x-borf}} {{x-borf YES}}</div>");
- boot(function() {
- container.register('helper:x-borf', function(val) {
- return arguments.length > 1 ? val : "BORF";
- });
+ boot(function() {
+ container.register('helper:x-borf', function(val) {
+ return arguments.length > 1 ? val : "BORF";
});
-
- equal(Ember.$('#wrapper').text(), "BORF YES", "The helper was invoked from the container");
- ok(!Ember.Handlebars.helpers['x-borf'], "Container-registered helper doesn't wind up on global helpers hash");
});
- test("Bound helpers registered on the container can be late-invoked", function() {
+ equal(Ember.$('#wrapper').text(), "BORF YES", "The helper was invoked from the container");
+ ok(!Ember.Handlebars.helpers['x-borf'], "Container-registered helper doesn't wind up on global helpers hash");
+});
- Ember.TEMPLATES.application = compile("<div id='wrapper'>{{x-reverse}} {{x-reverse foo}}</div>");
+test("Bound helpers registered on the container can be late-invoked", function() {
- boot(function() {
- container.register('controller:application', Ember.Controller.extend({
- foo: "alex"
- }));
- container.register('helper:x-reverse', Ember.Handlebars.makeBoundHelper(reverseHelper));
- });
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>{{x-reverse}} {{x-reverse foo}}</div>");
- equal(Ember.$('#wrapper').text(), "-- xela", "The bound helper was invoked from the container");
- ok(!Ember.Handlebars.helpers['x-reverse'], "Container-registered helper doesn't wind up on global helpers hash");
+ boot(function() {
+ container.register('controller:application', Ember.Controller.extend({
+ foo: "alex"
+ }));
+ container.register('helper:x-reverse', Ember.Handlebars.makeBoundHelper(reverseHelper));
});
- test("Undashed helpers registered on the container can not (presently) be invoked", function() {
+ equal(Ember.$('#wrapper').text(), "-- xela", "The bound helper was invoked from the container");
+ ok(!Ember.Handlebars.helpers['x-reverse'], "Container-registered helper doesn't wind up on global helpers hash");
+});
+
+test("Undashed helpers registered on the container can not (presently) be invoked", function() {
- var realHelperMissing = Ember.Handlebars.helpers.helperMissing;
- Ember.Handlebars.helpers.helperMissing = function() {
- return "NOHALPER";
- };
+ var realHelperMissing = Ember.Handlebars.helpers.helperMissing;
+ Ember.Handlebars.helpers.helperMissing = function() {
+ return "NOHALPER";
+ };
- // Note: the reason we're not allowing undashed helpers is to avoid
- // a possible perf hit in hot code paths, i.e. _triageMustache.
- // We only presently perform container lookups if prop.indexOf('-') >= 0
+ // Note: the reason we're not allowing undashed helpers is to avoid
+ // a possible perf hit in hot code paths, i.e. _triageMustache.
+ // We only presently perform container lookups if prop.indexOf('-') >= 0
- Ember.TEMPLATES.application = compile("<div id='wrapper'>{{omg}}|{{omg 'GRRR'}}|{{yorp}}|{{yorp 'ahh'}}</div>");
+ Ember.TEMPLATES.application = compile("<div id='wrapper'>{{omg}}|{{omg 'GRRR'}}|{{yorp}}|{{yorp 'ahh'}}</div>");
- boot(function() {
- container.register('helper:omg', function() {
- return "OMG";
- });
- container.register('helper:yorp', Ember.Handlebars.makeBoundHelper(function() {
- return "YORP";
- }));
+ boot(function() {
+ container.register('helper:omg', function() {
+ return "OMG";
});
+ container.register('helper:yorp', Ember.Handlebars.makeBoundHelper(function() {
+ return "YORP";
+ }));
+ });
- equal(Ember.$('#wrapper').text(), "|NOHALPER||NOHALPER", "The undashed helper was invoked from the container");
+ equal(Ember.$('#wrapper').text(), "|NOHALPER||NOHALPER", "The undashed helper was invoked from the container");
- Ember.Handlebars.helpers.helperMissing = realHelperMissing;
- });
-}
+ Ember.Handlebars.helpers.helperMissing = realHelperMissing;
+}); | true |
Other | emberjs | ember.js | f68410e8a0de7033c142c373f9fbfc07fd30a542.json | Remove feature flags for 'ember-runtime-sortBy'. | features.json | @@ -1,5 +1,4 @@
{
- "ember-runtime-sortBy": true,
"container-renderables": true,
"link-to-non-block": true,
"reduceComputedSelf": true, | true |
Other | emberjs | ember.js | f68410e8a0de7033c142c373f9fbfc07fd30a542.json | Remove feature flags for 'ember-runtime-sortBy'. | packages/ember-runtime/lib/mixins/enumerable.js | @@ -975,35 +975,30 @@ Ember.Enumerable = Ember.Mixin.create({
Ember.propertyDidChange(this, '[]');
return this ;
- }
-
-});
+ },
-if (Ember.FEATURES.isEnabled("ember-runtime-sortBy")) {
- Ember.Enumerable.reopen({
- /**
- Converts the enumerable into an array and sorts by the keys
- specified in the argument.
+ /**
+ Converts the enumerable into an array and sorts by the keys
+ specified in the argument.
- You may provide multiple arguments to sort by multiple properties.
+ You may provide multiple arguments to sort by multiple properties.
- @method sortBy
- @param {String} property name(s) to sort on
- @return {Array} The sorted array.
+ @method sortBy
+ @param {String} property name(s) to sort on
+ @return {Array} The sorted array.
*/
- sortBy: function() {
- var sortKeys = arguments;
- return this.toArray().sort(function(a, b){
- for(var i = 0; i < sortKeys.length; i++) {
- var key = sortKeys[i],
- propA = get(a, key),
- propB = get(b, key);
- // return 1 or -1 else continue to the next sortKey
- var compareValue = Ember.compare(propA, propB);
- if (compareValue) { return compareValue; }
- }
- return 0;
- });
- }
- });
-}
+ sortBy: function() {
+ var sortKeys = arguments;
+ return this.toArray().sort(function(a, b){
+ for(var i = 0; i < sortKeys.length; i++) {
+ var key = sortKeys[i],
+ propA = get(a, key),
+ propB = get(b, key);
+ // return 1 or -1 else continue to the next sortKey
+ var compareValue = Ember.compare(propA, propB);
+ if (compareValue) { return compareValue; }
+ }
+ return 0;
+ });
+ }
+}); | true |
Other | emberjs | ember.js | f68410e8a0de7033c142c373f9fbfc07fd30a542.json | Remove feature flags for 'ember-runtime-sortBy'. | packages/ember-runtime/tests/suites/enumerable/sortBy.js | @@ -3,20 +3,18 @@ var get = Ember.get;
var suite = Ember.EnumerableTests;
-if (Ember.FEATURES.isEnabled("ember-runtime-sortBy")) {
- suite.module('sortBy');
+suite.module('sortBy');
- suite.test('sort by value of property', function() {
- var obj = this.newObject([{a: 2},{a: 1}]),
- sorted = obj.sortBy('a');
- equal(get(sorted[0], 'a'), 1);
- equal(get(sorted[1], 'a'), 2);
- });
+suite.test('sort by value of property', function() {
+ var obj = this.newObject([{a: 2},{a: 1}]),
+ sorted = obj.sortBy('a');
+ equal(get(sorted[0], 'a'), 1);
+ equal(get(sorted[1], 'a'), 2);
+});
- suite.test('supports multiple propertyNames', function() {
- var obj = this.newObject([{a: 1, b: 2},{a: 1, b: 1}]),
- sorted = obj.sortBy('a', 'b');
- equal(get(sorted[0], 'b'), 1);
- equal(get(sorted[1], 'b'), 2);
- });
-}
+suite.test('supports multiple propertyNames', function() {
+ var obj = this.newObject([{a: 1, b: 2},{a: 1, b: 1}]),
+ sorted = obj.sortBy('a', 'b');
+ equal(get(sorted[0], 'b'), 1);
+ equal(get(sorted[1], 'b'), 2);
+}); | true |
Other | emberjs | ember.js | dc3f9d9c68c60cbbfd8abd8c0b2f439eb36aa4c7.json | Fix documentation error
Was `Context` and should be `Contact` | packages/ember-runtime/lib/mixins/freezable.js | @@ -46,7 +46,7 @@ var get = Ember.get, set = Ember.set;
});
- c = Context.create({ firstName: "John", lastName: "Doe" });
+ c = Contact.create({ firstName: "John", lastName: "Doe" });
c.swapNames(); // returns c
c.freeze();
c.swapNames(); // EXCEPTION | false |
Other | emberjs | ember.js | cf2cd8310084155379dd74b4278b7df472e59bae.json | Remove unused local var from link_to test | packages/ember/tests/helpers/link_to_test.js | @@ -362,12 +362,6 @@ test("The {{link-to}} helper moves into the named route with context", function(
Ember.TEMPLATES.about = Ember.Handlebars.compile("<h3>List</h3><ul>{{#each controller}}<li>{{#link-to 'item' this}}{{name}}{{/link-to}}<li>{{/each}}</ul>{{#link-to 'index' id='home-link'}}Home{{/link-to}}");
- var people = {
- yehuda: "Yehuda Katz",
- tom: "Tom Dale",
- erik: "Erik Brynroflsson"
- };
-
App.AboutRoute = Ember.Route.extend({
model: function() {
return Ember.A([ | false |
Other | emberjs | ember.js | 3daf93c371f6c3e3ff0838494307071413df8b0b.json | Support HANDLEBARS_PATH for Gemfile
This makes it easier for Ember's tests to be run against a
development version of Handlebars. | Gemfile | @@ -1,5 +1,9 @@
source "https://rubygems.org"
+if ENV['HANDLEBARS_PATH']
+ gem "handlebars-source", :path => File.join(ENV['HANDLEBARS_PATH'], "dist", "components")
+end
+
gem "rake-pipeline", :git => "https://github.com/livingsocial/rake-pipeline.git"
gem "ember-dev", :git => "https://github.com/emberjs/ember-dev.git", :branch => "master"
| false |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/camelize.js | @@ -1,5 +1,11 @@
module('Ember.String.camelize');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.camelize is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.camelize, 'String.prototype helper disabled');
+ });
+}
+
test("camelize normal string", function() {
deepEqual(Ember.String.camelize('my favorite items'), 'myFavoriteItems');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/capitalize.js | @@ -7,6 +7,12 @@
module('Ember.String.capitalize');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.capitalize is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.capitalize, 'String.prototype helper disabled');
+ });
+}
+
test("capitalize normal string", function() {
deepEqual(Ember.String.capitalize('my favorite items'), 'My favorite items');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/classify.js | @@ -1,5 +1,11 @@
module('Ember.String.classify');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.classify is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.classify, 'String.prototype helper disabled');
+ });
+}
+
test("classify normal string", function() {
deepEqual(Ember.String.classify('my favorite items'), 'MyFavoriteItems');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/dasherize.js | @@ -1,5 +1,11 @@
module('Ember.String.dasherize');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.dasherize is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.dasherize, 'String.prototype helper disabled');
+ });
+}
+
test("dasherize normal string", function() {
deepEqual(Ember.String.dasherize('my favorite items'), 'my-favorite-items');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/decamelize.js | @@ -1,5 +1,11 @@
module('Ember.String.decamelize');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.decamelize is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.decamelize, 'String.prototype helper disabled');
+ });
+}
+
test("does nothing with normal string", function() {
deepEqual(Ember.String.decamelize('my favorite items'), 'my favorite items');
if (Ember.EXTEND_PROTOTYPES) {
@@ -33,4 +39,4 @@ test("decamelizes strings with numbers", function() {
if (Ember.EXTEND_PROTOTYPES) {
deepEqual('size160Url'.decamelize(), 'size160_url');
}
-});
\ No newline at end of file
+}); | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/fmt_string.js | @@ -1,5 +1,11 @@
module('Ember.String.fmt');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.fmt is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.fmt, 'String.prototype helper disabled');
+ });
+}
+
test("'Hello %@ %@'.fmt('John', 'Doe') => 'Hello John Doe'", function() {
equal(Ember.String.fmt('Hello %@ %@', ['John', 'Doe']), 'Hello John Doe');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/humanize.js | @@ -1,6 +1,12 @@
if (Ember.FEATURES.isEnabled("string-humanize")) {
module('Ember.String.humanize');
+ if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.humanize is not modified without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.humanize, 'String.prototype helper disabled');
+ });
+ }
+
test("with underscored string", function() {
deepEqual(Ember.String.humanize('first_name'), 'First name');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/loc_test.js | @@ -15,6 +15,12 @@ module('Ember.String.loc', {
}
});
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.loc is not available without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.loc, 'String.prototype helper disabled');
+ });
+}
+
test("'_Hello World'.loc() => 'Bonjour le monde'", function() {
equal(Ember.String.loc('_Hello World'), 'Bonjour le monde');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/underscore.js | @@ -1,5 +1,11 @@
module('Ember.String.underscore');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.underscore is not available without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.underscore, 'String.prototype helper disabled');
+ });
+}
+
test("with normal string", function() {
deepEqual(Ember.String.underscore('my favorite items'), 'my_favorite_items');
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 61c79eae54e3bbc95397f4c1e755493e3933d059.json | Add tests to ensure EXTEND_PROTOYPES is honored. | packages/ember-runtime/tests/system/string/w_test.js | @@ -1,5 +1,11 @@
module('Ember.String.w');
+if (!Ember.EXTEND_PROTOTYPES && !Ember.EXTEND_PROTOTYPES.String) {
+ test("String.prototype.w is not available without EXTEND_PROTOTYPES", function() {
+ ok("undefined" === typeof String.prototype.w, 'String.prototype helper disabled');
+ });
+}
+
test("'one two three'.w() => ['one','two','three']", function() {
deepEqual(Ember.String.w('one two three'), ['one','two','three']);
if (Ember.EXTEND_PROTOTYPES) { | true |
Other | emberjs | ember.js | 43d342e794d2c5bcd7e6a0b2e0c1cb252b752261.json | Use local npm packages for defeatureify.
Update to the latest `ember-dev` which requires `defeatureify` and
`yuidocjs` to be installed locally (previously these were required to be
global).
Also, adds a `package.json` to make installing as simple as `npm install`. | .travis.yml | @@ -4,8 +4,7 @@ rvm:
node_js:
- "0.10"
install:
-- "npm install -g defeatureify"
-- "npm install -g yuidocjs"
+- "npm install"
- "bundle install --deployment"
after_success: bundle exec rake publish_build
script: rake test\[$TEST_SUITE] | true |
Other | emberjs | ember.js | 43d342e794d2c5bcd7e6a0b2e0c1cb252b752261.json | Use local npm packages for defeatureify.
Update to the latest `ember-dev` which requires `defeatureify` and
`yuidocjs` to be installed locally (previously these were required to be
global).
Also, adds a `package.json` to make installing as simple as `npm install`. | CONTRIBUTING.md | @@ -67,7 +67,7 @@ building Ember is quite simple.
```sh
cd ember.js
bundle install
-npm install -g defeatureify
+npm install
rake
```
| true |
Other | emberjs | ember.js | 43d342e794d2c5bcd7e6a0b2e0c1cb252b752261.json | Use local npm packages for defeatureify.
Update to the latest `ember-dev` which requires `defeatureify` and
`yuidocjs` to be installed locally (previously these were required to be
global).
Also, adds a `package.json` to make installing as simple as `npm install`. | Gemfile.lock | @@ -1,6 +1,6 @@
GIT
remote: https://github.com/emberjs/ember-dev.git
- revision: 353847a384c64ed7662419136a7aaaf39e9e7aa5
+ revision: 81d5486f625051710682711de177056885e64fce
branch: master
specs:
ember-dev (0.1)
@@ -33,7 +33,7 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- aws-sdk (1.22.1)
+ aws-sdk (1.24.0)
json (~> 1.4)
nokogiri (>= 1.4.4, < 1.6.0)
uuidtools (~> 2.1)
@@ -42,7 +42,7 @@ GEM
colored (1.2)
diff-lcs (1.2.4)
execjs (2.0.2)
- ffi (1.9.0)
+ ffi (1.9.3)
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
@@ -51,12 +51,11 @@ GEM
json (1.8.1)
kicker (2.6.1)
listen
- listen (2.1.1)
+ listen (2.2.0)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mime-types (1.25)
- multi_json (1.8.2)
nokogiri (1.5.10)
posix-spawn (0.3.6)
puma (2.6.0)
@@ -71,9 +70,9 @@ GEM
ffi (>= 0.5.0)
thor (0.18.1)
timers (1.1.0)
- uglifier (2.2.1)
+ uglifier (2.3.0)
execjs (>= 0.3.0)
- multi_json (~> 1.0, >= 1.0.2)
+ json (>= 1.8.0)
uuidtools (2.1.4)
PLATFORMS | true |
Other | emberjs | ember.js | 43d342e794d2c5bcd7e6a0b2e0c1cb252b752261.json | Use local npm packages for defeatureify.
Update to the latest `ember-dev` which requires `defeatureify` and
`yuidocjs` to be installed locally (previously these were required to be
global).
Also, adds a `package.json` to make installing as simple as `npm install`. | README.md | @@ -125,7 +125,7 @@ everything you need to get started.
2. Ensure that [Bundler](http://bundler.io/) is installed (`gem install bundler`).
3. Ensure that [Node.js](http://nodejs.org/) is installed.
4. Run `bundle install` to install the necessary ruby gems.
-5. Run `npm install -g defeatureify`.
+5. Run `npm install`.
6. Run `rake dist` to build Ember.js. The builds will be placed in the `dist/` directory.
# Contribution | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.