Skip to content

Commit

Permalink
Auto merge of #30 - rwjblue:alpha-support, r=poteto
Browse files Browse the repository at this point in the history
Add ember-alpha to try config.

Tests are passing (with the tweak to avoid using `this.attrs` in the acceptance test).

I have reported the issue that passing an action through a middle layer doesn't properly prevent mut-wrapping in `this.attrs` as was done in HTMLBars with a failing test in emberjs/ember.js#13996.
  • Loading branch information
homu committed Aug 2, 2016
2 parents 7e3f2e6 + da10e1b commit c3f465b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 3 additions & 1 deletion addon/-private/internals.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ let ClosureActionModule;

if ('ember-htmlbars/keywords/closure-action' in Ember.__loader.registry) {
ClosureActionModule = Ember.__loader.require('ember-htmlbars/keywords/closure-action');
} else {
} else if ('ember-routing-htmlbars/keywords/closure-action' in Ember.__loader.registry) {
ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action');
} else {
ClosureActionModule = { };
}

export const ACTION = ClosureActionModule.ACTION;
11 changes: 11 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ module.exports = {
'ember': 'canary'
}
}
},
{
name: 'ember-alpha',
bower: {
dependencies: {
'ember': 'alpha'
},
resolutions: {
'ember': 'alpha'
}
}
}
]
};
2 changes: 1 addition & 1 deletion tests/acceptance/main-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test('it can be used without rewrapping with (action (route-action "foo"))', fun
this.register('template:components/child-component', hbs`<button class="do-it">GO!</button>`);
this.register('component:child-component', Component.extend({
click() {
this.attrs.go();
this.get('go')();
}
}));

Expand Down

0 comments on commit c3f465b

Please sign in to comment.