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
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
bin/publish_builds
@@ -9,7 +9,7 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then DISABLE_JSCS=true DISABLE_JSHINT=true ember build --environment=production fi - npm run docs # generate documentation to be published + npm run docs # Generate documentation to be published. ./bin/publish_to_s3.js ./bin/bower_ember_build fi
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
bin/publish_to_s3.js
@@ -9,7 +9,7 @@ // S3_SECRET_ACCESS_KEY // S3_ACCESS_KEY_ID // -// Once you have those you execute with the following: +// Once you have those, you execute with the following: // // ```sh // ./bin/publish_to_s3.js
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
bin/run-node-tests.js
@@ -2,7 +2,7 @@ global.QUnit = require('qunitjs'); -// adds test reporting +// Adds test reporting. var qe = require('qunit-extras'); qe.runInContext(global);
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
bin/run-sauce-tests.js
@@ -38,7 +38,7 @@ RSVP.resolve() return run('./node_modules/.bin/ember', [ 'sauce:connect' ]); }) .then(function() { - // calling testem directly here instead of `ember test` so that + // Calling testem directly here instead of `ember test` so that // we do not have to do a double build (by the time this is run // we have already ran `ember build`). return run('./node_modules/.bin/testem', [ 'ci', '-f', 'testem.dist.json', '--port', '7000' ]);
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
bin/run-tests.js
@@ -10,17 +10,17 @@ var finalhandler = require('finalhandler') var http = require('http') var serveStatic = require('serve-static') -// Serve up public/ftp folder +// Serve up public/ftp folder. var serve = serveStatic('./dist/', {'index': ['index.html', 'index.htm']}) -// Create server +// Create server. var server = http.createServer(function(req, res){ var done = finalhandler(req, res) serve(req, res, done) }) var PORT = 13141; -// Listen +// Listen. server.listen(PORT); function run(queryString) { @@ -107,8 +107,8 @@ function generateEachPackageTests() { } function generateBuiltTests() { - // container isn't publicly available - // ember-testing/ember-debug are stripped from prod/min + // Container isn't publicly available. + // ember-testing/ember-debug are stripped from prod/min. var common = 'skipPackage=container,ember-testing,ember-debug'; testFunctions.push(function() { return run(common + '&nojshint=true');
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
lib/jscs-rules/disallow-const-outside-module-scope.js
@@ -14,12 +14,12 @@ module.exports.prototype = { check: function(file, errors) { file.iterateNodesByType('VariableDeclaration', function(node) { if (node.parentNode.type === 'Program') { - // declaration is in root of module + // Declaration is in root of module. return; } if (node.parentNode.type === 'ExportNamedDeclaration' && node.parentNode.parentNode.type === 'Program') { - // declaration is a `export const foo = 'asdf'` in root of the module + // Declaration is a `export const foo = 'asdf'` in root of the module. return; }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
lib/jscs-rules/disallow-multiple-var-decl-with-assignment.js
@@ -20,7 +20,7 @@ module.exports.prototype = { check: function(file, errors) { file.iterateNodesByType('VariableDeclaration', function(node) { - // allow multiple var declarations in for statement + // Allow multiple var declarations in for statement // for (var i = 0, j = myArray.length; i < j; i++) {} if (node.parentNode.type === 'ForStatement') { return; }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/container/lib/container.js
@@ -95,7 +95,7 @@ Container.prototype = { twitter === twitter2; //=> true ``` - If singletons are not wanted an optional flag can be provided at lookup. + If singletons are not wanted, an optional flag can be provided at lookup. ```javascript var registry = new Registry(); @@ -122,7 +122,7 @@ Container.prototype = { }, /** - Given a fullName return the corresponding factory. + Given a fullName, return the corresponding factory. @private @method lookupFactory
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/container/lib/index.js
@@ -1,14 +1,14 @@ import Ember from 'ember-metal/core'; /* -Public api for the container is still in flux. -The public api, specified on the application namespace should be considered the stable api. +Public API for the container is still in flux. +The public API, specified on the application namespace should be considered the stable API. // @module container @private */ /* - Flag to enable/disable model factory injections (disabled by default) + Flag to enable/disable model factory injections (disabled by default). If model factory injections are enabled, models should not be accessed globally (only through `container.lookupFactory('model:modelName'))`); */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/container/lib/owner.js
@@ -42,8 +42,8 @@ export const OWNER = symbol('OWNER'); ``` @method getOwner - @param {Object} object A object with an owner. - @return {Object} an owner object. + @param {Object} object An object with an owner. + @return {Object} An owner object. @for Ember @public */ @@ -56,8 +56,8 @@ export function getOwner(object) { useful in some testing cases. @method setOwner - @param {Object} object A object with an owner. - @return {Object} an owner object. + @param {Object} object An object with an owner. + @return {Object} An owner object. @for Ember @public */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/application_instance_test.js
@@ -146,5 +146,5 @@ QUnit.test('unregistering a factory clears all cached instances of that factory' let postController2 = appInstance.lookup('controller:post'); assert.ok(postController2, 'lookup creates instance'); - assert.notStrictEqual(postController1, postController2, 'lookup creates a brand new instance, because previous one was reset'); + assert.notStrictEqual(postController1, postController2, 'lookup creates a brand new instance, because the previous one was reset'); });
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/application_test.js
@@ -63,7 +63,7 @@ QUnit.test('you cannot make a new application that is a parent of an existing ap }); }); -QUnit.test('you cannot make a new application that is a descendent of an existing application', function() { +QUnit.test('you cannot make a new application that is a descendant of an existing application', function() { expectAssertion(function() { run(function() { Application.create({ rootElement: '#one-child' }); @@ -122,7 +122,7 @@ QUnit.module('Ember.Application initialization', { } }); -QUnit.test('initialized application go to initial route', function() { +QUnit.test('initialized application goes to initial route', function() { run(function() { app = Application.create({ rootElement: '#qunit-fixture' @@ -159,7 +159,7 @@ QUnit.test('ready hook is called before routing begins', function() { var MyApplication = Application.extend({ ready() { registerRoute(this, 'index', function() { - ok(true, 'last-minite route is activated'); + ok(true, 'last-minute route is activated'); }); } });
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/dependency_injection/default_resolver_test.js
@@ -63,7 +63,7 @@ QUnit.test('the default resolver looks up templates in Ember.TEMPLATES', functio }); QUnit.test('the default resolver looks up basic name as no prefix', function() { - ok(Controller.detect(locator.lookup('controller:basic')), 'locator looksup correct controller'); + ok(Controller.detect(locator.lookup('controller:basic')), 'locator looks up correct controller'); }); function detectEqual(first, second, message) { @@ -126,7 +126,7 @@ QUnit.test('the default resolver resolves helpers on the namespace', function() expectDeprecation(function() { LegacyHTMLBarsBoundHelper = makeHTMLBarsBoundHelper(function() {}); - }, 'Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to using `Ember.Helper` or `Ember.Helper.helper`.'); + }, 'Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to use `Ember.Helper` or `Ember.Helper.helper`.'); application.ShorthandHelper = ShorthandHelper; application.CompleteHelper = CompleteHelper; @@ -141,7 +141,7 @@ QUnit.test('the default resolver resolves helpers on the namespace', function() equal(resolvedLegacyHTMLBars, LegacyHTMLBarsBoundHelper, 'resolves legacy HTMLBars bound helper'); }); -QUnit.test('the default resolver resolves to the same instance no matter the notation ', function() { +QUnit.test('the default resolver resolves to the same instance, no matter the notation ', function() { application.NestedPostController = Controller.extend({}); equal(locator.lookup('controller:nested-post'), locator.lookup('controller:nested_post'), 'looks up NestedPost controller on application');
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/engine_instance_test.js
@@ -52,5 +52,5 @@ QUnit.test('unregistering a factory clears all cached instances of that factory' let postController2 = engineInstance.lookup('controller:post'); assert.ok(postController2, 'lookup creates instance'); - assert.notStrictEqual(postController1, postController2, 'lookup creates a brand new instance, because previous one was reset'); + assert.notStrictEqual(postController1, postController2, 'lookup creates a brand new instance because previous one was reset'); });
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/initializers_test.js
@@ -34,7 +34,7 @@ QUnit.test('initializers require proper \'name\' and \'initialize\' properties', }); if (isEnabled('ember-application-visit')) { - QUnit.test('initializers that thorws causes the boot promise to reject with the error', function() { + QUnit.test('initializers that throw errors cause the boot promise to reject with the error', function() { QUnit.expect(2); QUnit.stop(); @@ -267,7 +267,7 @@ QUnit.test('initializers can have multiple dependencies', function () { ok(order.indexOf(c.name) < order.indexOf(afterC.name), 'c < afterC'); }); -QUnit.test('initializers set on Application subclasses should not be shared between apps', function() { +QUnit.test('initializers set on Application subclasses are not shared between apps', function() { var firstInitializerRunCount = 0; var secondInitializerRunCount = 0; var FirstApp = Application.extend(); @@ -367,7 +367,7 @@ QUnit.test('initializers are per-app', function() { }); }); -QUnit.test('initializers should be executed in their own context', function() { +QUnit.test('initializers are executed in their own context', function() { expect(1); var MyApplication = Application.extend(); @@ -387,7 +387,7 @@ QUnit.test('initializers should be executed in their own context', function() { }); }); -QUnit.test('initializers should throw a deprecation warning when receiving a second argument', function() { +QUnit.test('initializers throw a deprecation warning when receiving a second argument', function() { expect(1); var MyApplication = Application.extend();
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/instance_initializers_test.js
@@ -360,7 +360,7 @@ QUnit.test('initializers are run before ready hook', function() { }); }); -QUnit.test('initializers should be executed in their own context', function() { +QUnit.test('initializers are executed in their own context', function() { expect(1); var MyApplication = Application.extend(); @@ -381,7 +381,7 @@ QUnit.test('initializers should be executed in their own context', function() { }); }); -QUnit.test('Initializers get an instance on app reset', function() { +QUnit.test('initializers get an instance on app reset', function() { expect(2); var MyApplication = Application.extend();
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/reset_test.js
@@ -37,7 +37,7 @@ QUnit.test('Brings its own run-loop if not provided', function() { application.reset(); }); -QUnit.test('does not bring its own run loop if one is already provided', function() { +QUnit.test('Does not bring its own run loop if one is already provided', function() { expect(3); var didBecomeReady = false; @@ -273,7 +273,7 @@ QUnit.test('Ensure that the hashchange event listener is removed', function() { }); listeners = jQuery._data(jQuery(window)[0], 'events'); - equal(listeners['hashchange'].length, 1, 'hashchange event listener was setup'); + equal(listeners['hashchange'].length, 1, 'hashchange event listener was set up'); application.reset();
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-application/tests/system/visit_test.js
@@ -118,7 +118,7 @@ if (isEnabled('ember-application-visit')) { }); }); - QUnit.test('calling visit() on app without first calling boot() should boot the app', function(assert) { + QUnit.test('calling visit() on an app without first calling boot() should boot the app', function(assert) { let appBooted = 0; let instanceBooted = 0;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-debug/lib/handlers.js
@@ -6,7 +6,7 @@ export let HANDLERS = { }; export function generateTestAsFunctionDeprecation(source) { return `Calling \`${source}\` with a function argument is deprecated. Please ` + `use \`!!Constructor\` for constructors, or an \`IIFE\` to compute the test for deprecation. ` + - `In a future version functions will be treated as truthy values instead of being executed.`; + `In a future version, functions will be treated as truthy values instead of being executed.`; } function normalizeTest(test, source) {
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-debug/lib/index.js
@@ -112,7 +112,7 @@ setDebugFunction('info', function info() { @param {String} message A description of the deprecation. @param {Object} [options] The options object for Ember.deprecate. @param {Function} func The new function called to replace its deprecated counterpart. - @return {Function} a new function that wrapped the original function with a deprecation warning + @return {Function} A new function that wraps the original function with a deprecation warning @private */ setDebugFunction('deprecateFunc', function deprecateFunc(...args) { @@ -244,19 +244,19 @@ if (isEnabled('ember-debug-handlers')) { The handler function takes the following arguments: <ul> - <li> <code>message</code> - The message received from the deprecation call. </li> + <li> <code>message</code> - The message received from the deprecation call.</li> <li> <code>options</code> - An object passed in with the deprecation call containing additional information including:</li> <ul> - <li> <code>id</code> - an id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li> - <li> <code>until</code> - is the version number Ember the feature and deprecation will be removed in.</li> + <li> <code>id</code> - An id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li> + <li> <code>until</code> - The Ember version number the feature and deprecation will be removed in.</li> </ul> - <li> <code>next</code> - a function that calls into the previously registered handler.</li> + <li> <code>next</code> - A function that calls into the previously registered handler.</li> </ul> @public @static @method registerDeprecationHandler - @param handler {Function} a function to handle deprecation calls + @param handler {Function} A function to handle deprecation calls. @since 2.1.0 */ Ember.Debug.registerDeprecationHandler = registerDeprecationHandler; @@ -277,15 +277,15 @@ if (isEnabled('ember-debug-handlers')) { <li> <code>message</code> - The message received from the warn call. </li> <li> <code>options</code> - An object passed in with the warn call containing additional information including:</li> <ul> - <li> <code>id</code> - an id of the warning in the form of <code>package-name.specific-warning</code>.</li> + <li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li> </ul> - <li> <code>next</code> - a function that calls into the previously registered handler.</li> + <li> <code>next</code> - A function that calls into the previously registered handler.</li> </ul> @public @static @method registerWarnHandler - @param handler {Function} a function to handle warnings + @param handler {Function} A function to handle warnings. @since 2.1.0 */ Ember.Debug.registerWarnHandler = registerWarnHandler;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-debug/lib/warn.js
@@ -31,7 +31,7 @@ export let missingOptionsIdDeprecation = 'When calling `Ember.warn` you must pro @param {String} message A warning to display. @param {Boolean} test An optional boolean. If falsy, the warning will be displayed. - @param {Object} options An ojbect that can be used to pass a unique + @param {Object} options An object that can be used to pass a unique `id` for this warning. The `id` can be used by Ember debugging tools to change the behavior (raise, log, or silence) for that specific warning. The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-debug/tests/main_test.js
@@ -46,7 +46,7 @@ QUnit.test('Ember.deprecate does not throw if RAISE_ON_DEPRECATION is false', fu } }); -QUnit.test('Ember.deprecate re-sets deprecation level to RAISE if ENV.RAISE_ON_DEPRECATION is set', function(assert) { +QUnit.test('Ember.deprecate resets deprecation level to RAISE if ENV.RAISE_ON_DEPRECATION is set', function(assert) { assert.expect(2); Ember.ENV.RAISE_ON_DEPRECATION = false; @@ -153,7 +153,7 @@ QUnit.test('Ember.assert throws if second argument is falsy', function() { QUnit.test('Ember.assert does not throw if second argument is a function and it returns true', function(assert) { assert.expect(1); - // shouldn't trigger an assertion, but deprecation from using function as test is expected + // Shouldn't trigger an assertion, but deprecation from using function as test is expected. expectDeprecation( () => Ember.assert('Assertion is thrown', () => true), generateTestAsFunctionDeprecation('Ember.assert')
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-extension-support/lib/container_debug_adapter.js
@@ -28,7 +28,7 @@ import EmberObject from 'ember-runtime/system/object'; * `catalogEntriesByType` The adapter will need to be registered - in the application's container as `container-debug-adapter:main` + in the application's container as `container-debug-adapter:main`. Example: @@ -65,7 +65,7 @@ export default EmberObject.extend({ classes in the resolver for a given type. @method canCatalogEntriesByType - @param {String} type The type. e.g. "model", "controller", "route" + @param {String} type The type. e.g. "model", "controller", "route". @return {boolean} whether a list is available for this type. @public */ @@ -81,7 +81,7 @@ export default EmberObject.extend({ Returns the available classes a given type. @method catalogEntriesByType - @param {String} type The type. e.g. "model", "controller", "route" + @param {String} type The type. e.g. "model", "controller", "route". @return {Array} An array of strings. @public */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-extension-support/lib/data_adapter.js
@@ -35,7 +35,7 @@ import { getOwner } from 'container/owner'; * `observeRecord` The adapter will need to be registered - in the application's container as `dataAdapter:main` + in the application's container as `dataAdapter:main`. Example: @@ -72,7 +72,7 @@ export default EmberObject.extend({ containerDebugAdapter: undefined, /** - Number of attributes to send + The number of attributes to send as columns. (Enough to make the record identifiable). @@ -170,23 +170,23 @@ export default EmberObject.extend({ @public @method watchRecords - @param {String} modelName The model name + @param {String} modelName The model name. @param {Function} recordsAdded Callback to call to add records. Takes an array of objects containing wrapped records. The object should have the following properties: - columnValues: {Object} key and value of a table cell - object: {Object} the actual record object + columnValues: {Object} The key and value of a table cell. + object: {Object} The actual record object. @param {Function} recordsUpdated Callback to call when a record has changed. Takes an array of objects containing wrapped records. @param {Function} recordsRemoved Callback to call when a record has removed. Takes the following parameters: - index: the array index where the records were removed - count: the number of records removed + index: The array index where the records were removed. + count: The number of records removed. - @return {Function} Method to call to remove all observers + @return {Function} Method to call to remove all observers. */ watchRecords(modelName, recordsAdded, recordsUpdated, recordsRemoved) { var releaseMethods = emberA(); @@ -248,12 +248,12 @@ export default EmberObject.extend({ Detect whether a class is a model. Test that against the model class - of your persistence library + of your persistence library. @private @method detect - @param {Class} klass The class to test - @return boolean Whether the class is a model class or not + @param {Class} klass The class to test. + @return boolean Whether the class is a model class or not. */ detect(klass) { return false; @@ -264,10 +264,10 @@ export default EmberObject.extend({ @private @method columnsForType - @param {Class} type The model type + @param {Class} type The model type. @return {Array} An array of columns of the following format: - name: {String} name of the column - desc: {String} Humanized description (what would show in a table column name) + name: {String} The name of the column. + desc: {String} Humanized description (what would show in a table column name). */ columnsForType(type) { return emberA(); @@ -278,9 +278,9 @@ export default EmberObject.extend({ @private @method observeModelType - @param {String} modelName The model type name + @param {String} modelName The model type name. @param {Function} typesUpdated Called when a type is modified. - @return {Function} The function to call to remove observers + @return {Function} The function to call to remove observers. */ observeModelType(modelName, typesUpdated) { @@ -312,17 +312,17 @@ export default EmberObject.extend({ @private @method wrapModelType - @param {Class} klass A model class - @param {String} modelName Name of the class - @return {Object} contains the wrapped type and the function to remove observers + @param {Class} klass A model class. + @param {String} modelName Name of the class. + @return {Object} Contains the wrapped type and the function to remove observers Format: - type: {Object} the wrapped type + type: {Object} The wrapped type. The wrapped type has the following format: - name: {String} name of the type - count: {Integer} number of records available - columns: {Columns} array of columns to describe the record - object: {Class} the actual Model type class - release: {Function} The function to remove observers + name: {String} The name of the type. + count: {Integer} The number of records available. + columns: {Columns} An array of columns to describe the record. + object: {Class} The actual Model type class. + release: {Function} The function to remove observers. */ wrapModelType(klass, name) { var records = this.getRecords(klass, name); @@ -345,7 +345,7 @@ export default EmberObject.extend({ @private @method getModelTypes - @return {Array} Array of model types + @return {Array} Array of model types. */ getModelTypes() { var containerDebugAdapter = this.get('containerDebugAdapter'); @@ -357,7 +357,7 @@ export default EmberObject.extend({ types = this._getObjectsOnNamespaces(); } - // New adapters return strings instead of classes + // New adapters return strings instead of classes. types = emberA(types).map((name) => { return { klass: this._nameToClass(name), @@ -373,11 +373,11 @@ export default EmberObject.extend({ /** Loops over all namespaces and all objects - attached to them + attached to them. @private @method _getObjectsOnNamespaces - @return {Array} Array of model type strings + @return {Array} Array of model type strings. */ _getObjectsOnNamespaces() { var namespaces = emberA(Namespace.NAMESPACES); @@ -462,8 +462,8 @@ export default EmberObject.extend({ @private @method getRecordFilterValues - @param {Object} record The record instance - @return {Object} The filter values + @param {Object} record The record instance. + @return {Object} The filter values. */ getRecordFilterValues(record) { return {}; @@ -475,8 +475,8 @@ export default EmberObject.extend({ @private @method getRecordColor @param {Object} record The record instance - @return {String} The record's color - Possible options: black, red, blue, green + @return {String} The records color. + Possible options: black, red, blue, green. */ getRecordColor(record) { return null; @@ -488,7 +488,7 @@ export default EmberObject.extend({ @private @method observerRecord - @param {Object} record The record instance + @param {Object} record The record instance. @param {Function} recordUpdated The callback to call when a record is updated. @return {Function} The function to call to remove all observers. */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-extension-support/tests/container_debug_adapter_test.js
@@ -1,6 +1,6 @@ import run from 'ember-metal/run_loop'; import EmberController from 'ember-runtime/controllers/controller'; -import 'ember-extension-support'; // Must be required to export Ember.ContainerDebugAdapter +import 'ember-extension-support'; // Must be required to export Ember.ContainerDebugAdapter. import Application from 'ember-application/system/application'; var adapter, App, appInstance; @@ -13,7 +13,7 @@ function boot() { QUnit.module('Container Debug Adapter', { setup() { run(function() { - App = Application.create(); // ES6TODO: this comes from the ember-application package NOT ember-runtime + App = Application.create(); // ES6TODO: this comes from the ember-application package NOT ember-runtime. App.toString = function() { return 'App'; }; App.deferReadiness(); });
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/helper.js
@@ -13,7 +13,7 @@ import Object from 'ember-runtime/system/object'; <div>{{format-currency cents currency="$"}}</div> ``` - Additionally a helper can be called as a nested helper (sometimes called a + Additionally, a helper can be called as a nested helper (sometimes called a subexpression). In this example, the computed value of a helper is passed to a component named `show-money`:
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/helpers.js
@@ -21,7 +21,7 @@ var helpers = new EmptyObject(); @method _registerHelper @for Ember.HTMLBars @param {String} name - @param {Object|Function} helperFunc the helper function to add + @param {Object|Function} helperFunc The helper function to add. */ export function registerHelper(name, helperFunc) { helpers[name] = helperFunc;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/helpers/-join-classes.js
@@ -1,5 +1,5 @@ /* - this private helper is used to join and compact a list of class names + This private helper is used to join and compact a list of class names. @private */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/helpers/-legacy-each-with-controller.js
@@ -7,7 +7,7 @@ export default function legacyEachWithControllerHelper(params, hash, blocks) { var list = params[0]; var keyPath = hash.key; - // TODO: Correct falsy semantics + // TODO: Correct falsy semantics. if (!list || get(list, 'length') === 0) { if (blocks.inverse.yield) { blocks.inverse.yield(); } return;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/helpers/-normalize-class.js
@@ -15,7 +15,7 @@ export default function normalizeClass(params, hash) { var { activeClass, inactiveClass } = hash; // When using the colon syntax, evaluate the truthiness or falsiness - // of the value to determine which className to return + // of the value to determine which className to return. if (activeClass || inactiveClass) { if (!!value) { return activeClass; @@ -26,7 +26,7 @@ export default function normalizeClass(params, hash) { // If value is a Boolean and true, return the dasherized property // name. } else if (value === true) { - // Only apply to last segment in the path + // Only apply to last segment in the path. if (propName && isPath(propName)) { var segments = propName.split('.'); propName = segments[segments.length - 1];
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/helpers/loc.js
@@ -33,7 +33,7 @@ import { loc } from 'ember-runtime/system/string'; @method loc @for Ember.Templates.helpers - @param {String} str The string to format + @param {String} str The string to format. @see {Ember.String#loc} @public */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/hooks/component.js
@@ -51,7 +51,7 @@ export default function componentHook(renderNode, env, scope, _tagName, params, } } - // Determine if this is an initial render or a re-render + // Determine if this is an initial render or a re-render. if (state.manager) { state.manager.rerender(env, attrs, visitor); return; @@ -91,13 +91,13 @@ export default function componentHook(renderNode, env, scope, _tagName, params, let isInvokedWithAngles = currentComponent && currentComponent._isAngleBracket; let isInvokedWithCurlies = currentComponent && !currentComponent._isAngleBracket; - // <div> at the top level of a <foo-bar> invocation + // <div> at the top level of a <foo-bar> invocation. let isComponentHTMLElement = isAngleBracket && !isDasherized && isInvokedWithAngles; - // <foo-bar> at the top level of a <foo-bar> invocation + // <foo-bar> at the top level of a <foo-bar> invocation. let isComponentIdentityElement = isAngleBracket && isTopLevel && tagName === env.view.tagName; - // <div> at the top level of a {{foo-bar}} invocation + // <div> at the top level of a {{foo-bar}} invocation. let isNormalHTMLElement = isAngleBracket && !isDasherized && isInvokedWithCurlies; let component, layout;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/hooks/get-cell-or-value.js
@@ -3,10 +3,10 @@ import { MUTABLE_REFERENCE } from 'ember-htmlbars/keywords/mut'; export default function getCellOrValue(ref) { if (ref && ref[MUTABLE_REFERENCE]) { - // reify the mutable reference into a mutable cell + // Reify the mutable reference into a mutable cell. return ref.cell(); } - // get the value out of the reference + // Get the value out of the reference. return read(ref); }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/hooks/get-child.js
@@ -10,7 +10,7 @@ export default function getChild(parent, key) { return parent.getKey(key); } - // This should only happen when we are looking at an `attrs` hash + // This should only happen when we are looking at an `attrs` hash. // That might change if it is possible to pass object literals // through the templating system. return parent[key];
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/hooks/invoke-helper.js
@@ -4,10 +4,10 @@ import subscribe from 'ember-htmlbars/utils/subscribe'; export default function invokeHelper(morph, env, scope, visitor, params, hash, helper, templates, context) { var helperStream = buildHelperStream(helper, params, hash, templates, env, scope); - // Ember.Helper helpers are pure values, thus linkable + // Ember.Helper helpers are pure values, thus linkable. if (helperStream.linkable) { if (morph) { - // When processing an inline expression the params and hash have already + // When processing an inline expression, the params and hash have already // been linked. Thus, HTMLBars will not link the returned helperStream. // We subscribe the morph to the helperStream here, and also subscribe // the helperStream to any params. @@ -28,6 +28,6 @@ export default function invokeHelper(morph, env, scope, visitor, params, hash, h return { link: true, value: helperStream }; } - // Built-in helpers are not linkable, they must run every rerender + // Built-in helpers are not linkable. They must run on every rerender. return { value: helperStream.value() }; }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/hooks/link-render-node.js
@@ -30,7 +30,7 @@ export default function linkRenderNode(renderNode, env, scope, path, params, has } } - // If has a dot in the path, we need to subscribe to the arguments in the + // If there is a dot in the path, we need to subscribe to the arguments in the // closure component as well. if (CONTAINS_DOT_CACHE.get(path)) { @@ -58,7 +58,7 @@ export default function linkRenderNode(renderNode, env, scope, path, params, has } } - // The params and hash can be reused; they don't need to be + // The params and hash can be reused. They don't need to be // recomputed on subsequent re-renders because they are // streams. return true;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/hooks/will-cleanup-tree.js
@@ -3,7 +3,7 @@ export default function willCleanupTree(env) { // When we go to clean up the render node and all of its children, we may // encounter views/components associated with those nodes along the way. In - // those cases, we need to make sure we need to sever the link between the + // those cases, we need to sever the link between the // existing view hierarchy and those views. // // However, we do *not* need to remove the child views of child views, since
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/index.js
@@ -133,12 +133,12 @@ import { setTemplates } from 'ember-htmlbars/template_registry'; -// importing adds template bootstrapping -// initializer to enable embedded templates +// Importing adds template bootstrapping +// initializer to enable embedded templates. import 'ember-htmlbars/system/bootstrap'; -// importing ember-htmlbars/compat updates the -// Ember.Handlebars global if htmlbars is enabled +// Importing ember-htmlbars/compat updates the +// Ember.Handlebars global if htmlbars is enabled. import 'ember-htmlbars/compat'; registerHelper('if', ifHelper);
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords.js
@@ -21,7 +21,7 @@ var keywords = Object.create(hooks.keywords); @method _registerHelper @for Ember.HTMLBars @param {String} name - @param {Object|Function} keyword the keyword to add + @param {Object|Function} keyword The keyword to add. */ export function registerKeyword(name, keyword) { keywords[name] = keyword;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/closure-component.js
@@ -40,9 +40,9 @@ export default function closureComponent(env, [path, ...params], hash) { s.addDependency(path); // FIXME: If the stream invalidates on every params or hash change, then - // the {{component helper will be forces to rerender the whole component + // the {{component helper will be forced to re-render the whole component // each time. Instead, these dependencies should not be required and the - // element component keyword should add the params and hash as dependencies + // element component keyword should add the params and hash as dependencies. params.forEach(item => s.addDependency(item)); Object.keys(hash).forEach(key => s.addDependency(hash[key])); @@ -77,7 +77,7 @@ export function isComponentCell(component) { } function createNestedClosureComponentCell(componentCell, params, hash) { - // This needs to be done in each nesting level to avoid raising assertions + // This needs to be done in each nesting level to avoid raising assertions. processPositionalParamsFromCell(componentCell, params, hash); return { @@ -97,7 +97,7 @@ export function processPositionalParamsFromCell(componentCell, params, hash) { function createNewClosureComponentCell(env, componentPath, params, hash) { let positionalParams = getPositionalParams(env.owner, componentPath); - // This needs to be done in each nesting level to avoid raising assertions + // This needs to be done in each nesting level to avoid raising assertions. processPositionalParams(null, positionalParams, params, hash); return {
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/collection.js
@@ -35,7 +35,7 @@ import assign from 'ember-metal/assign'; ```javascript App = Ember.Application.create(); App.ApplicationRoute = Ember.Route.extend({ - model: function() { + model() { return [{name: 'Yehuda'},{name: 'Tom'},{name: 'Peter'}]; } }); @@ -53,8 +53,8 @@ import assign from 'ember-metal/assign'; ### Non-block version of collection - If you provide an `itemViewClass` option that has its own `template` you may - omit the block. + If you provide an `itemViewClass` option that has its own `template`, + then you may omit the block. The following template: @@ -68,7 +68,7 @@ import assign from 'ember-metal/assign'; ```javascript App = Ember.Application.create(); App.ApplicationRoute = Ember.Route.extend({ - model: function() { + model() { return [{name: 'Yehuda'},{name: 'Tom'},{name: 'Peter'}]; } });
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/get.js
@@ -22,7 +22,7 @@ function labelFor(source, key) { let DynamicKeyStream = BasicStream.extend({ init(source, keySource) { - // used to get the original path for debugging purposes + // Used to get the original path for debugging purposes. var label = labelFor(source, keySource); this.label = label;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/legacy-yield.js
@@ -5,7 +5,7 @@ export default function legacyYield(morph, env, _scope, params, hash, template, let block = scope.getBlock('default'); if (block.arity === 0) { - // Typically, the `controller` local is persists through lexical scope. + // Typically, the `controller` local persists through lexical scope. // However, in this case, the `{{legacy-yield}}` in the legacy each view // needs to override the controller local for the template it is yielding. // This megahaxx allows us to override the controller, and most importantly,
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/mut.js
@@ -62,7 +62,7 @@ let MutStream = ProxyStream.extend({ ```javascript // my-child.js export default Component.extend({ - click: function() { + click() { this.attrs.childClickCount.update(this.attrs.childClickCount.value + 1); } });
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/outlet.js
@@ -12,7 +12,7 @@ import isEnabled from 'ember-metal/features'; topLevelViewTemplate.meta.revision = 'Ember@VERSION_STRING_PLACEHOLDER'; /** - The `{{outlet}}` helper lets you specify where a child routes will render in + The `{{outlet}}` helper lets you specify where a child route will render in your template. An important use of the `{{outlet}}` helper is in your application's `application.hbs` file: @@ -176,7 +176,7 @@ function isStable(a, b) { b = b.render; for (var key in a) { if (a.hasOwnProperty(key)) { - // name is only here for logging & debugging. If two different + // Name is only here for logging & debugging. If two different // names result in otherwise identical states, they're still // identical. if (a[key] !== b[key] && key !== 'name') {
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/keywords/partial.js
@@ -43,7 +43,7 @@ import { internal } from 'htmlbars-runtime'; @method partial @for Ember.Templates.helpers - @param {String} partialName the name of the template to render minus the leading underscore + @param {String} partialName The name of the template to render minus the leading underscore. @public */
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/system/append-templated-view.js
@@ -22,7 +22,6 @@ export default function appendTemplatedView(parentView, morph, viewClassOrInstan // We only want to override the `_context` computed property if there is // no specified controller. See View#_context for more information. - var noControllerInProto = !viewProto.controller; if (viewProto.controller && viewProto.controller.isDescriptor) { noControllerInProto = true; } if (noControllerInProto &&
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/system/bootstrap.js
@@ -42,7 +42,7 @@ function bootstrap(ctx) { jQuery(selectors, ctx) .each(function() { - // Get a reference to the script tag + // Get a reference to the script tag. var script = jQuery(this); // Get the name of the script, used by Ember.View's templateName property. @@ -60,15 +60,15 @@ function bootstrap(ctx) { }); } - // Check if template of same name already exists + // Check if template of same name already exists. if (hasTemplate(templateName)) { throw new EmberError('Template named "' + templateName + '" already exists.'); } - // For templates which have a name, we save them and then remove them from the DOM + // For templates which have a name, we save them and then remove them from the DOM. registerTemplate(templateName, template); - // Remove script tag from DOM + // Remove script tag from DOM. script.remove(); }); }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/system/instrumentation-support.js
@@ -9,10 +9,10 @@ import { Wrap your node manager's render and re-render methods with this function. - @param {Object} component Component or View instance (optional) - @param {Function} callback The function to instrument - @param {Object} context The context to call the function with - @return {Object} Return value from the invoked callback + @param {Object} component Component or View instance (optional). + @param {Function} callback The function to instrument. + @param {Object} context The context to call the function with. + @return {Object} Return value from the invoked callback. @private */ export function instrument(component, callback, context) {
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/system/lookup-helper.js
@@ -23,13 +23,13 @@ export function validateLazyHelperName(helperName, container, keywords) { * Look for a registered helper * If a dash exists in the name: - * Look for a helper registed in the container + * Look for a helper registed in the container. * Use Ember.ComponentLookup to find an Ember.Component that resolves - to the given name + to the given name. @private @method resolveHelper - @param {String} name the name of the helper to lookup + @param {String} name The name of the helper to lookup. @return {Helper} */ function _findHelper(name, view, env, options) { @@ -58,12 +58,12 @@ export function findHelper(name, view, env) { let localHelper = _findHelper(name, view, env, options); - // local match found, use it + // Local match found, use it. if (localHelper) { return localHelper; } - // fallback to global + // Fall back to global. return _findHelper(name, view, env); }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/system/make_bound_helper.js
@@ -7,7 +7,7 @@ import { helper } from 'ember-htmlbars/helper'; /** Create a bound helper. Accepts a function that receives the ordered and hash parameters - from the template. If a bound property was provided in the template it will be resolved to its + from the template. If a bound property was provided in the template, it will be resolved to its value and any changes to the bound property cause the helper function to be re-run with the updated values. @@ -50,7 +50,7 @@ import { helper } from 'ember-htmlbars/helper'; */ export default function makeBoundHelper(fn) { deprecate( - 'Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to using `Ember.Helper` or `Ember.Helper.helper`.', + 'Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to use `Ember.Helper` or `Ember.Helper.helper`.', false, { id: 'ember-htmlbars.make-bound-helper', until: '3.0.0' } );
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/template_registry.js
@@ -1,6 +1,6 @@ // STATE within a module is frowned apon, this exists // to support Ember.TEMPLATES but shield ember internals from this legacy -// global API +// global API. let TEMPLATES = {}; export function setTemplates(templates) {
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/utils/is-component.js
@@ -42,7 +42,7 @@ export default function isComponent(env, scope, path) { let moduleName = env.meta && env.meta.moduleName; if (!moduleName) { - // without a source moduleName we can not perform local lookups + // Without a source moduleName, we can not perform local lookups. return false; }
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-htmlbars/lib/utils/string.js
@@ -19,7 +19,7 @@ import { SafeString, escapeExpression } from 'htmlbars-util'; @method htmlSafe @for Ember.String @static - @return {Handlebars.SafeString} a string that will not be html escaped by Handlebars + @return {Handlebars.SafeString} A string that will not be HTML escaped by Handlebars. @public */ function htmlSafe(str) {
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-metal-views/lib/htmlbars-renderer.js
@@ -45,7 +45,7 @@ Renderer.prototype.prerenderTopLevelView = Renderer.prototype.renderTopLevelView = function Renderer_renderTopLevelView(view, renderNode) { - // Check to see if insertion has been canceled + // Check to see if insertion has been canceled. if (view._willInsert) { view._willInsert = false; this.prerenderTopLevelView(view, renderNode); @@ -126,7 +126,7 @@ Renderer.prototype.clearRenderedViews = env.renderedViews.length = 0; }; -// This entry point is called from top-level `view.appendTo` +// This entry point is called from top-level `view.appendTo`. Renderer.prototype.appendTo = function Renderer_appendTo(view, target) { var morph = this._dom.appendMorph(target); @@ -162,24 +162,24 @@ Renderer.prototype.didCreateElement = function (view, element) { Renderer.prototype.willInsertElement = function (view) { if (view.trigger) { view.trigger('willInsertElement'); } -}; // will place into DOM +}; // Will place into DOM. Renderer.prototype.setAttrs = function (view, attrs) { set(view, 'attrs', attrs); -}; // set attrs the first time +}; // Set attrs the first time. Renderer.prototype.componentInitAttrs = function (component, attrs) { component.trigger('didInitAttrs', { attrs }); component.trigger('didReceiveAttrs', { newAttrs: attrs }); -}; // set attrs the first time +}; // Set attrs the first time. Renderer.prototype.didInsertElement = function (view) { if (view._transitionTo) { view._transitionTo('inDOM'); } if (view.trigger) { view.trigger('didInsertElement'); } -}; // inDOM // placed into DOM +}; // inDOM // Placed into DOM. Renderer.prototype.didUpdate = function (view) { if (view.trigger) { view.trigger('didUpdate'); } @@ -191,7 +191,7 @@ Renderer.prototype.didRender = function (view) { Renderer.prototype.updateAttrs = function (view, attrs) { this.setAttrs(view, attrs); -}; // setting new attrs +}; // Setting new attrs. Renderer.prototype.componentUpdateAttrs = function (component, newAttrs) { let oldAttrs = null; @@ -279,4 +279,6 @@ Renderer.prototype.didDestroyElement = function (view) { if (view.trigger) { view.trigger('didDestroyElement'); } -}; // element destroyed so view.destroy shouldn't try to remove it removedFromDOM +}; // Element destroyed so view.destroy shouldn't try to remove it removedFromDOM + +export default Renderer;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-metal/lib/alias.js
@@ -76,6 +76,6 @@ function AliasedProperty_oneWaySet(obj, keyName, value) { return set(obj, keyName, value); } -// Backwards compatibility with Ember Data +// Backwards compatibility with Ember Data. AliasedProperty.prototype._meta = undefined; AliasedProperty.prototype.meta = ComputedProperty.prototype.meta;
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-metal/lib/binding.js
@@ -99,7 +99,7 @@ Binding.prototype = { `get()` - see that method for more information. @method from - @param {String} path the property path to connect to + @param {String} path The property path to connect to. @return {Ember.Binding} `this` @public */ @@ -118,7 +118,7 @@ Binding.prototype = { `get()` - see that method for more information. @method to - @param {String|Tuple} path A property path or tuple + @param {String|Tuple} path A property path or tuple. @return {Ember.Binding} `this` @public */ @@ -173,10 +173,10 @@ Binding.prototype = { var toPath = this._to; trySet(obj, toPath, getWithGlobals(obj, fromPath)); - // add an observer on the object to be notified when the binding should be updated + // Add an observer on the object to be notified when the binding should be updated. addObserver(obj, fromPath, this, this.fromDidChange); - // if the binding is a two-way binding, also set up an observer on the target + // If the binding is a two-way binding, also set up an observer on the target. if (!this._oneWay) { addObserver(obj, toPath, this, this.toDidChange); } @@ -200,37 +200,37 @@ Binding.prototype = { var twoWay = !this._oneWay; - // remove an observer on the object so we're no longer notified of + // Remove an observer on the object so we're no longer notified of // changes that should update bindings. removeObserver(obj, this._from, this, this.fromDidChange); - // if the binding is two-way, remove the observer from the target as well + // If the binding is two-way, remove the observer from the target as well. if (twoWay) { removeObserver(obj, this._to, this, this.toDidChange); } - this._readyToSync = false; // disable scheduled syncs... + this._readyToSync = false; // Disable scheduled syncs... return this; }, // .......................................................... // PRIVATE // - /* called when the from side changes */ + /* Called when the from side changes. */ fromDidChange(target) { this._scheduleSync(target, 'fwd'); }, - /* called when the to side changes */ + /* Called when the to side changes. */ toDidChange(target) { this._scheduleSync(target, 'back'); }, _scheduleSync(obj, dir) { var existingDir = this._direction; - // if we haven't scheduled the binding yet, schedule it + // If we haven't scheduled the binding yet, schedule it. if (existingDir === undefined) { run.schedule('sync', this, this._sync, obj); this._direction = dir; @@ -246,19 +246,19 @@ Binding.prototype = { _sync(obj) { var log = Ember.LOG_BINDINGS; - // don't synchronize destroyed objects or disconnected bindings + // Don't synchronize destroyed objects or disconnected bindings. if (obj.isDestroyed || !this._readyToSync) { return; } - // get the direction of the binding for the object we are - // synchronizing from + // Get the direction of the binding for the object we are + // synchronizing from. var direction = this._direction; var fromPath = this._from; var toPath = this._to; this._direction = undefined; - // if we're synchronizing from the remote object... + // If we're synchronizing from the remote object... if (direction === 'fwd') { var fromValue = getWithGlobals(obj, this._from); if (log) { @@ -271,7 +271,7 @@ Binding.prototype = { trySet(obj, toPath, fromValue); }); } - // if we're synchronizing *to* the remote object + // If we're synchronizing *to* the remote object. } else if (direction === 'back') { var toValue = get(obj, this._to); if (log) { @@ -321,7 +321,7 @@ mixinProperties(Binding, { An `Ember.Binding` connects the properties of two objects so that whenever the value of one property changes, the other property will be changed also. - ## Automatic Creation of Bindings with `/^*Binding/`-named Properties + ## Automatic Creation of Bindings with `/^*Binding/`-named Properties. You do not usually create Binding objects directly but instead describe bindings in your class or object definition using automatic binding @@ -370,7 +370,7 @@ mixinProperties(Binding, { All of the examples above show you how to configure a custom binding, but the result of these customizations will be a binding template, not a fully active Binding instance. The binding will actually become active only when you - instantiate the object the binding belongs to. It is useful however, to + instantiate the object the binding belongs to. It is useful, however, to understand what actually happens when the binding is activated. For a binding to function it must have at least a `from` property and a `to`
true
Other
emberjs
ember.js
36bb816ae8fac449a09916a5c65cd5049d93bdc4.json
Fix misc typos and grammar
packages/ember-metal/lib/streams/utils.js
@@ -2,13 +2,13 @@ import { assert } from 'ember-metal/debug'; import BasicStream, { Stream } from './stream'; /* - Check whether an object is a stream or not + Check whether an object is a stream or not. @private @for Ember.stream @function isStream - @param {Object|Stream} object object to check whether it is a stream - @return {Boolean} `true` if the object is a stream, `false` otherwise + @param {Object|Stream} object Object to check whether it is a stream. + @return {Boolean} `true` if the object is a stream, `false` otherwise. */ export function isStream(object) { return object && object.isStream; @@ -21,10 +21,10 @@ export function isStream(object) { @public @for Ember.stream @function subscribe - @param {Object|Stream} object object or stream to potentially subscribe to - @param {Function} callback function to run when stream value changes + @param {Object|Stream} object Object or stream to potentially subscribe to. + @param {Function} callback Function to run when stream value changes. @param {Object} [context] the callback will be executed with this context if it - is provided + is provided. */ export function subscribe(object, callback, context) { if (object && object.isStream) { @@ -39,9 +39,9 @@ export function subscribe(object, callback, context) { @private @for Ember.stream @function unsubscribe - @param {Object|Stream} object object or stream to potentially unsubscribe from - @param {Function} callback function originally passed to `subscribe()` - @param {Object} [context] object originally passed to `subscribe()` + @param {Object|Stream} object Object or stream to potentially unsubscribe from. + @param {Function} callback Function originally passed to `subscribe()`. + @param {Object} [context] Object originally passed to `subscribe()`. */ export function unsubscribe(object, callback, context) { if (object && object.isStream) { @@ -50,14 +50,14 @@ export function unsubscribe(object, callback, context) { } /* - Retrieve the value of a stream, or in the case a non-stream object is passed, + Retrieve the value of a stream, or in the case where a non-stream object is passed, return the object itself. @private @for Ember.stream @function read - @param {Object|Stream} object object to return the value of - @return the stream's current value, or the non-stream object itself + @param {Object|Stream} object Object to return the value of. + @return The stream's current value, or the non-stream object itself. */ export function read(object) { if (object && object.isStream) { @@ -74,7 +74,7 @@ export function read(object) { @for Ember.stream @function readArray @param {Array} array The array to read values from - @return {Array} a new array of the same length with the values of non-stream + @return {Array} A new array of the same length with the values of non-stream objects mapped from their original positions untouched, and the values of stream objects retaining their original position and replaced with the stream's current value. @@ -95,8 +95,8 @@ export function readArray(array) { @private @for Ember.stream @function readHash - @param {Object} object The hash to read keys and values from - @return {Object} a new object with the same keys as the passed object. The + @param {Object} object The hash to read keys and values from. + @return {Object} A new object with the same keys as the passed object. The property values in the new object are the original values in the case of non-stream objects, and the streams' current values in the case of stream objects. @@ -110,14 +110,14 @@ export function readHash(object) { } /* - Check whether an array contains any stream values + Check whether an array contains any stream values. @private @for Ember.stream @function scanArray - @param {Array} array array given to a handlebars helper + @param {Array} array Array given to a handlebars helper. @return {Boolean} `true` if the array contains a stream/bound value, `false` - otherwise + otherwise. */ export function scanArray(array) { var length = array.length; @@ -134,14 +134,14 @@ export function scanArray(array) { } /* - Check whether a hash has any stream property values + Check whether a hash has any stream property values. @private @for Ember.stream @function scanHash - @param {Object} hash "hash" argument given to a handlebars helper + @param {Object} hash "hash" argument given to a handlebars helper. @return {Boolean} `true` if the object contains a stream/bound value, `false` - otherwise + otherwise. */ export function scanHash(hash) { var containsStream = false; @@ -161,8 +161,8 @@ let ConcatStream = BasicStream.extend({ this.array = array; this.separator = separator; - // used by angle bracket components to detect an attribute was provided - // as a string literal + // Used by angle bracket components to detect an attribute was provided + // as a string literal. this.isConcat = true; }, @@ -177,17 +177,17 @@ let ConcatStream = BasicStream.extend({ }); /* - Join an array, with any streams replaced by their current values + Join an array, with any streams replaced by their current values. @private @for Ember.stream @function concat @param {Array} array An array containing zero or more stream objects and - zero or more non-stream objects - @param {String} separator string to be used to join array elements + zero or more non-stream objects. + @param {String} separator String to be used to join array elements. @return {String} String with array elements concatenated and joined by the provided separator, and any stream array members having been - replaced by the current value of the stream + replaced by the current value of the stream. */ export function concat(array, separator) { // TODO: Create subclass ConcatStream < Stream. Defer @@ -322,9 +322,9 @@ export function zipHash(object, callback, label) { @private @for Ember.stream @function chain - @param {Object|Stream} value A stream or non-stream object - @param {Function} fn function to be run when the stream value changes, or to - be run once in the case of a non-stream object + @param {Object|Stream} value A stream or non-stream object. + @param {Function} fn Function to be run when the stream value changes, or to + be run once in the case of a non-stream object. @return {Object|Stream} In the case of a stream `value` parameter, a new stream that will be updated with the return value of the provided function `fn`. In the case of a
true
Other
emberjs
ember.js
a0b7b680f2eaec53580b628ecd7eab2b42ba2abb.json
Build script improvements - [x] The current verison of phantomjs no longer prints noisy messages to stderr, dropping the check - [x] Don't supress phantomjs error message when it crashes - [x] Retry up to 3 times when phantomjs crashes - [x] Use `minidump_stackwalk` to print the phantomjs stack trace when it crashes
.travis.yml
@@ -10,18 +10,33 @@ cache: - node_modules - bower_components - persistent-filter-caches + - phantomjs before_install: - "npm config set spin false" - "npm --version" - "phantomjs --version" + - "rm -f /tmp/*.dmp" + - "mkdir -p phantomjs" + - > + if [ ! -d ./phantomjs/`phantomjs --version`-linux-x86_64-symbols ]; then + wget -O /tmp/phantomjs-`phantomjs --version`-linux-x86_64-symbols.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-`phantomjs --version`-linux-x86_64-symbols.tar.bz2 && + tar -xjvf /tmp/phantomjs-`phantomjs --version`-linux-x86_64-symbols.tar.bz2 -C ./phantomjs; + fi install: - "npm install" after_success: - "./bin/publish_builds" +after_failure: + - "cd ./phantomjs/phantomjs-`phantomjs --version`-linux-x86_64-symbols" + - > + for i in /tmp/*.dmp; do + ./minidump_stackwalk $i . 2>/dev/null; + done + script: - npm test
true
Other
emberjs
ember.js
a0b7b680f2eaec53580b628ecd7eab2b42ba2abb.json
Build script improvements - [x] The current verison of phantomjs no longer prints noisy messages to stderr, dropping the check - [x] Don't supress phantomjs error message when it crashes - [x] Retry up to 3 times when phantomjs crashes - [x] Use `minidump_stackwalk` to print the phantomjs stack trace when it crashes
bin/run-tests.js
@@ -6,21 +6,6 @@ var chalk = require('chalk'); var packages = require('../lib/packages'); var runInSequence = require('../lib/run-in-sequence'); -function shouldPrint(inputString) { - var skipStrings = [ - "*** WARNING: Method userSpaceScaleFactor", - "CoreText performance note:", - ]; - - for (var i = 0; i < skipStrings.length; i++) { - if (inputString.indexOf(skipStrings[i])) { - return false; - } - } - - return true; -} - var finalhandler = require('finalhandler') var http = require('http') var serveStatic = require('serve-static') @@ -40,48 +25,63 @@ server.listen(PORT); function run(queryString) { return new RSVP.Promise(function(resolve, reject) { - var args = [ - 'bower_components/qunit-phantom-runner/runner.js', - 'http://localhost:' + PORT + '/tests/?' + queryString - ]; - - console.log('Running: phantomjs ' + args.join(' ')); - - var child = spawn('phantomjs', args); - var result = {output: [], errors: [], code: null}; - - child.stdout.on('data', function (data) { - var string = data.toString(); - var lines = string.split('\n'); - - lines.forEach(function(line) { - if (line.indexOf('0 failed.') > -1) { - console.log(chalk.green(line)); - } else { - console.log(line); - } - }); - result.output.push(string); - }); + var url = 'http://localhost:' + PORT + '/tests/?' + queryString; + runInPhantom(url, 3, resolve, reject); + }); +} + +function runInPhantom(url, retries, resolve, reject) { + var args = ['bower_components/qunit-phantom-runner/runner.js', url]; + + console.log('Running: phantomjs ' + args.join(' ')); + + var crashed = false; + var child = spawn('phantomjs', args); + var result = {output: [], errors: [], code: null}; - child.stderr.on('data', function (data) { - var string = data.toString(); + child.stdout.on('data', function (data) { + var string = data.toString(); + var lines = string.split('\n'); - if (shouldPrint(string)) { - result.errors.push(string); - console.error(chalk.red(string)); + lines.forEach(function(line) { + if (line.indexOf('0 failed.') > -1) { + console.log(chalk.green(line)); + } else { + console.log(line); } }); + result.output.push(string); + }); + + child.stderr.on('data', function (data) { + var string = data.toString(); + + if (string.indexOf('PhantomJS has crashed.') > -1) { + crashed = true; + } - child.on('close', function (code) { - result.code = code; + result.errors.push(string); + console.error(chalk.red(string)); + }); + + child.on('close', function (code) { + result.code = code; + + if (!crashed && code === 0) { + resolve(result); + } else if (crashed) { + console.log(chalk.red('Phantom crashed with exit code ' + code)); - if (code === 0) { - resolve(result); + if (retries > 1) { + console.log(chalk.yellow('Retrying... ¯\_(ツ)_/¯')); + runInPhantom(url, retries - 1, resolve, reject); } else { + console.log(chalk.red('Giving up! (╯°□°)╯︵ ┻━┻')); reject(result); } - }); + } else { + reject(result); + } }); }
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-application/lib/system/application-instance.js
@@ -11,7 +11,7 @@ import run from 'ember-metal/run_loop'; import { computed } from 'ember-metal/computed'; import DOMHelper from 'ember-htmlbars/system/dom-helper'; import { buildFakeRegistryWithDeprecations } from 'ember-runtime/mixins/registry_proxy'; -import Renderer from 'ember-metal-views/renderer'; +import { Renderer } from 'ember-metal-views'; import assign from 'ember-metal/assign'; import environment from 'ember-metal/environment'; import RSVP from 'ember-runtime/ext/rsvp'; @@ -147,7 +147,7 @@ const ApplicationInstance = EngineInstance.extend({ registry.register('renderer:-dom', { create() { - return new Renderer(new DOMHelper(options.document), options.isInteractive); + return new Renderer(new DOMHelper(options.document), { destinedForDOM: options.isInteractive }); } });
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-application/lib/system/application.js
@@ -9,7 +9,7 @@ import { get } from 'ember-metal/property_get'; import { runLoadHooks } from 'ember-runtime/system/lazy_load'; import run from 'ember-metal/run_loop'; import Controller from 'ember-runtime/controllers/controller'; -import Renderer from 'ember-metal-views/renderer'; +import { Renderer } from 'ember-metal-views'; import DOMHelper from 'ember-htmlbars/system/dom-helper'; import SelectView from 'ember-views/views/select'; import { OutletView } from 'ember-routing-views/views/outlet';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/lib/ember-metal-views/index.js
@@ -0,0 +1,18 @@ +export class Renderer { + constructor(domHelper, { destinedForDOM, env } = {}) { + this._dom = domHelper; + this._env = env; + } + + appendTo(view, target) { + let env = this._env; + + env.begin(); + view.template.render({ view }, env, { appendTo: target }); + env.commit(); + } + + componentInitAttrs() { + // TODO: Remove me + } +}
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/lib/ember-template-compiler/system/compile.js
@@ -0,0 +1,22 @@ +import template from './template'; +import require, { has } from 'require'; + +let compileSpec; +let Template; + +export default function compile(string, options) { + if (!compileSpec && has('glimmer-compiler')) { + compileSpec = require('glimmer-compiler').compileSpec; + } + + if (!Template && has('glimmer-runtime')) { + Template = require('glimmer-runtime').Template; + } + + if (!compileSpec || !Template) { + throw new Error('Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.'); + } + + let templateSpec = template(compileSpec(string, options)); + return Template.fromSpec(templateSpec, options.env); +}
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/lib/ember-template-compiler/system/template.js
@@ -0,0 +1,3 @@ +export default function template(templateSpec) { + return JSON.parse(templateSpec); +}
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/tests/dummy_test.js
@@ -1,8 +0,0 @@ -QUnit.module('ember-glimmer: main'); - -QUnit.test('dummy test', function() { - // The test runner will exit with error if we don't have any tests in the - // package, so this is to convince the runner that everything is okay. - // Remove me once we started testing real things. - ok(true, 'it works'); -});
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/tests/integration/content-test.js
@@ -0,0 +1,10 @@ +import { RenderingTest, moduleFor } from '../utils/test-case'; + +moduleFor('Content tests', class extends RenderingTest { + + ['TEST: it can render static content']() { + this.render('hello'); + this.assertText('hello'); + } + +});
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/tests/utils/environment.js
@@ -0,0 +1 @@ +export { TestEnvironment as default } from 'glimmer-test-helpers';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/tests/utils/helpers.js
@@ -0,0 +1,3 @@ +export { DOMHelper } from 'glimmer-runtime'; +export { Renderer } from 'ember-glimmer/ember-metal-views'; +export { default as compile } from 'ember-glimmer/ember-template-compiler/system/compile';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/tests/utils/package-name.js
@@ -0,0 +1 @@ +export default 'glimmer';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-glimmer/tests/utils/test-case.js
@@ -0,0 +1,75 @@ +import packageName from './package-name'; +import Environment from './environment'; +import { compile, DOMHelper, Renderer } from './helpers'; +import { runAppend, runDestroy } from 'ember-runtime/tests/utils'; +import Component from 'ember-views/components/component'; +import jQuery from 'ember-views/system/jquery'; + +const packageTag = `${packageName.toUpperCase()}: `; + +export function moduleFor(description, TestClass) { + let context; + + QUnit.module(description, { + setup() { + context = new TestClass(); + }, + + teardown() { + context.teardown(); + } + }); + + Object.keys(TestClass.prototype).forEach(name => { + if (name.indexOf('TEST: ') === 0) { + QUnit.test(name.slice(5), assert => context[name](assert)); + } else if (name.indexOf('SKIP: ') === 0) { + QUnit.skip(name.slice(5), assert => context[name](assert)); + } else if (name.indexOf(packageTag) === 0) { + QUnit.test(name.slice(packageTag.length), assert => context[name](assert)); + } + }); +} + +let assert = QUnit.assert; + +export class TestCase { + teardown() {} +} + +export class RenderingTest extends TestCase { + constructor() { + super(); + let dom = new DOMHelper(document); + let env = this.env = new Environment(dom); + this.renderer = new Renderer(dom, { destinedForDOM: true, env }); + this.component = null; + } + + teardown() { + if (this.component) { + runDestroy(this.component); + } + } + + render(templateStr, context = {}) { + let { env, renderer } = this; + + let attrs = Object.assign({}, context, { + renderer, + template: compile(templateStr, { env }) + }); + + this.component = Component.create(attrs); + + runAppend(this.component); + } + + rerender() { + this.component.rerender(); + } + + assertText(text) { + assert.strictEqual(jQuery('#qunit-fixture').text(), text, `#qunit-fixture contents`); + } +}
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-htmlbars/lib/system/render-env.js
@@ -1,5 +1,5 @@ import defaultEnv from 'ember-htmlbars/env'; -import { MorphSet } from 'ember-metal-views/renderer'; +import { MorphSet } from 'ember-metal-views'; import { getOwner } from 'container/owner'; export default function RenderEnv(options) {
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-htmlbars/tests/attr_nodes/data_test.js
@@ -2,7 +2,7 @@ import EmberView from 'ember-views/views/view'; import run from 'ember-metal/run_loop'; import EmberObject from 'ember-runtime/system/object'; import compile from 'ember-template-compiler/system/compile'; -import Renderer from 'ember-metal-views/renderer'; +import { Renderer } from 'ember-metal-views'; import { equalInnerHTML } from 'htmlbars-test-helpers'; import { domHelper as dom } from 'ember-htmlbars/env'; import { runAppend, runDestroy } from 'ember-runtime/tests/utils';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-metal-views/lib/htmlbars-renderer.js
@@ -6,7 +6,7 @@ import setProperties from 'ember-metal/set_properties'; import buildComponentTemplate from 'ember-views/system/build-component-template'; import environment from 'ember-metal/environment'; -function Renderer(domHelper, destinedForDOM) { +export function Renderer(domHelper, { destinedForDOM } = {}) { this._dom = domHelper; // This flag indicates whether the resulting rendered element will be @@ -280,5 +280,3 @@ Renderer.prototype.didDestroyElement = function (view) { view.trigger('didDestroyElement'); } }; // element destroyed so view.destroy shouldn't try to remove it removedFromDOM - -export default Renderer;
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-metal-views/lib/index.js
@@ -1,2 +1 @@ -import Renderer from 'ember-metal-views/renderer'; -export { Renderer }; +export * from './htmlbars-renderer';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-views/lib/index.js
@@ -17,7 +17,7 @@ import { states } from 'ember-views/views/states'; -import Renderer from 'ember-metal-views/renderer'; +import { Renderer } from 'ember-metal-views'; import { DeprecatedCoreView } from 'ember-views/views/core_view'; import { DeprecatedView } from 'ember-views/views/view'; import { DeprecatedContainerView } from 'ember-views/views/container_view';
true
Other
emberjs
ember.js
b8786badc7dd018487ac131283a4a462fcbd6e49.json
Add a basic integration test for Glimmer This also setup that new testing infrastructure that would allow us to run the same tests on both Glimmer and HTMLBars.
packages/ember-views/lib/views/core_view.js
@@ -6,7 +6,7 @@ import Evented from 'ember-runtime/mixins/evented'; import ActionHandler, { deprecateUnderscoreActions } from 'ember-runtime/mixins/action_handler'; import { typeOf } from 'ember-runtime/utils'; -import Renderer from 'ember-metal-views/renderer'; +import { Renderer } from 'ember-metal-views'; import { cloneStates, states } from 'ember-views/views/states'; import { internal } from 'htmlbars-runtime'; import require from 'require';
true
Other
emberjs
ember.js
3d791dd0c9bb6b5190ae218cf2639e5e49bd4285.json
Add a toggle for hidding skipped tests
testem.dist.json
@@ -1,6 +1,6 @@ { "framework": "qunit", - "test_page": "dist/tests/index.html?hidepassed", + "test_page": "dist/tests/index.html?hidepassed&hideskipped", "timeout": 540, "parallel": 4, "disable_watching": true,
true
Other
emberjs
ember.js
3d791dd0c9bb6b5190ae218cf2639e5e49bd4285.json
Add a toggle for hidding skipped tests
tests/index.html
@@ -4,6 +4,11 @@ <meta charset="utf-8"> <title>Ember</title> <link rel="stylesheet" href="../qunit/qunit.css"> + <style type="text/css"> + #qunit-tests.hideskipped li.skipped { + display: none; + } + </style> <script src="../qunit/qunit.js"></script> <script src="/testem.js"></script> @@ -142,6 +147,8 @@ // Tests should time out after 15 seconds QUnit.config.testTimeout = 15000; + // Hide skipped tests + QUnit.config.urlConfig.push({ id: 'hideskipped', label: "Hide skipped tests"}); // Handle testing feature flags QUnit.config.urlConfig.push({ id: 'enableoptionalfeatures', label: "Enable Opt Features"}); // Handle extending prototypes @@ -151,6 +158,12 @@ // Handle JSHint QUnit.config.urlConfig.push('nojshint'); QUnit.config.urlConfig.push('forceskip'); + + QUnit.begin(function() { + if (QUnit.urlParams.hideskipped) { + $('#qunit-tests').addClass('hideskipped'); + } + }); })(); </script>
true
Other
emberjs
ember.js
978b11dd3d1ed89700e82cfac94778fe187c5850.json
Use master of glimmer for integration efforts. We will lock this down when we have made more progress.
package.json
@@ -32,7 +32,7 @@ "express": "^4.5.0", "finalhandler": "^0.4.0", "github": "^0.2.3", - "glimmer-engine": "tildeio/glimmer#integration", + "glimmer-engine": "tildeio/glimmer#master", "glob": "~4.3.2", "htmlbars": "0.14.13", "qunit-extras": "^1.4.0",
false
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/container/lib/container.js
@@ -185,10 +185,7 @@ function isSingleton(container, fullName) { return container.registry.getOption(fullName, 'singleton') !== false; } -function lookup(container, _fullName, _options) { - let options = _options || {}; - let fullName = _fullName; - +function lookup(container, fullName, options = {}) { if (isEnabled('ember-htmlbars-local-lookup')) { if (options.source) { fullName = container.registry.expandLocalLookup(fullName, options); @@ -249,10 +246,8 @@ function buildInjections(/* container, ...injections */) { return hash; } -function factoryFor(container, _fullName, _options) { - let options = _options || {}; +function factoryFor(container, fullName, options = {}) { let registry = container.registry; - let fullName = _fullName; if (isEnabled('ember-htmlbars-local-lookup')) { if (options.source) {
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/container/lib/registry.js
@@ -168,7 +168,7 @@ Registry.prototype = { @param {Function} factory @param {Object} options */ - register(fullName, factory, options) { + register(fullName, factory, options = {}) { assert('fullName must be a proper full name', this.validateFullName(fullName)); if (factory === undefined) { @@ -183,7 +183,7 @@ Registry.prototype = { delete this._failCache[normalizedName]; this.registrations[normalizedName] = factory; - this._options[normalizedName] = (options || {}); + this._options[normalizedName] = options; }, /** @@ -402,8 +402,7 @@ Registry.prototype = { @param {String} fullName @param {Object} options */ - options(fullName, _options) { - let options = _options || {}; + options(fullName, options = {}) { var normalizedName = this.normalize(fullName); this._options[normalizedName] = options; },
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-htmlbars/lib/node-managers/component-node-manager.js
@@ -35,16 +35,14 @@ export default ComponentNodeManager; ComponentNodeManager.create = function ComponentNodeManager_create(renderNode, env, options) { let { tagName, params, - attrs, + attrs = {}, parentView, parentScope, isAngleBracket, component, layout, templates } = options; - attrs = attrs || {}; - component = component || (isAngleBracket ? GlimmerComponent : LegacyEmberComponent); let createOptions = {
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-htmlbars/tests/glimmer-component/render-test.js
@@ -40,9 +40,7 @@ if (isEnabled('ember-htmlbars-component-generation')) { } function renderComponent(tag, component) { - let { params, hash, yielded, implementation } = component; - params = params || []; - hash = hash || {}; + let { params = [], hash = {}, yielded, implementation } = component; let stringParams = params.join(' '); let stringHash = Object.keys(hash) .map(key => `${key}=${hash[key]}`)
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-htmlbars/tests/helpers/loc_test.js
@@ -3,10 +3,10 @@ import EmberView from 'ember-views/views/view'; import compile from 'ember-template-compiler/system/compile'; import { runAppend, runDestroy } from 'ember-runtime/tests/utils'; -function buildView(template, context) { +function buildView(template, context = {}) { return EmberView.create({ template: compile(template), - context: (context || {}) + context }); }
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-routing/tests/system/router_test.js
@@ -9,9 +9,7 @@ import { setOwner } from 'container/owner'; var owner; -function createRouter(settings, options) { - options = options || {}; - +function createRouter(settings, options = {}) { var CustomRouter = Router.extend(); var router = CustomRouter.create(settings);
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-runtime/lib/mixins/target_action_support.js
@@ -113,8 +113,7 @@ var TargetActionSupport = Mixin.create({ @return {Boolean} true if the action was sent successfully and did not return false @private */ - triggerAction(opts) { - opts = opts || {}; + triggerAction(opts = {}) { var action = opts.action || get(this, 'action'); var target = opts.target || get(this, 'targetObject'); var actionContext = opts.actionContext;
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-runtime/lib/system/native_array.js
@@ -137,10 +137,9 @@ var A; if (Ember.EXTEND_PROTOTYPES === true || Ember.EXTEND_PROTOTYPES.Array) { NativeArray.apply(Array.prototype); - A = function (arr) { return arr || []; }; + A = function (arr = []) { return arr; }; } else { - A = function (arr) { - if (arr === undefined) { arr = []; } + A = function (arr = []) { return EmberArray.detect(arr) ? arr : NativeArray.apply(arr); }; }
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-runtime/tests/mixins/array_test.js
@@ -17,8 +17,8 @@ var TestArray = EmberObject.extend(EmberArray, { _content: null, - init(ary) { - this._content = ary || []; + init(ary = []) { + this._content = ary; }, // some methods to modify the array so we can test changes. Note that
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-runtime/tests/mixins/enumerable_test.js
@@ -18,8 +18,8 @@ var TestEnumerable = EmberObject.extend(Enumerable, { _content: null, - init(ary) { - this._content = ary || []; + init(ary = []) { + this._content = ary; }, addObject(obj) { @@ -347,4 +347,3 @@ QUnit.test('removing enumerable observer should disable', function() { obj.enumerableContentDidChange(); deepEqual(observer._after, null); }); -
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-runtime/tests/mixins/mutable_array_test.js
@@ -12,8 +12,8 @@ var TestMutableArray = EmberObject.extend(MutableArray, { _content: null, - init(ary) { - this._content = emberA(ary || []); + init(ary = []) { + this._content = emberA(ary); }, replace(idx, amt, objects) {
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-template-compiler/lib/plugins/assert-no-view-and-controller-paths.js
@@ -2,10 +2,10 @@ import Ember from 'ember-metal/core'; import { assert } from 'ember-metal/debug'; import calculateLocationDisplay from 'ember-template-compiler/system/calculate-location-display'; -function AssertNoViewAndControllerPaths(options) { +function AssertNoViewAndControllerPaths(options = {}) { // set later within HTMLBars to the syntax package this.syntax = null; - this.options = options || {}; + this.options = options; } /**
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-template-compiler/lib/plugins/assert-no-view-helper.js
@@ -2,10 +2,10 @@ import Ember from 'ember-metal/core'; import { assert } from 'ember-metal/debug'; import calculateLocationDisplay from 'ember-template-compiler/system/calculate-location-display'; -function AssertNoViewHelper(options) { +function AssertNoViewHelper(options = {}) { // set later within HTMLBars to the syntax package this.syntax = null; - this.options = options || {}; + this.options = options; } /**
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-template-compiler/lib/plugins/transform-each-in-to-hash.js
@@ -22,10 +22,10 @@ @class TransformEachInToHash @private */ -function TransformEachInToHash(options) { +function TransformEachInToHash(options = {}) { // set later within HTMLBars to the syntax package this.syntax = null; - this.options = options || {}; + this.options = options; } /**
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-template-compiler/lib/plugins/transform-input-on-to-onEvent.js
@@ -24,10 +24,10 @@ import calculateLocationDisplay from 'ember-template-compiler/system/calculate-l @private @class TransformInputOnToOnEvent */ -function TransformInputOnToOnEvent(options) { +function TransformInputOnToOnEvent(options = {}) { // set later within HTMLBars to the syntax package this.syntax = null; - this.options = options || {}; + this.options = options; } /**
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-template-compiler/lib/system/calculate-location-display.js
@@ -1,5 +1,4 @@ -export default function calculateLocationDisplay(moduleName, _loc) { - let loc = _loc || {}; +export default function calculateLocationDisplay(moduleName, loc = {}) { let { column, line } = loc.start || {}; let moduleInfo = ''; if (moduleName) {
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
packages/ember-views/lib/mixins/view_child_views_support.js
@@ -81,7 +81,7 @@ export default Mixin.create({ @return {Ember.View} new instance @private */ - createChildView(maybeViewClass, _attrs) { + createChildView(maybeViewClass, attrs = {}) { if (!maybeViewClass) { throw new TypeError('createChildViews first argument must exist'); } @@ -92,7 +92,6 @@ export default Mixin.create({ return maybeViewClass; } - var attrs = _attrs || {}; var view; attrs.parentView = this;
true
Other
emberjs
ember.js
586d4c6ab0a82abee0df1f331121e9c99433770e.json
Use default parameters Move to default parameters where appropriate
tests/node/component-rendering-test.js
@@ -44,11 +44,11 @@ QUnit.test("Component with dynamic value", function(assert) { assert.ok(html.match(/<h1>Hello World<\/h1>/)); }); -function buildComponent(template, props) { +function buildComponent(template, props = {}) { var Component = Ember.Component.extend({ renderer: new Ember._Renderer(new DOMHelper(new SimpleDOM.Document())), layout: compile(template) - }, props || {}); + }, props); return Component.create({ _domHelper: new DOMHelper(new SimpleDOM.Document()),
true
Other
emberjs
ember.js
f8d551721102c6b430a884bc256cf77c9edcff36.json
fix jshint warnings A recent version of jshint has begun finding problems that were missed by earlier versions. This cleans them up.
packages/ember-htmlbars/tests/attr_nodes/sanitized_test.js
@@ -56,6 +56,7 @@ var badTags = [ ]; for (var i = 0, l = badTags.length; i < l; i++) { + /* jshint -W083 */ (function() { var subject = badTags[i]; @@ -118,6 +119,7 @@ for (var i = 0, l = badTags.length; i < l; i++) { 'unsafe:javascript://example.com', 'attribute is output'); }); - })(); //jshint ignore:line + })(); + /* jshint +W083 */ } // jscs:enable disallowTrailingWhitespace
true
Other
emberjs
ember.js
f8d551721102c6b430a884bc256cf77c9edcff36.json
fix jshint warnings A recent version of jshint has begun finding problems that were missed by earlier versions. This cleans them up.
packages/ember-runtime/lib/ext/rsvp.js
@@ -1,5 +1,3 @@ -/* globals RSVP:true */ - import Ember from 'ember-metal/core'; import require, { has } from 'require'; import { assert } from 'ember-metal/debug';
true