Permalink
Browse files

removed bogart.server and bogart.build

  • Loading branch information...
1 parent 1f13080 commit fc6d21f4415aa63ebff8ccbf7bb09eb62b5559a8 @nrstott committed Feb 10, 2013
Showing with 2 additions and 49 deletions.
  1. +2 −49 lib/bogart.js
View
@@ -202,56 +202,9 @@ exports.config = function(/* environment1, environment2, ..., environmentN, call
*/
exports.router = Router;
-/**
- * Deprecated, use bogart#build instead
- * @ignore
- */
-exports.server = function(config) {
- console.log("'bogart.server' is deprecated, please switch to 'bogart.build'");
- return exports.build(config);
-}
-
-/**
- * Utility class to help in creating stacks of JSGI applications.
- * Allows the removal of nesting.
- *
- * @param {Function} config A configuration function that will be called by exports.build. The function will be
- * be provided via its 'this' reference two functions: use, clear
- *
- * @returns {Function} A JSGI application that can be started using @see bogart#start
- */
exports.build = function(config) {
- var
- self = this,
- app;
-
- this.middleware = [];
-
- this.use = function() {
- this.middleware.push(Array.prototype.slice.call(arguments));
- };
-
- this.clear = function() {
- this.middleware = [];
- };
-
- this.use(middleware.Error);
- this.use(middleware.Parted);
-
- config.call(this);
-
- this.middleware = this.middleware.reverse();
-
- this.middleware.forEach(function(middle) {
- var callable = middle.shift();
-
- middle.push(app);
- app = callable.apply(self, middle);
- });
-
- return function(req) {
- return app(req);
- };
+ console.log('bogart.build is an inferior version of bogart.app and has been removed in 0.4.x series. Please switch to bogart.app.');
+ throw new Error('bogart.build has been removed, please switch to bogart.app');
};
/**

0 comments on commit fc6d21f

Please sign in to comment.