Merge pull request #448 from fauxton/remove_router_deprecations

Remove resource router deprecations
This commit is contained in:
Piotr Sarnacki 2016-02-08 11:43:31 +01:00
commit a6e850ecea
2 changed files with 17 additions and 18 deletions

View File

@ -39,30 +39,30 @@ var Router = Ember.Router.extend({
}); });
Router.map(function() { Router.map(function() {
this.resource('dashboard', function() { this.route('dashboard', { resetNamespace: true }, function() {
this.route('repositories', { path: '/' }); this.route('repositories', { path: '/' });
}); });
this.resource('main', { path: '/' }, function() { this.route('main', { path: '/', resetNamespace: true }, function() {
this.resource('getting_started'); this.route('getting_started', { resetNamespace: true });
this.route('recent'); this.route('recent');
this.route('repositories'); this.route('repositories');
this.route('my_repositories'); this.route('my_repositories');
this.route('search', { path: '/search/:phrase' }); this.route('search', { path: '/search/:phrase' });
this.resource('repo', { path: '/:owner/:name' }, function() { this.route('repo', { path: '/:owner/:name', resetNamespace: true }, function() {
this.route('index', { path: '/' }); this.route('index', { path: '/' });
this.resource('branches', { path: '/branches' }); this.route('branches', { path: '/branches', resetNamespace: true });
this.resource('build', { path: '/builds/:build_id' }); this.route('build', { path: '/builds/:build_id', resetNamespace: true });
this.resource('job', { path: '/jobs/:job_id' }); this.route('job', { path: '/jobs/:job_id', resetNamespace: true });
this.resource('builds', { path: '/builds' }); this.route('builds', { path: '/builds', resetNamespace: true });
this.resource('pullRequests', { path: '/pull_requests' }); this.route('pullRequests', { path: '/pull_requests', resetNamespace: true });
this.resource('requests', { path: '/requests' }); this.route('requests', { path: '/requests', resetNamespace: true });
if (config.endpoints.caches) { if (config.endpoints.caches) {
this.resource('caches', { path: '/caches' }); this.resource('caches', { path: '/caches' });
} }
this.resource('request', { path: '/requests/:request_id' }); this.route('request', { path: '/requests/:request_id', resetNamespace: true });
this.resource('settings', function() { this.route('settings', { resetNamespace: true }, function() {
this.route('index', { path: '/' }); this.route('index', { path: '/' });
this.resource('env_vars', function() { this.route('env_vars', { resetNamespace: true }, function() {
this.route('new'); this.route('new');
}); });
if (config.endpoints.sshKey) { if (config.endpoints.sshKey) {
@ -81,13 +81,13 @@ Router.map(function() {
this.route('plans', { path: '/plans' }); this.route('plans', { path: '/plans' });
this.route('team', { path: '/about' }); this.route('team', { path: '/about' });
this.route('logo', { path: '/logo' }); this.route('logo', { path: '/logo' });
this.resource('profile', { path: '/profile' }, function() { this.route('profile', { path: '/profile', resetNamespace: true }, function() {
this.resource('accounts', { path: '/' }, function() { this.route('accounts', { path: '/', resetNamespace: true }, function() {
this.resource('account', { path: '/:login' }); this.route('account', { path: '/:login', resetNamespace: true });
this.route('info', { path: '/info' }); this.route('info', { path: '/info' });
}); });
}); });
this.resource('owner', { path: '/:owner' }, function() { this.route('owner', { path: '/:owner', resetNamespace: true }, function() {
this.route('repositories', { path: '/' }); this.route('repositories', { path: '/' });
}); });
this.route('error404', { path: '/404' }); this.route('error404', { path: '/404' });

View File

@ -25,7 +25,6 @@ window.deprecationWorkflow.config = {
// TODO // TODO
{ handler: "silence", matchMessage: "Using `ApplicationInstance.container.lookup` is deprecated. Please use `ApplicationInstance.lookup` instead." }, { handler: "silence", matchMessage: "Using `ApplicationInstance.container.lookup` is deprecated. Please use `ApplicationInstance.lookup` instead." },
{ handler: "silence", matchMessage: "this.resource() is deprecated. Use this.route('name', { resetNamespace: true }, function () {}) instead." },
{ handler: "silence", matchMessage: new RegExp("the component:.*? test module is implicitly running in unit test mode, which will change to integration test mode by default in an upcoming version of ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit test mode.") }, { handler: "silence", matchMessage: new RegExp("the component:.*? test module is implicitly running in unit test mode, which will change to integration test mode by default in an upcoming version of ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit test mode.") },
] ]
}; };