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 | dd1851eea9fc6979570ba761cd1931c3a1ee7e57.json | Add support for #each foo in bar
This implementation takes on some new technical
debt, mostly caused by existing technical debt.
Because this is a very bad thing, we plan to work
on refactoring and paying down as much of the
templateData technical debt as possible tomorrow. | packages/ember-handlebars/tests/helpers/each_test.js | @@ -148,3 +148,29 @@ test("it works with the controller keyword", function() {
equal(view.$().text(), "foobarbaz");
});
+
+module("{{#each foo in bar}}");
+
+test("#each accepts a name binding and does not change the context", function() {
+ view = Ember.View.create({
+ template: templateFor("{{#each item in ... | true |
Other | emberjs | ember.js | dd1851eea9fc6979570ba761cd1931c3a1ee7e57.json | Add support for #each foo in bar
This implementation takes on some new technical
debt, mostly caused by existing technical debt.
Because this is a very bad thing, we plan to work
on refactoring and paying down as much of the
templateData technical debt as possible tomorrow. | packages/ember-handlebars/tests/views/collection_view_test.js | @@ -96,41 +96,6 @@ test("empty views should be removed when content is added to the collection (reg
Ember.run(function(){ window.App.destroy(); });
});
-test("collection helper should accept emptyViewClass attribute", function() {
- window.App = Ember.Application.create();
-
- App.EmptyView = Ember.View.extend(... | true |
Other | emberjs | ember.js | dd1851eea9fc6979570ba761cd1931c3a1ee7e57.json | Add support for #each foo in bar
This implementation takes on some new technical
debt, mostly caused by existing technical debt.
Because this is a very bad thing, we plan to work
on refactoring and paying down as much of the
templateData technical debt as possible tomorrow. | packages/ember-views/lib/views/collection_view.js | @@ -134,6 +134,15 @@ Ember.CollectionView = Ember.ContainerView.extend(
*/
content: null,
+ /**
+ @private
+
+ This provides metadata about what kind of empty view class this
+ collection would like if it is being instantiated from another
+ system (like Handlebars)
+ */
+ emptyViewClass: Ember.V... | true |
Other | emberjs | ember.js | dd1851eea9fc6979570ba761cd1931c3a1ee7e57.json | Add support for #each foo in bar
This implementation takes on some new technical
debt, mostly caused by existing technical debt.
Because this is a very bad thing, we plan to work
on refactoring and paying down as much of the
templateData technical debt as possible tomorrow. | packages/ember-views/lib/views/container_view.js | @@ -321,7 +321,10 @@ Ember.ContainerView = Ember.View.extend({
initializeViews: function(views, parentView, templateData) {
forEach(views, function(view) {
set(view, '_parentView', parentView);
- set(view, 'templateData', templateData);
+
+ if (!get(view, 'templateData')) {
+ set(view, '... | true |
Other | emberjs | ember.js | dd1851eea9fc6979570ba761cd1931c3a1ee7e57.json | Add support for #each foo in bar
This implementation takes on some new technical
debt, mostly caused by existing technical debt.
Because this is a very bad thing, we plan to work
on refactoring and paying down as much of the
templateData technical debt as possible tomorrow. | packages/ember-views/lib/views/view.js | @@ -721,6 +721,23 @@ Ember.View = Ember.Object.extend(Ember.Evented,
});
}, '_parentView'),
+ cloneKeywords: function() {
+ var templateData = get(this, 'templateData'),
+ controller = get(this, 'controller');
+
+ var keywords = templateData ? Ember.copy(templateData.keywords) : {};
+ keyword... | true |
Other | emberjs | ember.js | 8bdde5937e0a000da65b2458c272e1fac107c9ec.json | Add webhooks notification | .travis.yml | @@ -6,4 +6,5 @@ before_script:
- "sh -e /etc/init.d/xvfb start"
- "rake clean"
script: "rake test[all]"
-after_script: "rake upload_to_url"
+notifications:
+ webhooks: http://emberjs-uploader.herokuapp.com/upload | true |
Other | emberjs | ember.js | 8bdde5937e0a000da65b2458c272e1fac107c9ec.json | Add webhooks notification | Gemfile | @@ -5,10 +5,10 @@ gem "rake-pipeline-web-filters", :git => "https://github.com/wycats/rake-pipelin
gem "colored"
# Using git to prevent deprecation warnings
gem "uglifier", :git => "https://github.com/lautis/uglifier.git"
-gem "rest-client"
group :development do
gem "rack"
+ gem "rest-client"
gem "github_a... | true |
Other | emberjs | ember.js | 955b869dcc12413299dd8903ec63006fc336da31.json | Add gathering of credentials from ENV | .travis.yml | @@ -6,3 +6,4 @@ before_script:
- "sh -e /etc/init.d/xvfb start"
- "rake clean"
script: "rake test[all]"
+after_script: "rake upload_to_url" | true |
Other | emberjs | ember.js | 955b869dcc12413299dd8903ec63006fc336da31.json | Add gathering of credentials from ENV | Gemfile | @@ -5,10 +5,10 @@ gem "rake-pipeline-web-filters", :git => "https://github.com/wycats/rake-pipelin
gem "colored"
# Using git to prevent deprecation warnings
gem "uglifier", :git => "https://github.com/lautis/uglifier.git"
+gem "rest-client"
group :development do
gem "rack"
- gem "rest-client"
gem "github_a... | true |
Other | emberjs | ember.js | 955b869dcc12413299dd8903ec63006fc336da31.json | Add gathering of credentials from ENV | Rakefile | @@ -25,10 +25,12 @@ def setup_uploader
# git@github.com:emberjs/ember.js
repoUrl = origin.match(/github\.com[\/:]((.+?)\/(.+?))(\.git)?$/)
- username = repoUrl[2] # username part of origin url
- repo = repoUrl[3] # repository name part of origin url
+ username = ENV['GH_USERNAME'] || repoUrl[2] ... | true |
Other | emberjs | ember.js | 955b869dcc12413299dd8903ec63006fc336da31.json | Add gathering of credentials from ENV | lib/github_uploader.rb | @@ -3,12 +3,12 @@
class GithubUploader
- def initialize(login, username, repo, root=Dir.pwd)
+ def initialize(login, username, repo, token, root=Dir.pwd)
@login = login
@username = username
@repo = repo
@root = root
- @token = check_token
+ @token = token || check_token... | true |
Other | emberjs | ember.js | 00b8940af1c948dd1974be184e022269a87a461d.json | Add currentView property to Ember.ContainerView | packages/ember-views/lib/views/container_view.js | @@ -175,13 +175,34 @@ var childViewsProperty = Ember.computed(function() {
And the `Ember.View` instance stored in `aContainer.aView` will be removed from `aContainer`'s
`childViews` array.
-
## Templates and Layout
A `template`, `templateName`, `defaultTemplate`, `layout`, `layoutName` or `defaultLayout`... | true |
Other | emberjs | ember.js | 00b8940af1c948dd1974be184e022269a87a461d.json | Add currentView property to Ember.ContainerView | packages/ember-views/tests/views/container_view_test.js | @@ -1,11 +1,10 @@
-var get = Ember.get, getPath = Ember.getPath;
+var get = Ember.get, getPath = Ember.getPath, set = Ember.set;
module("ember-views/views/container_view_test");
test("should be able to insert views after the DOM representation is created", function() {
var container = Ember.ContainerView.creat... | true |
Other | emberjs | ember.js | bf7f87a52b61ed7f01394be3878c60274827b1bc.json | Fix spelling mistakes | packages/ember-debug/package.json | @@ -1,8 +1,8 @@
{
"name": "ember-debug",
"summary": "Debugging for Ember",
- "description": "Dubugging helpers for Ember",
- "homepage": "http://www.ember`js.com",
+ "description": "Debugging helpers for Ember",
+ "homepage": "http://www.emberjs.com",
"author": "Peter Wagenet",
"version": "0.9.7.1",
| false |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-handlebars/lib/controls/select.js | @@ -5,7 +5,7 @@ var indexOf = Ember.ArrayUtils.indexOf, indexesOf = Ember.ArrayUtils.indexesOf;
Ember.Select = Ember.View.extend({
tagName: 'select',
- defaultTemplate: Ember.Handlebars.compile('{{#if prompt}}<option>{{prompt}}</option>{{/if}}{{#each content}}{{view Ember.SelectOption contentBinding="this"}}{{/e... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-handlebars/tests/handlebars_test.js | @@ -212,13 +212,13 @@ test("child views can be inserted using the {{view}} Handlebars helper", functio
TemplateTests.LabelView = Ember.View.extend({
tagName: "aside",
- cruel: "cruel",
world: "world?",
templateName: 'nested',
templates: templates
});
view = Ember.View.create({
+ c... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-handlebars/tests/helpers/yield_test.js | @@ -64,7 +64,7 @@ test("block should work properly even when templates are not hard-coded", functi
test("templates should yield to block, when the yield is embedded in a hierarchy of virtual views", function() {
TemplateTests.TimesView = Ember.View.extend({
- layout: Ember.Handlebars.compile('<div class="times... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-handlebars/tests/views/collection_view_test.js | @@ -172,7 +172,7 @@ test("a block passed to a collection helper defaults to the content property of
});
view = Ember.View.create({
- template: Ember.Handlebars.compile('{{#collection "TemplateTests.CollectionTestView"}} <label>{{content}}</label> {{/collection}}')
+ template: Ember.Handlebars.compile('{{#... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-metal/lib/core.js | @@ -106,6 +106,41 @@ Ember.SHIM_ES5 = (Ember.ENV.SHIM_ES5 === false) ? false : Ember.EXTEND_PROTOTYPE
*/
Ember.CP_DEFAULT_CACHEABLE = !!Ember.ENV.CP_DEFAULT_CACHEABLE;
+/**
+ @static
+ @type Boolean
+ @default false
+ @constant
+
+ Determines whether views render their templates using themselves
+ as the cont... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-views/lib/views/view.js | @@ -28,6 +28,9 @@ var childViewsProperty = Ember.computed(function() {
return ret;
}).property().cacheable();
+var VIEW_PRESERVES_CONTEXT = Ember.VIEW_PRESERVES_CONTEXT;
+ember_warn("The way that the {{view}} helper affects templates is about to change. Previously, templates inside child views would use the new v... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | packages/ember-views/tests/views/container_view_test.js | @@ -95,8 +95,8 @@ test("views that are removed from a ContainerView should have their child views
remove: function() {
this._super();
},
- template: function(view) {
- view.appendChild(Ember.View);
+ template: function(context, options) {
+ options.data.view.appendChild(Ember.View);
... | true |
Other | emberjs | ember.js | c94ccdc249ceae0f8132bf779a321bf956a92f23.json | Change the context in which {{view}} renders
Rather than binding to the view being rendered,
bind to the parent context. You can bind to the
view instead by prefixing your path with `.view`.
More information is available here:
https://gist.github.com/2494968 | tests/index.html | @@ -45,6 +45,8 @@
var cpDefaultCacheable = QUnit.urlParams.cpdefaultcacheable;
ENV['CP_DEFAULT_CACHEABLE'] = !!cpDefaultCacheable;
+
+ ENV.VIEW_PRESERVES_CONTEXT = true;
</script>
</head>
<body> | true |
Other | emberjs | ember.js | 642637c9dbad1b7b33a5c0800ca6bb55a317c6cb.json | Improve error when sending an unimplemented event
Improves the error message when sending an event
to a state manager that is the name of a child
state. | packages/ember-states/lib/state_manager.js | @@ -394,7 +394,13 @@ Ember.StateManager = Ember.State.extend(
var action = currentState[event];
- if (action) {
+ // Test to see if the action is a method that
+ // can be invoked. Don't blindly check just for
+ // existence, because it is possible the state
+ // manager has a child state of the... | false |
Other | emberjs | ember.js | b79623463e2da7155327136e487ace3612dc6c2a.json | Remove vestigial code left over from 9afcb3e | packages/ember-handlebars/lib/helpers/binding.js | @@ -338,8 +338,6 @@ EmberHandlebars.bindClasses = function(context, classBindings, view, bindAttrId,
// If value is a Boolean and true, return the dasherized property
// name.
} else if (val === true) {
- if (className) { return className; }
-
// Normalize property path to be suitable for use... | true |
Other | emberjs | ember.js | b79623463e2da7155327136e487ace3612dc6c2a.json | Remove vestigial code left over from 9afcb3e | packages/ember-views/lib/views/view.js | @@ -599,9 +599,7 @@ Ember.View = Ember.Object.extend(Ember.Evented,
// If value is a Boolean and true, return the dasherized property
// name.
- } else if (val === true) {
- if (className) { return className; }
-
+ } else if (val === true) {
// Normalize property path to be suitable for u... | true |
Other | emberjs | ember.js | bd6c1a3761207efda3cc2a5f3f5a39092447ff95.json | add safeHtml method to String
change to htmlSafe to be coherent with rails | packages/ember-handlebars/lib/main.js | @@ -7,6 +7,7 @@
require("ember-runtime");
require("ember-views");
require("ember-handlebars/ext");
+require("ember-handlebars/string");
require("ember-handlebars/helpers");
require("ember-handlebars/views");
require("ember-handlebars/controls"); | true |
Other | emberjs | ember.js | bd6c1a3761207efda3cc2a5f3f5a39092447ff95.json | add safeHtml method to String
change to htmlSafe to be coherent with rails | packages/ember-handlebars/lib/string.js | @@ -0,0 +1,17 @@
+
+Ember.String.htmlSafe = function(str) {
+ return new Handlebars.SafeString(str);
+};
+
+var htmlSafe = Ember.String.htmlSafe;
+
+if (Ember.EXTEND_PROTOTYPES) {
+
+ /**
+ @see Ember.String.htmlSafe
+ */
+ String.prototype.htmlSafe = function() {
+ return htmlSafe(this);
+ };
+
+} | true |
Other | emberjs | ember.js | bd6c1a3761207efda3cc2a5f3f5a39092447ff95.json | add safeHtml method to String
change to htmlSafe to be coherent with rails | packages/ember-handlebars/tests/handlebars_test.js | @@ -143,6 +143,12 @@ test("should allow values from normal JavaScript hash objects to be used", funct
equal(view.$().text(), "Señor CFC (and Fido)", "prints out values from a hash");
});
+test("htmlSafe should return an instance of Handlebars.SafeString", function() {
+ var safeString = Ember.String.htmlSafe("yo... | true |
Other | emberjs | ember.js | 28449b4129c83279c360bfb12419d31508d9255b.json | Include lib files for uploader | lib/github_uploader.rb | @@ -0,0 +1,89 @@
+require "rest-client"
+require "github_api"
+# We can stop requiring nokogiri when github_api is updated
+require "nokogiri"
+
+class GithubUploader
+
+ def initialize(login, username, repo, root=Dir.pwd)
+ @login = login
+ @username = username
+ @repo = repo
+ @root = root
+ ... | false |
Other | emberjs | ember.js | b89b23eb391aadeeae46738581cbeff5d4667770.json | Fix jshint warnings for CLI tests - Fixes #714 | tests/index.html | @@ -168,7 +168,8 @@ <h2 id="qunit-userAgent"></h2>
// (closure to preserve variable values)
(function() {
var jshintModule = moduleName;
- test(jshintModule+' should pass jshint', function() {
+ module(jshintModule);
+ test('sho... | false |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-handlebars/lib/views/metamorph_view.js | @@ -9,6 +9,8 @@ var DOMManager = {
remove: function(view) {
var morph = view.morph;
if (morph.isRemoved()) { return; }
+ set(view, 'element', null);
+ set(view, 'lastInsert', null);
morph.remove();
},
| true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/lib/views/collection_view.js | @@ -266,7 +266,6 @@ Ember.CollectionView = Ember.ContainerView.extend(
addedViews.push(emptyView);
set(this, 'emptyView', emptyView);
}
-
childViews.replace(start, 0, addedViews);
},
| true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/lib/views/states/default.js | @@ -27,6 +27,12 @@ Ember.View.states = {
// Handle events from `Ember.EventDispatcher`
handleEvent: function() {
return true; // continue event propagation
+ },
+
+ destroyElement: function(view) {
+ set(view, 'element', null);
+ set(view, 'lastInsert', null);
+ return view;
}... | true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/lib/views/states/in_dom.js | @@ -27,6 +27,7 @@ Ember.View.states.hasElement = {
setElement: function(view, value) {
if (value === null) {
view.invalidateRecursively('element');
+
view.transitionTo('preRender');
} else {
throw "You cannot set an element to a non-null value when the element is already in the DOM.";
... | true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/lib/views/states/pre_render.js | @@ -13,6 +13,9 @@ Ember.View.states.preRender = {
// a view leaves the preRender state once its element has been
// created (createElement).
insertElement: function(view, fn) {
+ if (view.get('lastInsert') !== fn.insertGuid){
+ return;
+ }
view.createElement();
view._notifyWillInsertElemen... | true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/lib/views/view.js | @@ -744,6 +744,7 @@ Ember.View = Ember.Object.extend(Ember.Evented,
@param {Function} fn the function that inserts the element into the DOM
*/
_insertElementLater: function(fn) {
+ set(this, 'lastInsert', fn.insertGuid = Ember.generateGuid());
Ember.run.schedule('render', this, this.invokeForState, '... | true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/tests/views/collection_test.js | @@ -313,3 +313,30 @@ test("should allow declaration of itemViewClass as a string", function() {
equal(view.$('.ember-view').length, 3);
});
+
+test("should not render the emptyView if content is emptied and refilled in the same run loop", function() {
+ view = Ember.CollectionView.create({
+ tagName: 'div',
+... | true |
Other | emberjs | ember.js | a982beb5c4ec50932c312626f44488d0ee85abec.json | Fix issue #233 | packages/ember-views/tests/views/view/remove_test.js | @@ -95,5 +95,27 @@ test("does nothing if not in parentView", function() {
});
+test("the DOM element is gone after doing append and remove in two separate runloops", function() {
+ var view = Ember.View.create();
+ Ember.run(function() {
+ view.append();
+ });
+ Ember.run(function() {
+ view.remove();
+ ... | true |
Other | emberjs | ember.js | 0e500d5ee386ab0617a59a661c23bc2d4d1ee844.json | Correct a spelling error. | packages/ember-views/lib/views/container_view.js | @@ -177,7 +177,7 @@ var childViewsProperty = Ember.computed(function() {
## Templates and Layout
- A `template`, `templateName`, `defaultTempalte`, `layout`, `layoutName` or `defaultLayout`
+ A `template`, `templateName`, `defaultTemplate`, `layout`, `layoutName` or `defaultLayout`
property on a container v... | false |
Other | emberjs | ember.js | 7a4fafbcd565aaf429b0d83595a0395f3d906fa0.json | Fix the build | tests/index.html | @@ -120,16 +120,14 @@ <h2 id="qunit-userAgent"></h2>
el = document.getElementById('qunit-header');
el.innerHTML = 'Add package=package1,package2 in the URL to test packages';
} else {
- if (packages[1] === 'all') {
+ if (packages[0] === 'all') {
packages = [
'ember-handl... | false |
Other | emberjs | ember.js | dae7ae3a3d3b298bd66099308736de0547185112.json | Update travis to run against git jQuery | Rakefile | @@ -309,8 +309,10 @@ task :test, [:suite] => :dist do |t, args|
# testing older jQuery 1.6.4 for compatibility
:all => packages.map{|p| "package=#{p}" } +
["package=all&jquery=1.6.4&nojshint=true",
+ "package=all&jquery=git&nojshint=true",
"package=all&extendprototypes=... | false |
Other | emberjs | ember.js | 6738647e3a5077db04c5fea4cc7c588f60dc6b2c.json | fix typo StateManager object in examples | packages/ember-states/lib/state_manager.js | @@ -574,7 +574,7 @@ require('ember-states/state');
And application code
App = Ember.Application.create()
- App.states = Ember.StateManager.create({
+ App.appStates = Ember.StateManager.create({
initialState: 'aState',
aState: Ember.State.create({
anAction: function(man... | false |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-handlebars/lib/ext.js | @@ -128,6 +128,39 @@ Ember.Handlebars.compile = function(string) {
return Handlebars.template(templateSpec);
};
+/**
+ If a path starts with a reserved keyword, returns the root
+ that should be used.
+*/
+var normalizePath = Ember.Handlebars.normalizePath = function(root, path, data) {
+ var keywords = (data ... | true |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-handlebars/lib/helpers/binding.js | @@ -21,7 +21,13 @@ var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers;
fn = options.fn,
inverse = options.inverse,
view = data.view,
- ctx = this;
+ ctx = this,
+ normalized;
+
+ normalized = Ember.Handlebars.normalizePath(ctx, property, data);... | true |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-handlebars/lib/helpers/collection.js | @@ -90,7 +90,7 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
delete hash.preserveContext;
}
- hash.itemViewClass = Ember.Handlebars.ViewHelper.viewClassFromHTMLOptions(itemViewClass, itemHash, this);
+ hash.itemViewClass = Ember.Handlebars.ViewHelper.viewClassFromHTMLOptions(ite... | true |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-handlebars/lib/helpers/view.js | @@ -17,12 +17,13 @@ var EmberHandlebars = Ember.Handlebars;
EmberHandlebars.ViewHelper = Ember.Object.create({
viewClassFromHTMLOptions: function(viewClass, options, thisContext) {
+ var hash = options.hash, data = options.data;
var extensions = {},
- classes = options['class'],
+ classes = ... | true |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-handlebars/tests/handlebars_test.js | @@ -1410,6 +1410,15 @@ test("should expose a controller keyword when present on the view", function() {
equal(view.$().text(), "barbang", "renders values from controller and parent controller");
+ var controller = get(view, 'controller');
+
+ Ember.run(function() {
+ controller.set('foo', "BAR");
+ contr... | true |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-views/lib/views/view.js | @@ -121,6 +121,14 @@ Ember.View = Ember.Object.extend(Ember.Evented,
return template || get(this, 'defaultTemplate');
}).property('templateName').cacheable(),
+ /**
+ The controller managing this view. If this property is set, it will be made
+ made available for use by the template.
+
+ @type Objec... | true |
Other | emberjs | ember.js | 208e498390b852f71e5fe6623a5b8d2dd4005c13.json | Normalize keyword paths so that observers work
In the previous implementation, observers would
not get set up correctly since root/path
combinations were not resolved to take into
account Handlebars keywords until getPath was
called.
In this commit, a separate method to normalize
root/path combinations is exposed and... | packages/ember-views/tests/views/view/template_test.js | @@ -113,7 +113,7 @@ test("should provide a controller to the template if a controller is specified o
controller: controller1,
template: function(buffer, options) {
- strictEqual(options.data.controller, controller1, "passes the controller in the data");
+ strictEqual(options.data.keywords.controll... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/controls/button.js | @@ -18,6 +18,20 @@ Ember.Button = Ember.View.extend(Ember.TargetActionSupport, {
attributeBindings: ['type', 'disabled', 'href'],
+ /** @private
+ Overrides TargetActionSupport's targetObject computed
+ property to use Handlebars-specific path resolution.
+ */
+ targetObject: Ember.computed(function() {... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/ext.js | @@ -129,14 +129,58 @@ Ember.Handlebars.compile = function(string) {
};
/**
- Lookup both on root and on window
+ Lookup both on root and on window. If the path starts with
+ a keyword, the corresponding object will be looked up in the
+ template's data hash and used to resolve the path.
@param {Object} roo... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/helpers/action.js | @@ -1,6 +1,6 @@
require('ember-handlebars/ext');
-var EmberHandlebars = Ember.Handlebars, getPath = Ember.Handlebars.getPath;
+var EmberHandlebars = Ember.Handlebars, getPath = EmberHandlebars.getPath;
var ActionHelper = EmberHandlebars.ActionHelper = {
registeredActions: {}
@@ -38,7 +38,7 @@ EmberHandlebars.r... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/helpers/binding.js | @@ -36,7 +36,8 @@ var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers;
inverseTemplate: inverse,
property: property,
previousContext: ctx,
- isEscaped: options.hash.escaped
+ isEscaped: options.hash.escaped,
+ templateData: options.data
});
... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/helpers/collection.js | @@ -34,7 +34,7 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
// If passed a path string, convert that into an object.
// Otherwise, just default to the standard class.
var collectionClass;
- collectionClass = path ? getPath(this, path) : Ember.CollectionView;
+ collectionClass = ... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/helpers/unbound.js | @@ -21,5 +21,5 @@ var getPath = Ember.Handlebars.getPath;
*/
Ember.Handlebars.registerHelper('unbound', function(property, fn) {
var context = (fn.contexts && fn.contexts[0]) || this;
- return getPath(context, property);
+ return getPath(context, property, fn);
}); | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/helpers/view.js | @@ -11,9 +11,10 @@ require("ember-handlebars");
var get = Ember.get, set = Ember.set;
var indexOf = Ember.ArrayUtils.indexOf;
var PARENT_VIEW_PATH = /^parentView\./;
+var EmberHandlebars = Ember.Handlebars;
/** @private */
-Ember.Handlebars.ViewHelper = Ember.Object.create({
+EmberHandlebars.ViewHelper = Ember.Ob... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/lib/views/bindable_span.js | @@ -84,14 +84,15 @@ Ember._BindableSpanView = Ember.View.extend(Ember.Metamorph,
var property = get(this, 'property'),
context = get(this, 'previousContext'),
valueNormalizer = get(this, 'valueNormalizerFunc'),
- result;
+ result, templateData;
// Use the current context as ... | true |
Other | emberjs | ember.js | 687bdcb1758f7f9a4ba8828f794f5ab1f14f0537.json | Expose view and controller keywords to templates | packages/ember-handlebars/tests/handlebars_test.js | @@ -1393,6 +1393,77 @@ test("should work with precompiled templates", function() {
equal(view.$().text(), "updated", "the precompiled template was updated");
});
+test("should expose a controller keyword when present on the view", function() {
+ var templateString = "{{controller.foo}}{{#view}}{{controller.baz}}... | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | Rakefile | @@ -304,6 +304,7 @@ task :test, [:suite] => :dist do |t, args|
suites = {
:default => ["package=all"],
+ # testing older jQuery 1.6.4 for compatibility
:all => ["package=all",
"package=all&jquery=1.6.4&nojshint=true",
"package=all&extendprototypes=true&nojshint=true", | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | benchmarks/external/backbone.html | @@ -2,7 +2,7 @@
<html>
<head>
- <script src="../../tests/jquery-1.7.1.js"></script>
+ <script src="../../tests/jquery-1.7.2.js"></script>
<style>
p { | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | benchmarks/index.html | @@ -2,7 +2,7 @@
<html>
<head>
- <script src="../tests/jquery-1.7.1.js"></script>
+ <script src="../tests/jquery-1.7.2.js"></script>
<script src="benchmark.js"></script>
<script src="runner.js"></script>
</head> | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | benchmarks/runner.js | @@ -13,7 +13,7 @@ function makeiframe(emberPath, suitePath, profile, callback) {
iframe.name = name;
write("<title>" + name + "</title>");
- write("<script src='../tests/jquery-1.7.1.js'></script>");
+ write("<script src='../tests/jquery-1.7.2.js'></script>");
write("<script src='" + emberPath + "'></scrip... | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | benchmarks/setup.markdown | @@ -3,7 +3,7 @@ Files:
* `index.html`: bootstrap file for testing
* `ember-before.js`: the Ember file that represents the "before" in the test
* `../dist/ember.min.js`: the Ember file that represents the "after" in the test
-* `../tests/jquery-1.7.1.js`: the latest version of jQuery
+* `../tests/jquery-1.7.2.js`: th... | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | benchmarks/simple.html | @@ -2,7 +2,7 @@
<html>
<head>
- <script src="../tests/jquery-1.7.1.js"></script>
+ <script src="../tests/jquery-1.7.2.js"></script>
<script src="ember.js"></script>
</head>
<body> | true |
Other | emberjs | ember.js | 8cf25fff49dd6405aa1df2453397554540205149.json | update jquery references
add jquery note to Rakefile | tests/index.html | @@ -60,7 +60,7 @@ <h2 id="qunit-userAgent"></h2>
<script>
// Load custom version of jQuery if possible
var jQueryMatch = location.search.match(/jquery=([^&]+)/),
- jQueryVersion = jQueryMatch ? jQueryMatch[1] : "1.7.1";
+ jQueryVersion = jQueryMatch ? jQueryMatch[1] : "1.7.2";
if (jQuery... | true |
Other | emberjs | ember.js | 98a1c9fd05bbcfdf7c8b50377ce7c76e7ae9b480.json | update jquery code | tests/jquery-1.7.1.js | @@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.7.1
+ * jQuery JavaScript Library v1.7.2
* http://jquery.com/
*
* Copyright 2011, John Resig
@@ -11,7 +11,7 @@
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
- * Date: Mon Nov 21 21:11:03 2011 -0500
+ * Date: Wed... | false |
Other | emberjs | ember.js | dfd95de1d35958b1b742aa0cbae39e5babd08789.json | Fix failing Handlebars test that relies on states
A previous commit introduced a test that tests
the integration between Handlebars and Ember's
state manager. Unfortunately, ember-handlebars
does not have a dependency on ember-states, so the
test only passes when all of the tests are run
at once. (This is the reason t... | packages/ember-handlebars/package.json | @@ -9,6 +9,7 @@
"spade": "~> 1.0.0",
"handlebars": "~> 1.0.0.beta.3",
"ember-views": "0.9.5",
+ "ember-states" : "0.9.5",
"metamorph": "~> 1.0.0"
},
| true |
Other | emberjs | ember.js | dfd95de1d35958b1b742aa0cbae39e5babd08789.json | Fix failing Handlebars test that relies on states
A previous commit introduced a test that tests
the integration between Handlebars and Ember's
state manager. Unfortunately, ember-handlebars
does not have a dependency on ember-states, so the
test only passes when all of the tests are run
at once. (This is the reason t... | packages/ember-handlebars/tests/helpers/action_test.js | @@ -244,6 +244,7 @@ test("should allow bubbling of events from action helper to original parent even
});
test("should be compatible with sending events to a state manager", function() {
+ require("ember-states");
var eventWasCalled = false,
eventObjectSent,
manager = Ember.StateManager.create({ | true |
Other | emberjs | ember.js | ee1f84b9b5d0c40d21ecd7ecc38549a8e1e0789d.json | Add compiled tests to gitignore | .gitignore | @@ -31,3 +31,4 @@ tmp
tmp*.gem
tmp.bpm
tmp.spade
+tests/source | false |
Other | emberjs | ember.js | 5cbb34a841ed22c495761e6a924f36a7051ee7bc.json | Action helper: reuse local "hash" variable | packages/ember-handlebars/lib/helpers/action.js | @@ -32,12 +32,12 @@ ActionHelper.registerAction = function(actionName, eventName, target, view, cont
EmberHandlebars.registerHelper('action', function(actionName, options) {
var hash = options.hash || {},
- eventName = options.hash.on || "click",
+ eventName = hash.on || "click",
view = options.d... | false |
Other | emberjs | ember.js | 158195a4d5a427ae414e9fde4bc6c72b8f944748.json | Support the old format of Ember.Binding.transform | packages/ember-metal/lib/binding.js | @@ -617,6 +617,10 @@ mixinProperties(Binding,
@see Ember.Binding.prototype.transform
*/
transform: function(from, func) {
+ if (!func) {
+ func = from;
+ from = null;
+ }
var C = this, binding = new C(null, from);
return binding.transform(func);
}, | false |
Other | emberjs | ember.js | 48c37b040feaed97351a7a771a807d29cd9efb9f.json | add Ember.Binding#notNull to mixin | packages/ember-metal/lib/binding.js | @@ -629,6 +629,15 @@ mixinProperties(Binding,
return binding.notEmpty(placeholder);
},
+ /**
+ @see Ember.Binding.prototype.notNull
+ */
+ notNull: function(from, placeholder) {
+ var C = this, binding = new C(null, from);
+ return binding.notNull(placeholder);
+ },
+
+
/**
@see Ember.Bin... | false |
Other | emberjs | ember.js | a81d638f5ab5c4d174d2f05b239f09476f59395b.json | add Ember.Binding#isNull to mixin | packages/ember-metal/lib/binding.js | @@ -645,6 +645,14 @@ mixinProperties(Binding,
return binding.not();
},
+ /**
+ @see Ember.Binding.prototype.isNull
+ */
+ isNull: function(from) {
+ var C = this, binding = new C(null, from);
+ return binding.isNull();
+ },
+
/**
Adds a transform that forwards the logical 'AND' of values ... | false |
Other | emberjs | ember.js | c5b0fa82be67515bc5342d577bab154636af6e91.json | Add introspection for cached values
Adds the ability to query an object for the cached
value of a computed property. This is useful for
instances where you want to retrieve the value of
a lazily computed property if it exists, but do
not want to accidentally trigger its creation if
it has not been used yet. | packages/ember-metal/lib/computed.js | @@ -342,3 +342,22 @@ Ember.computed = function(func) {
return cp;
};
+
+/**
+ Returns the cached value for a property, if one exists.
+ This can be useful for peeking at the value of a computed
+ property that is generated lazily, without accidentally causing
+ it to be created.
+
+ @param {Object} obj the o... | true |
Other | emberjs | ember.js | c5b0fa82be67515bc5342d577bab154636af6e91.json | Add introspection for cached values
Adds the ability to query an object for the cached
value of a computed property. This is useful for
instances where you want to retrieve the value of
a lazily computed property if it exists, but do
not want to accidentally trigger its creation if
it has not been used yet. | packages/ember-metal/tests/computed_test.js | @@ -230,6 +230,14 @@ testBoth('inherited property should not pick up cache', function(get, set) {
equal(get(objB, 'foo'), 'bar 2', 'objB third get');
});
+testBoth('cacheFor should return the cached value', function(get, set) {
+ equal(Ember.cacheFor(obj, 'foo'), undefined, "should not yet be a cached value");
+... | true |
Other | emberjs | ember.js | c5b0fa82be67515bc5342d577bab154636af6e91.json | Add introspection for cached values
Adds the ability to query an object for the cached
value of a computed property. This is useful for
instances where you want to retrieve the value of
a lazily computed property if it exists, but do
not want to accidentally trigger its creation if
it has not been used yet. | packages/ember-runtime/lib/mixins/observable.js | @@ -468,11 +468,23 @@ Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ {
return get(this, keyName);
},
+ /**
+ Returns the cached value of a computed property, if it exists.
+ This allows you to inspect the value of a computed property
+ without accidentally invoking it... | true |
Other | emberjs | ember.js | c5b0fa82be67515bc5342d577bab154636af6e91.json | Add introspection for cached values
Adds the ability to query an object for the cached
value of a computed property. This is useful for
instances where you want to retrieve the value of
a lazily computed property if it exists, but do
not want to accidentally trigger its creation if
it has not been used yet. | packages/ember-runtime/tests/mixins/observable_test.js | @@ -61,3 +61,21 @@ testBoth('calling setProperties completes safely despite exceptions', function(g
equal(firstNameChangedCount, 1, 'firstName should have fired once');
});
+
+testBoth("should be able to retrieve cached values of computed properties without invoking the computed property", function(get) {
+ var ... | true |
Other | emberjs | ember.js | f71943d63365319a3fce0b24d17e6d96a937987c.json | add test for #591 | packages/ember-runtime/tests/system/object/subclasses_test.js | @@ -23,3 +23,34 @@ test('defining sub-sub class should only go to parent', function() {
ok(Sub.subclasses.contains(SubSub), 'Sub contains SubSub');
});
+// TEST lazy prototype and Em.rewatch(prototype)
+test('chains should copy forward to subclasses when prototype created', function () {
+ var ObjectWithChains, ... | false |
Other | emberjs | ember.js | 437cc6ed9356e51742faa557020a6b82f79e5329.json | remove duplicate call to `this._super()` | packages/ember-views/lib/system/application.js | @@ -82,8 +82,6 @@ Ember.Application = Ember.Namespace.extend(
self.didBecomeReady();
});
}
-
- this._super();
},
/** @private */ | false |
Other | emberjs | ember.js | 60a01c11c0b879dacee73c26402469e1d97e2e3e.json | Fix inconsistent slice usage | packages/ember-metal/lib/computed.js | @@ -302,8 +302,8 @@ Ember.computed = function(func) {
var args;
if (arguments.length > 1) {
- args = [].slice.call(arguments, 0, -1);
- func = [].slice.call(arguments, -1)[0];
+ args = a_slice.call(arguments, 0, -1);
+ func = a_slice.call(arguments, -1)[0];
}
var cp = new ComputedProperty(fu... | false |
Other | emberjs | ember.js | 64aaa567ef710b9de029c7222a857538011d136c.json | Update simple bench | benchmarks/simple.html | @@ -3,11 +3,11 @@
<html>
<head>
<script src="../tests/jquery-1.7.1.js"></script>
- <script src="../dist/ember.prod.js"></script>
+ <script src="ember.js"></script>
</head>
<body>
<script type="text/x-handlebars">
- <ul>{{#each App.wat}}<li>{{id}}</li>{{/each}}</ul>
+ <ul>{{#each App.... | false |
Other | emberjs | ember.js | 471ba8f3e21c16703d8e126bff3202d9c2b8b94b.json | Add a few benchmarks | benchmarks/simple.html | @@ -0,0 +1,46 @@
+<!doctype html>
+
+<html>
+ <head>
+ <script src="../tests/jquery-1.7.1.js"></script>
+ <script src="../dist/ember.prod.js"></script>
+ </head>
+ <body>
+ <script type="text/x-handlebars">
+ <ul>{{#each App.wat}}<li>{{id}}</li>{{/each}}</ul>
+ </script>
+
+ <script>
+ Ember... | true |
Other | emberjs | ember.js | 471ba8f3e21c16703d8e126bff3202d9c2b8b94b.json | Add a few benchmarks | benchmarks/suites/views/destroy_view.js | @@ -0,0 +1,22 @@
+/*globals App:true Ember before after bench*/
+
+var view;
+
+before(function() {
+ Ember.run(function() {
+ view = Ember.ContainerView.create({
+ childViews: [ 'one', 'two', 'three' ],
+
+ one: Ember.View,
+ two: Ember.View,
+ three: Ember.View
+ }).append();
+ });
+});
+
... | true |
Other | emberjs | ember.js | b888b681a86d0575f37db1f225c51255a996fa5d.json | Fix benchmark runner | benchmarks/iframe_runner.js | @@ -74,13 +74,13 @@ BenchWarmer.prototype = {
var count = parseInt(this.profile, 10);
setTimeout(function() {
- self.setup();
+ if (self.setup) { self.setup(); }
console.profile(self.emberPath + ": " + self.name);
for (var i=0; i<count; i++) {
self.fn();
... | false |
Other | emberjs | ember.js | c3401b77840119f9014bd347756da32a801973ea.json | Remove unnecessary observability from _childViews | packages/ember-metal/lib/array.js | @@ -86,6 +86,11 @@ Ember.ArrayUtils = {
indexOf: function(obj) {
var args = Array.prototype.slice.call(arguments, 1);
return obj.indexOf ? obj.indexOf.apply(obj, args) : arrayIndexOf.apply(obj, args);
+ },
+
+ removeObject: function(array, item) {
+ var index = this.indexOf(array, item);
+ if (inde... | true |
Other | emberjs | ember.js | c3401b77840119f9014bd347756da32a801973ea.json | Remove unnecessary observability from _childViews | packages/ember-views/lib/views/container_view.js | @@ -37,6 +37,9 @@ Ember.ContainerView = Ember.View.extend({
_childViews[idx] = view;
}, this);
+ // Make the _childViews array observable
+ Ember.A(_childViews);
+
// Sets up an array observer on the child views array. This
// observer will detect when child views are added or removed
... | true |
Other | emberjs | ember.js | c3401b77840119f9014bd347756da32a801973ea.json | Remove unnecessary observability from _childViews | packages/ember-views/lib/views/states/in_buffer.js | @@ -39,11 +39,11 @@ Ember.View.states.inBuffer = {
var buffer = view.buffer;
childView = this.createChildView(childView, options);
- get(view, '_childViews').pushObject(childView);
+ get(view, '_childViews').push(childView);
childView.renderToBuffer(buffer);
- // update `childViews`
+ v... | true |
Other | emberjs | ember.js | c3401b77840119f9014bd347756da32a801973ea.json | Remove unnecessary observability from _childViews | packages/ember-views/lib/views/view.js | @@ -26,7 +26,7 @@ var childViewsProperty = Ember.computed(function() {
});
return ret;
-}).property('_childViews.@each').cacheable();
+}).property().cacheable();
/**
@static
@@ -214,7 +214,7 @@ Ember.View = Ember.Object.extend(Ember.Evented,
*/
childViews: childViewsProperty,
- _childViews: Ember... | true |
Other | emberjs | ember.js | c3401b77840119f9014bd347756da32a801973ea.json | Remove unnecessary observability from _childViews | packages/ember-views/tests/views/container_view_test.js | @@ -96,8 +96,7 @@ test("views that are removed from a ContainerView should have their child views
this._super();
},
template: function(view) {
- var childViews = get(view, '_childViews');
- childViews.pushObject(view.createChildView(Ember.View, {}));
+ view.appendChild(Ember.View);
... | true |
Other | emberjs | ember.js | 1520369d998c4cdeea95e2fe74b92fd6bc9c41c9.json | Improve perf of object model affecting View
Previously, it was possible for large classes
to adversely impact the performance of instance
creation of subclasses.
This specifically affected classes whose
subclasses were instantiated before they were.
In short, all of the parent class' properties
were copied onto each... | packages/ember-handlebars/lib/helpers/collection.js | @@ -41,7 +41,7 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
// Extract item view class if provided else default to the standard class
var itemViewClass, itemViewPath = hash.itemViewClass;
- var collectionPrototype = get(collectionClass, 'proto');
+ var collectionPrototype = colle... | true |
Other | emberjs | ember.js | 1520369d998c4cdeea95e2fe74b92fd6bc9c41c9.json | Improve perf of object model affecting View
Previously, it was possible for large classes
to adversely impact the performance of instance
creation of subclasses.
This specifically affected classes whose
subclasses were instantiated before they were.
In short, all of the parent class' properties
were copied onto each... | packages/ember-runtime/lib/system/core_object.js | @@ -25,10 +25,10 @@ function makeCtor() {
// method a lot faster. This is glue code so we want it to be as fast as
// possible.
- var isPrepared = false, initMixins, init = false, hasChains = false;
+ var wasApplied = false, initMixins, init = false, hasChains = false;
var Class = function() {
- if (... | true |
Other | emberjs | ember.js | b6726ebf176c2ff923360bf233fabd9aa1f936bd.json | Exclude initial proto from benchmark
Thanks @ebryn and @kselden | benchmarks/suites/views/template_view.js | @@ -9,6 +9,8 @@ before(function() {
App.View = Ember.View.extend({
template: Ember.Handlebars.compile("{{view}}")
});
+
+ App.View.create().destroy();
});
after(function() { | false |
Other | emberjs | ember.js | 520a3bd36555316ed84db5172e48f771973a683c.json | Improve benchmark runner output | benchmarks/iframe_runner.js | @@ -69,12 +69,20 @@ BenchWarmer.prototype = {
run: function() {
if (this.profile) {
- console.profile(this.emberPath + ": " + this.name);
- for (var i=0; i<1000; i++) {
- this.fn();
- }
- console.profileEnd(this.emberPath + ": " + this.name);
- if (this.next) { this.next.run();... | true |
Other | emberjs | ember.js | 520a3bd36555316ed84db5172e48f771973a683c.json | Improve benchmark runner output | benchmarks/runner.js | @@ -9,6 +9,10 @@ function makeiframe(emberPath, suitePath, profile, callback) {
var iframe = jQuery("<iframe>").appendTo("body")[0];
var write = function(str) { iframe.contentDocument.write(str); };
+ var name = emberPath + ": " + suitePath;
+ iframe.name = name;
+
+ write("<title>" + name + "</title>");
... | true |
Other | emberjs | ember.js | 9a4c350826898375aec71d638e537f3aae9ca3c0.json | Remove extra get call | packages/ember-handlebars/lib/helpers/collection.js | @@ -62,7 +62,7 @@ Ember.Handlebars.registerHelper('collection', function(path, options) {
}
}
- var tagName = hash.tagName || get(collectionClass, 'proto').tagName;
+ var tagName = hash.tagName || collectionPrototype.tagName;
if (fn) {
itemHash.template = fn; | false |
Other | emberjs | ember.js | e84fde145cbd6feae68d0b12fb164cf44fec42a7.json | Remove references to inactive guides. - Fixes #571. | README.md | @@ -92,8 +92,6 @@ For new users, we recommend downloading the [Ember.js Starter Kit](https://githu
We also recommend that you check out the [annotated Todos example](http://annotated-todos.strobeapp.com/), which shows you the best practices for architecting an MVC-based web application. You can also [browse or fork ... | false |
Other | emberjs | ember.js | 93193d68ea496e67d00831fd93017a71686c4ba0.json | Run jshint with tests now | .travis.yml | @@ -3,5 +3,4 @@ rvm:
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- - "npm install -g jshint"
-script: "rake test[all] && rake jshint"
+script: "rake test[all]" | true |
Other | emberjs | ember.js | 93193d68ea496e67d00831fd93017a71686c4ba0.json | Run jshint with tests now | Assetfile | @@ -23,6 +23,16 @@ class EmberLicenseFilter < Rake::Pipeline::Filter
end
end
+class JSHintRC < Rake::Pipeline::Filter
+ def generate_output(inputs, output)
+ inputs.each do |input|
+ file = File.read(input.fullpath)
+ jshintrc = File.read(".jshintrc")
+ output.write "var JSHINTRC = #{jshintrc};... | true |
Other | emberjs | ember.js | 93193d68ea496e67d00831fd93017a71686c4ba0.json | Run jshint with tests now | Rakefile | @@ -288,21 +288,6 @@ namespace :docs do
end
end
-desc "Run jshint"
-task :jshint do
- unless system("which jshint > /dev/null 2>&1")
- abort "Please install jshint. `npm install -g jshint`"
- end
-
- if system("jshint packages/ember*")
- puts "The JavaScript is clean".green
- else
- puts "The JavaScr... | true |
Other | emberjs | ember.js | 93193d68ea496e67d00831fd93017a71686c4ba0.json | Run jshint with tests now | tests/index.html | @@ -5,6 +5,39 @@
<title>QUnit Test Suite</title>
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
<script type="text/javascript" src="qunit/qunit.js"></script>
+ <script type="text/javascript" src="jshint.js"></script>
+ <script type="text/javascript" src="minispade.js"></script>... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.