Version 1.4.0-dev.2.0

Delete leftover files from original 1.4 push
These where not showing up in svn status

git-svn-id: http://dart.googlecode.com/svn/trunk@34926 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkg/shelf/lib/src/media_type.dart b/pkg/shelf/lib/src/media_type.dart
deleted file mode 100644
index 595fc9a..0000000
--- a/pkg/shelf/lib/src/media_type.dart
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library shelf.media_type;
-
-import 'package:collection/collection.dart';
-
-import 'string_scanner.dart';
-
-// All of the following regular expressions come from section 2.2 of the HTTP
-// spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html
-final _lws = new RegExp(r"(?:\r\n)?[ \t]+");
-final _token = new RegExp(r'[^()<>@,;:"\\/[\]?={} \t\x00-\x1F\x7F]+');
-final _quotedString = new RegExp(r'"(?:[^"\x00-\x1F\x7F]|\\.)*"');
-final _quotedPair = new RegExp(r'\\(.)');
-
-/// A regular expression matching any number of [_lws] productions in a row.
-final _whitespace = new RegExp("(?:${_lws.pattern})*");
-
-/// A regular expression matching a character that is not a valid HTTP token.
-final _nonToken = new RegExp(r'[()<>@,;:"\\/\[\]?={} \t\x00-\x1F\x7F]');
-
-/// A regular expression matching a character that needs to be backslash-escaped
-/// in a quoted string.
-final _escapedChar = new RegExp(r'["\x00-\x1F\x7F]');
-
-/// A class representing an HTTP media type, as used in Accept and Content-Type
-/// headers.
-class MediaType {
-  /// The primary identifier of the MIME type.
-  final String type;
-
-  /// The secondary identifier of the MIME type.
-  final String subtype;
-
-  /// The parameters to the media type.
-  ///
-  /// This map is immutable.
-  final Map<String, String> parameters;
-
-  /// The media type's MIME type.
-  String get mimeType => "$type/$subtype";
-
-  /// Parses a media type.
-  ///
-  /// This will throw a FormatError if the media type is invalid.
-  factory MediaType.parse(String mediaType) {
-    // This parsing is based on sections 3.6 and 3.7 of the HTTP spec:
-    // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html.
-    var errorMessage = 'Invalid media type "$mediaType".';
-    var scanner = new StringScanner(mediaType);
-    scanner.scan(_whitespace);
-    scanner.expect(_token, errorMessage);
-    var type = scanner.lastMatch[0];
-    scanner.expect('/', errorMessage);
-    scanner.expect(_token, errorMessage);
-    var subtype = scanner.lastMatch[0];
-    scanner.scan(_whitespace);
-
-    var parameters = {};
-    while (scanner.scan(';')) {
-      scanner.scan(_whitespace);
-      scanner.expect(_token, errorMessage);
-      var attribute = scanner.lastMatch[0];
-      scanner.expect('=', errorMessage);
-
-      var value;
-      if (scanner.scan(_token)) {
-        value = scanner.lastMatch[0];
-      } else {
-        scanner.expect(_quotedString, errorMessage);
-        var quotedString = scanner.lastMatch[0];
-        value = quotedString.substring(1, quotedString.length - 1).
-            replaceAllMapped(_quotedPair, (match) => match[1]);
-      }
-
-      scanner.scan(_whitespace);
-      parameters[attribute] = value;
-    }
-
-    if (!scanner.isDone) throw new FormatException(errorMessage);
-
-    return new MediaType(type, subtype, parameters);
-  }
-
-  MediaType(this.type, this.subtype, [Map<String, String> parameters])
-      : this.parameters = new UnmodifiableMapView(
-          parameters == null ? {} : new Map.from(parameters));
-
-  /// Returns a copy of this [MediaType] with some fields altered.
-  ///
-  /// [type] and [subtype] alter the corresponding fields. [mimeType] is parsed
-  /// and alters both the [type] and [subtype] fields; it cannot be passed along
-  /// with [type] or [subtype].
-  ///
-  /// [parameters] overwrites and adds to the corresponding field. If
-  /// [clearParameters] is passed, it replaces the corresponding field entirely
-  /// instead.
-  MediaType change({String type, String subtype, String mimeType,
-      Map<String, String> parameters, bool clearParameters: false}) {
-    if (mimeType != null) {
-      if (type != null) {
-        throw new ArgumentError("You may not pass both [type] and [mimeType].");
-      } else if (subtype != null) {
-        throw new ArgumentError("You may not pass both [subtype] and "
-            "[mimeType].");
-      }
-
-      var segments = mimeType.split('/');
-      if (segments.length != 2) {
-        throw new FormatException('Invalid mime type "$mimeType".');
-      }
-
-      type = segments[0];
-      subtype = segments[1];
-    }
-
-    if (type == null) type = this.type;
-    if (subtype == null) subtype = this.subtype;
-    if (parameters == null) parameters = {};
-
-    if (!clearParameters) {
-      var newParameters = parameters;
-      parameters = new Map.from(this.parameters);
-      parameters.addAll(newParameters);
-    }
-
-    return new MediaType(type, subtype, parameters);
-  }
-
-  /// Converts the media type to a string.
-  ///
-  /// This will produce a valid HTTP media type.
-  String toString() {
-    var buffer = new StringBuffer()
-        ..write(type)
-        ..write("/")
-        ..write(subtype);
-
-    parameters.forEach((attribute, value) {
-      buffer.write("; $attribute=");
-      if (_nonToken.hasMatch(value)) {
-        buffer
-          ..write('"')
-          ..write(value.replaceAllMapped(
-              _escapedChar, (match) => "\\" + match[0]))
-          ..write('"');
-      } else {
-        buffer.write(value);
-      }
-    });
-
-    return buffer.toString();
-  }
-}
diff --git a/pkg/shelf/lib/src/string_scanner.dart b/pkg/shelf/lib/src/string_scanner.dart
deleted file mode 100644
index 834c2d4..0000000
--- a/pkg/shelf/lib/src/string_scanner.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library shelf.string_scanner;
-
-/// A class that scans through a string using [Pattern]s.
-class StringScanner {
-  /// The string being scanned through.
-  final String string;
-
-  /// The current position of the scanner in the string, in characters.
-  int get position => _position;
-  set position(int position) {
-    if (position < 0 || position > string.length) {
-      throw new ArgumentError("Invalid position $position");
-    }
-
-    _position = position;
-  }
-  int _position = 0;
-
-  /// The data about the previous match made by the scanner.
-  ///
-  /// If the last match failed, this will be `null`.
-  Match get lastMatch => _lastMatch;
-  Match _lastMatch;
-
-  /// The portion of the string that hasn't yet been scanned.
-  String get rest => string.substring(position);
-
-  /// Whether the scanner has completely consumed [string].
-  bool get isDone => position == string.length;
-
-  /// Creates a new [StringScanner] that starts scanning from [position].
-  ///
-  /// [position] defaults to 0, the beginning of the string.
-  StringScanner(this.string, {int position}) {
-    if (position != null) this.position = position;
-  }
-
-  /// If [pattern] matches at the current position of the string, scans forward
-  /// until the end of the match.
-  ///
-  /// Returns whether or not [pattern] matched.
-  bool scan(Pattern pattern) {
-    var success = matches(pattern);
-    if (success) _position = _lastMatch.end;
-    return success;
-  }
-
-  /// If [pattern] matches at the current position of the string, scans forward
-  /// until the end of the match.
-  ///
-  /// If [pattern] did not match, throws a [FormatException] with [message].
-  void expect(Pattern pattern, String message) {
-    if (scan(pattern)) return;
-    throw new FormatException(message);
-  }
-
-  /// Returns whether or not [pattern] matches at the current position of the
-  /// string.
-  ///
-  /// This doesn't move the scan pointer forward.
-  bool matches(Pattern pattern) {
-    _lastMatch = pattern.matchAsPrefix(string, position);
-    return _lastMatch != null;
-  }
-}
diff --git a/pkg/shelf/test/harness_console.dart b/pkg/shelf/test/harness_console.dart
deleted file mode 100644
index 4b61b73..0000000
--- a/pkg/shelf/test/harness_console.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/*
- * This file imports all individual tests files and allows them to be run
- * all at once.
- *
- * It also exposes `testCore` which is used by `hop_runner` to rust tests via
- * Hop.
- */
-library harness_console;
-
-import 'package:unittest/unittest.dart';
-
-import 'create_middleware_test.dart' as create_middleware;
-import 'http_date_test.dart' as http_date;
-import 'log_middleware_test.dart' as log_middleware;
-import 'media_type_test.dart' as media_type;
-import 'request_test.dart' as request;
-import 'response_test.dart' as response;
-import 'shelf_io_test.dart' as shelf_io;
-import 'stack_test.dart' as stack;
-import 'string_scanner_test.dart' as string_scanner;
-
-void main() {
-  groupSep = ' - ';
-
-  group('createMiddleware', create_middleware.main);
-  group('http_date', http_date.main);
-  group('logRequests', log_middleware.main);
-  group('MediaType', media_type.main);
-  group('Request', request.main);
-  group('Response', response.main);
-  group('shelf_io', shelf_io.main);
-  group('Stack', stack.main);
-  group('StringScanner', string_scanner.main);
-}
diff --git a/pkg/shelf/test/http_date_test.dart b/pkg/shelf/test/http_date_test.dart
deleted file mode 100644
index 4af874f..0000000
--- a/pkg/shelf/test/http_date_test.dart
+++ /dev/null
@@ -1,315 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library shelf.http_date_test;
-
-import 'package:shelf/src/util.dart';
-import 'package:unittest/unittest.dart';
-
-void main() {
-  group("parse", () {
-    group("RFC 1123", () {
-      test("parses the example date", () {
-        var date = parseHttpDate("Sun, 06 Nov 1994 08:49:37 GMT");
-        expect(date.day, equals(6));
-        expect(date.month, equals(DateTime.NOVEMBER));
-        expect(date.year, equals(1994));
-        expect(date.hour, equals(8));
-        expect(date.minute, equals(49));
-        expect(date.second, equals(37));
-        expect(date.timeZoneName, equals("UTC"));
-      });
-
-      test("whitespace is required", () {
-        expect(() => parseHttpDate("Sun,06 Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 199408:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 08:49:37GMT"),
-            throwsFormatException);
-      });
-
-      test("exactly one space is required", () {
-        expect(() => parseHttpDate("Sun,  06 Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06  Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov  1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994  08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 08:49:37  GMT"),
-            throwsFormatException);
-      });
-
-      test("requires precise number lengths", () {
-        expect(() => parseHttpDate("Sun, 6 Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 8:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 08:9:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 08:49:7 GMT"),
-            throwsFormatException);
-      });
-
-      test("requires reasonable numbers", () {
-        expect(() => parseHttpDate("Sun, 00 Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 31 Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 32 Aug 1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 24:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 08:60:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun, 06 Nov 1994 08:49:60 GMT"),
-            throwsFormatException);
-      });
-
-      test("only allows short weekday names", () {
-        expect(() => parseHttpDate("Sunday, 6 Nov 1994 08:49:37 GMT"),
-            throwsFormatException);
-      });
-
-      test("only allows short month names", () {
-        expect(() => parseHttpDate("Sun, 6 November 1994 08:49:37 GMT"),
-            throwsFormatException);
-      });
-
-      test("only allows GMT", () {
-        expect(() => parseHttpDate("Sun, 6 Nov 1994 08:49:37 PST"),
-            throwsFormatException);
-      });
-
-      test("disallows trailing whitespace", () {
-        expect(() => parseHttpDate("Sun, 6 Nov 1994 08:49:37 GMT "),
-            throwsFormatException);
-      });
-    });
-
-    group("RFC 850", () {
-      test("parses the example date", () {
-        var date = parseHttpDate("Sunday, 06-Nov-94 08:49:37 GMT");
-        expect(date.day, equals(6));
-        expect(date.month, equals(DateTime.NOVEMBER));
-        expect(date.year, equals(1994));
-        expect(date.hour, equals(8));
-        expect(date.minute, equals(49));
-        expect(date.second, equals(37));
-        expect(date.timeZoneName, equals("UTC"));
-      });
-
-      test("whitespace is required", () {
-        expect(() => parseHttpDate("Sunday,06-Nov-94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-9408:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 08:49:37GMT"),
-            throwsFormatException);
-      });
-
-      test("exactly one space is required", () {
-        expect(() => parseHttpDate("Sunday,  06-Nov-94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94  08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 08:49:37  GMT"),
-            throwsFormatException);
-      });
-
-      test("requires precise number lengths", () {
-        expect(() => parseHttpDate("Sunday, 6-Nov-94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-1994 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 8:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 08:9:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 08:49:7 GMT"),
-            throwsFormatException);
-      });
-
-      test("requires reasonable numbers", () {
-        expect(() => parseHttpDate("Sunday, 00-Nov-94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 31-Nov-94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 32-Aug-94 08:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 24:49:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 08:60:37 GMT"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sunday, 06-Nov-94 08:49:60 GMT"),
-            throwsFormatException);
-      });
-
-      test("only allows long weekday names", () {
-        expect(() => parseHttpDate("Sun, 6-Nov-94 08:49:37 GMT"),
-            throwsFormatException);
-      });
-
-      test("only allows short month names", () {
-        expect(() => parseHttpDate("Sunday, 6-November-94 08:49:37 GMT"),
-            throwsFormatException);
-      });
-
-      test("only allows GMT", () {
-        expect(() => parseHttpDate("Sunday, 6-Nov-94 08:49:37 PST"),
-            throwsFormatException);
-      });
-
-      test("disallows trailing whitespace", () {
-        expect(() => parseHttpDate("Sunday, 6-Nov-94 08:49:37 GMT "),
-            throwsFormatException);
-      });
-    });
-
-    group("asctime()", () {
-      test("parses the example date", () {
-        var date = parseHttpDate("Sun Nov  6 08:49:37 1994");
-        expect(date.day, equals(6));
-        expect(date.month, equals(DateTime.NOVEMBER));
-        expect(date.year, equals(1994));
-        expect(date.hour, equals(8));
-        expect(date.minute, equals(49));
-        expect(date.second, equals(37));
-        expect(date.timeZoneName, equals("UTC"));
-      });
-
-      test("parses a date with a two-digit day", () {
-        var date = parseHttpDate("Sun Nov 16 08:49:37 1994");
-        expect(date.day, equals(16));
-        expect(date.month, equals(DateTime.NOVEMBER));
-        expect(date.year, equals(1994));
-        expect(date.hour, equals(8));
-        expect(date.minute, equals(49));
-        expect(date.second, equals(37));
-        expect(date.timeZoneName, equals("UTC"));
-      });
-
-      test("whitespace is required", () {
-        expect(() => parseHttpDate("SunNov  6 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov6 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  608:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:49:371994"),
-            throwsFormatException);
-      });
-
-      test("the right amount of whitespace is required", () {
-        expect(() => parseHttpDate("Sun  Nov  6 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov   6 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov 6 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6  08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:49:37  1994"),
-            throwsFormatException);
-      });
-
-      test("requires precise number lengths", () {
-        expect(() => parseHttpDate("Sun Nov 016 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 8:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:9:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:49:7 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:49:37 94"),
-            throwsFormatException);
-      });
-
-      test("requires reasonable numbers", () {
-        expect(() => parseHttpDate("Sun Nov 0 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov 31 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Aug 32 08:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 24:49:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:60:37 1994"),
-            throwsFormatException);
-
-        expect(() => parseHttpDate("Sun Nov  6 08:49:60 1994"),
-            throwsFormatException);
-      });
-
-      test("only allows short weekday names", () {
-        expect(() => parseHttpDate("Sunday Nov 0 08:49:37 1994"),
-            throwsFormatException);
-      });
-
-      test("only allows short month names", () {
-        expect(() => parseHttpDate("Sun November 0 08:49:37 1994"),
-            throwsFormatException);
-      });
-
-      test("disallows trailing whitespace", () {
-        expect(() => parseHttpDate("Sun November 0 08:49:37 1994 "),
-            throwsFormatException);
-      });
-    });
-  });
-}
diff --git a/pkg/shelf/test/media_type_test.dart b/pkg/shelf/test/media_type_test.dart
deleted file mode 100644
index 382ea46..0000000
--- a/pkg/shelf/test/media_type_test.dart
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library shelf.media_type_test;
-
-import 'package:shelf/src/media_type.dart';
-import 'package:unittest/unittest.dart';
-
-void main() {
-  group("parse", () {
-    test("parses a simple MIME type", () {
-      var type = new MediaType.parse("text/plain");
-      expect(type.type, equals("text"));
-      expect(type.subtype, equals("plain"));
-    });
-
-    test("allows leading whitespace", () {
-      expect(new MediaType.parse(" text/plain").mimeType, equals("text/plain"));
-      expect(new MediaType.parse("\ttext/plain").mimeType,
-          equals("text/plain"));
-    });
-
-    test("allows trailing whitespace", () {
-      expect(new MediaType.parse("text/plain ").mimeType, equals("text/plain"));
-      expect(new MediaType.parse("text/plain\t").mimeType,
-          equals("text/plain"));
-    });
-
-    test("disallows separators in the MIME type", () {
-      expect(() => new MediaType.parse("te(xt/plain"), throwsFormatException);
-      expect(() => new MediaType.parse("text/pla=in"), throwsFormatException);
-    });
-
-    test("disallows whitespace around the slash", () {
-      expect(() => new MediaType.parse("text /plain"), throwsFormatException);
-      expect(() => new MediaType.parse("text/ plain"), throwsFormatException);
-    });
-
-    test("parses parameters", () {
-      var type = new MediaType.parse("text/plain;foo=bar;baz=bang");
-      expect(type.mimeType, equals("text/plain"));
-      expect(type.parameters, equals({"foo": "bar", "baz": "bang"}));
-    });
-
-    test("allows whitespace around the semicolon", () {
-      var type = new MediaType.parse("text/plain ; foo=bar ; baz=bang");
-      expect(type.mimeType, equals("text/plain"));
-      expect(type.parameters, equals({"foo": "bar", "baz": "bang"}));
-    });
-
-    test("disallows whitespace around the equals", () {
-      expect(() => new MediaType.parse("text/plain; foo =bar"),
-          throwsFormatException);
-      expect(() => new MediaType.parse("text/plain; foo= bar"),
-          throwsFormatException);
-    });
-
-    test("disallows separators in the parameters", () {
-      expect(() => new MediaType.parse("text/plain; fo:o=bar"),
-          throwsFormatException);
-      expect(() => new MediaType.parse("text/plain; foo=b@ar"),
-          throwsFormatException);
-    });
-
-    test("parses quoted parameters", () {
-      var type = new MediaType.parse(
-          'text/plain; foo="bar space"; baz="bang\\\\escape"');
-      expect(type.mimeType, equals("text/plain"));
-      expect(type.parameters, equals({
-        "foo": "bar space",
-        "baz": "bang\\escape"
-      }));
-    });
-  });
-
-  group("change", () {
-    var type;
-    setUp(() {
-      type = new MediaType.parse("text/plain; foo=bar; baz=bang");
-    });
-
-    test("uses the existing fields by default", () {
-      var newType = type.change();
-      expect(newType.type, equals("text"));
-      expect(newType.subtype, equals("plain"));
-      expect(newType.parameters, equals({"foo": "bar", "baz": "bang"}));
-    });
-
-    test("[type] overrides the existing type", () {
-      expect(type.change(type: "new").type, equals("new"));
-    });
-
-    test("[subtype] overrides the existing subtype", () {
-      expect(type.change(subtype: "new").subtype, equals("new"));
-    });
-
-    test("[mimeType] overrides the existing type and subtype", () {
-      var newType = type.change(mimeType: "image/png");
-      expect(newType.type, equals("image"));
-      expect(newType.subtype, equals("png"));
-    });
-
-    test("[parameters] overrides and adds to existing parameters", () {
-      expect(type.change(parameters: {
-        "foo": "zap",
-        "qux": "fblthp"
-      }).parameters, equals({
-        "foo": "zap",
-        "baz": "bang",
-        "qux": "fblthp"
-      }));
-    });
-
-    test("[clearParameters] removes existing parameters", () {
-      expect(type.change(clearParameters: true).parameters, isEmpty);
-    });
-
-    test("[clearParameters] with [parameters] removes before adding", () {
-      var newType = type.change(
-          parameters: {"foo": "zap"},
-          clearParameters: true);
-      expect(newType.parameters, equals({"foo": "zap"}));
-    });
-
-    test("[type] with [mimeType] is illegal", () {
-      expect(() => type.change(type: "new", mimeType: "image/png"),
-          throwsArgumentError);
-    });
-
-    test("[subtype] with [mimeType] is illegal", () {
-      expect(() => type.change(subtype: "new", mimeType: "image/png"),
-          throwsArgumentError);
-    });
-  });
-
-  group("toString", () {
-    test("serializes a simple MIME type", () {
-      expect(new MediaType("text", "plain").toString(), equals("text/plain"));
-    });
-
-    test("serializes a token parameter as a token", () {
-      expect(new MediaType("text", "plain", {"foo": "bar"}).toString(),
-          equals("text/plain; foo=bar"));
-    });
-
-    test("serializes a non-token parameter as a quoted string", () {
-      expect(new MediaType("text", "plain", {"foo": "bar baz"}).toString(),
-          equals('text/plain; foo="bar baz"'));
-    });
-
-    test("escapes a quoted string as necessary", () {
-      expect(new MediaType("text", "plain", {"foo": 'bar"\x7Fbaz'}).toString(),
-          equals('text/plain; foo="bar\\"\\\x7Fbaz"'));
-    });
-
-    test("serializes multiple parameters", () {
-      expect(new MediaType("text", "plain", {
-        "foo": "bar", "baz": "bang"
-      }).toString(), equals("text/plain; foo=bar; baz=bang"));
-    });
-  });
-}
diff --git a/pkg/shelf/test/string_scanner_test.dart b/pkg/shelf/test/string_scanner_test.dart
deleted file mode 100644
index 4d3d259..0000000
--- a/pkg/shelf/test/string_scanner_test.dart
+++ /dev/null
@@ -1,266 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library shelf.string_scanner_test;
-
-import 'package:shelf/src/string_scanner.dart';
-import 'package:unittest/unittest.dart';
-
-void main() {
-  group('with an empty string', () {
-    var scanner;
-    setUp(() {
-      scanner = new StringScanner('');
-    });
-
-    test('is done', () {
-      expect(scanner.isDone, isTrue);
-    });
-
-    test('rest is empty', () {
-      expect(scanner.rest, isEmpty);
-    });
-
-    test('lastMatch is null', () {
-      expect(scanner.lastMatch, isNull);
-    });
-
-    test('position is zero', () {
-      expect(scanner.position, equals(0));
-    });
-
-    test("scan returns false and doesn't change the state", () {
-      expect(scanner.scan(new RegExp('.')), isFalse);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(0));
-    });
-
-    test("expect throws a FormatException and doesn't change the state", () {
-      expect(() => scanner.expect(new RegExp('.'), 'error'),
-          throwsFormatException);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(0));
-    });
-
-    test("matches returns false and doesn't change the state", () {
-      expect(scanner.matches(new RegExp('.')), isFalse);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(0));
-    });
-
-    test('setting position to 1 throws an ArgumentError', () {
-      expect(() {
-        scanner.position = 1;
-      }, throwsArgumentError);
-    });
-
-    test('setting position to -1 throws an ArgumentError', () {
-      expect(() {
-        scanner.position = -1;
-      }, throwsArgumentError);
-    });
-  });
-
-  group('at the beginning of a string', () {
-    var scanner;
-    setUp(() {
-      scanner = new StringScanner('foo bar');
-    });
-
-    test('is not done', () {
-      expect(scanner.isDone, isFalse);
-    });
-
-    test('rest is the whole string', () {
-      expect(scanner.rest, equals('foo bar'));
-    });
-
-    test('lastMatch is null', () {
-      expect(scanner.lastMatch, isNull);
-    });
-
-    test('position is zero', () {
-      expect(scanner.position, equals(0));
-    });
-
-    test("a matching scan returns true and changes the state", () {
-      expect(scanner.scan(new RegExp('f(..)')), isTrue);
-      expect(scanner.lastMatch[1], equals('oo'));
-      expect(scanner.position, equals(3));
-      expect(scanner.rest, equals(' bar'));
-    });
-
-    test("a non-matching scan returns false and sets lastMatch to null", () {
-      expect(scanner.matches(new RegExp('f(..)')), isTrue);
-      expect(scanner.lastMatch, isNotNull);
-
-      expect(scanner.scan(new RegExp('b(..)')), isFalse);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(0));
-      expect(scanner.rest, equals('foo bar'));
-    });
-
-    test("a matching expect changes the state", () {
-      scanner.expect(new RegExp('f(..)'), 'error');
-      expect(scanner.lastMatch[1], equals('oo'));
-      expect(scanner.position, equals(3));
-      expect(scanner.rest, equals(' bar'));
-    });
-
-    test("a non-matching expect throws a FormatException and sets lastMatch to "
-        "null", () {
-      expect(scanner.matches(new RegExp('f(..)')), isTrue);
-      expect(scanner.lastMatch, isNotNull);
-
-      expect(() => scanner.expect(new RegExp('b(..)'), 'error'),
-          throwsFormatException);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(0));
-      expect(scanner.rest, equals('foo bar'));
-    });
-
-    test("a matching matches returns true and only changes lastMatch", () {
-      expect(scanner.matches(new RegExp('f(..)')), isTrue);
-      expect(scanner.lastMatch[1], equals('oo'));
-      expect(scanner.position, equals(0));
-      expect(scanner.rest, equals('foo bar'));
-    });
-
-    test("a non-matching matches returns false and doesn't change the state",
-        () {
-      expect(scanner.matches(new RegExp('b(..)')), isFalse);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(0));
-      expect(scanner.rest, equals('foo bar'));
-    });
-
-    test('setting position to 1 moves the cursor forward', () {
-      scanner.position = 1;
-      expect(scanner.position, equals(1));
-      expect(scanner.rest, equals('oo bar'));
-
-      expect(scanner.scan(new RegExp('oo.')), isTrue);
-      expect(scanner.lastMatch[0], equals('oo '));
-      expect(scanner.position, equals(4));
-      expect(scanner.rest, equals('bar'));
-    });
-
-    test('setting position beyond the string throws an ArgumentError', () {
-      expect(() {
-        scanner.position = 8;
-      }, throwsArgumentError);
-    });
-
-    test('setting position to -1 throws an ArgumentError', () {
-      expect(() {
-        scanner.position = -1;
-      }, throwsArgumentError);
-    });
-
-    test('scan accepts any Pattern', () {
-      expect(scanner.scan('foo'), isTrue);
-      expect(scanner.lastMatch[0], equals('foo'));
-      expect(scanner.position, equals(3));
-      expect(scanner.rest, equals(' bar'));
-    });
-
-    test('scans multiple times', () {
-      expect(scanner.scan(new RegExp('f(..)')), isTrue);
-      expect(scanner.lastMatch[1], equals('oo'));
-      expect(scanner.position, equals(3));
-      expect(scanner.rest, equals(' bar'));
-
-      expect(scanner.scan(new RegExp(' b(..)')), isTrue);
-      expect(scanner.lastMatch[1], equals('ar'));
-      expect(scanner.position, equals(7));
-      expect(scanner.rest, equals(''));
-      expect(scanner.isDone, isTrue);
-    });
-  });
-
-  group('at the end of a string', () {
-    var scanner;
-    setUp(() {
-      scanner = new StringScanner('foo bar');
-      expect(scanner.scan('foo bar'), isTrue);
-    });
-
-    test('is done', () {
-      expect(scanner.isDone, isTrue);
-    });
-
-    test('rest is empty', () {
-      expect(scanner.rest, isEmpty);
-    });
-
-    test('position is zero', () {
-      expect(scanner.position, equals(7));
-    });
-
-    test("scan returns false and sets lastMatch to null", () {
-      expect(scanner.scan(new RegExp('.')), isFalse);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(7));
-    });
-
-    test("expect throws a FormatException and sets lastMatch to null", () {
-      expect(() => scanner.expect(new RegExp('.'), 'error'),
-          throwsFormatException);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(7));
-    });
-
-    test("matches returns false sets lastMatch to null", () {
-      expect(scanner.matches(new RegExp('.')), isFalse);
-      expect(scanner.lastMatch, isNull);
-      expect(scanner.position, equals(7));
-    });
-
-    test('setting position to 1 moves the cursor backward', () {
-      scanner.position = 1;
-      expect(scanner.position, equals(1));
-      expect(scanner.rest, equals('oo bar'));
-
-      expect(scanner.scan(new RegExp('oo.')), isTrue);
-      expect(scanner.lastMatch[0], equals('oo '));
-      expect(scanner.position, equals(4));
-      expect(scanner.rest, equals('bar'));
-    });
-
-    test('setting position beyond the string throws an ArgumentError', () {
-      expect(() {
-        scanner.position = 8;
-      }, throwsArgumentError);
-    });
-
-    test('setting position to -1 throws an ArgumentError', () {
-      expect(() {
-        scanner.position = -1;
-      }, throwsArgumentError);
-    });
-  });
-
-  group('a scanner constructed with a custom position', () {
-    test('starts scanning from that position', () {
-      var scanner = new StringScanner('foo bar', position: 1);
-      expect(scanner.position, equals(1));
-      expect(scanner.rest, equals('oo bar'));
-
-      expect(scanner.scan(new RegExp('oo.')), isTrue);
-      expect(scanner.lastMatch[0], equals('oo '));
-      expect(scanner.position, equals(4));
-      expect(scanner.rest, equals('bar'));
-    });
-
-    test('throws an ArgumentError if the position is -1', () {
-      expect(() => new StringScanner('foo bar', position: -1),
-          throwsArgumentError);
-    });
-
-    test('throws an ArgumentError if the position is beyond the string', () {
-      expect(() => new StringScanner('foo bar', position: 8),
-          throwsArgumentError);
-    });
-  });
-}
diff --git a/pkg/shelf/tool/hop_runner.dart b/pkg/shelf/tool/hop_runner.dart
deleted file mode 100644
index 77783f9..0000000
--- a/pkg/shelf/tool/hop_runner.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library shelf.hop_runner;
-
-import 'dart:async';
-import 'dart:io';
-import 'package:hop/hop.dart';
-import 'package:hop/hop_tasks.dart';
-import 'package:hop_docgen/hop_docgen.dart';
-import '../test/harness_console.dart' as test_console;
-
-void main(List<String> args) {
-  addTask('test', createUnitTestTask(test_console.main));
-
-  //
-  // Analyzer
-  //
-  addTask('analyze_libs', createAnalyzerTask(_getLibs));
-
-  addTask('docs', createDocGenTask('../compiled_dartdoc_viewer'));
-
-  runHop(args);
-}
-
-Future<List<String>> _getLibs() {
-  return new Directory('lib').list()
-      .where((FileSystemEntity fse) => fse is File)
-      .map((File file) => file.path)
-      .toList();
-}
diff --git a/pkg/string_scanner/test/error_format_test.dart b/pkg/string_scanner/test/error_format_test.dart
deleted file mode 100644
index 1187344..0000000
--- a/pkg/string_scanner/test/error_format_test.dart
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library string_scanner.error_format_test;
-
-import 'package:string_scanner/string_scanner.dart';
-import 'package:unittest/unittest.dart';
-
-void main() {
-  test('points to the first unconsumed character', () {
-    var scanner = new StringScanner('foo bar baz');
-    scanner.expect('foo ');
-    expect(() => scanner.expect('foo'), throwsFormattedError('''
-Expected "foo" on line 1, column 5.
-foo bar baz
-    ^'''));
-  });
-
-  test('prints the correct line', () {
-    var scanner = new StringScanner('foo bar baz\ndo re mi\nearth fire water');
-    scanner.expect('foo bar baz\ndo ');
-    expect(() => scanner.expect('foo'), throwsFormattedError('''
-Expected "foo" on line 2, column 4.
-do re mi
-   ^'''));
-  });
-
-  test('handles the beginning of the string correctly', () {
-    var scanner = new StringScanner('foo bar baz');
-    expect(() => scanner.expect('zap'), throwsFormattedError('''
-Expected "zap" on line 1, column 1.
-foo bar baz
-^'''));
-  });
-
-  test('handles the end of the string correctly', () {
-    var scanner = new StringScanner('foo bar baz');
-    scanner.expect('foo bar baz');
-    expect(() => scanner.expect('bang'), throwsFormattedError('''
-Expected "bang" on line 1, column 12.
-foo bar baz
-           ^'''));
-  });
-
-  test('handles an empty string correctly', () {
-    expect(() => new StringScanner('').expect('foo'), throwsFormattedError('''
-Expected "foo" on line 1, column 1.
-
-^'''));
-  });
-
-  group("expected name", () {
-    test("uses the provided name", () {
-      expect(() => new StringScanner('').expect('foo bar', name: 'zap'),
-          throwsFormattedError('''
-Expected zap on line 1, column 1.
-
-^'''));
-    });
-
-    test("escapes string quotes", () {
-      expect(() => new StringScanner('').expect('foo"bar'),
-          throwsFormattedError('''
-Expected "foo\\"bar" on line 1, column 1.
-
-^'''));
-    });
-
-    test("escapes string backslashes", () {
-      expect(() => new StringScanner('').expect('foo\\bar'),
-          throwsFormattedError('''
-Expected "foo\\\\bar" on line 1, column 1.
-
-^'''));
-    });
-
-    test("prints PERL-style regexps", () {
-      expect(() => new StringScanner('').expect(new RegExp(r'foo')),
-          throwsFormattedError('''
-Expected /foo/ on line 1, column 1.
-
-^'''));
-    });
-
-    test("escape regexp forward slashes", () {
-      expect(() => new StringScanner('').expect(new RegExp(r'foo/bar')),
-          throwsFormattedError('''
-Expected /foo\\/bar/ on line 1, column 1.
-
-^'''));
-    });
-
-    test("does not escape regexp backslashes", () {
-      expect(() => new StringScanner('').expect(new RegExp(r'foo\bar')),
-          throwsFormattedError('''
-Expected /foo\\bar/ on line 1, column 1.
-
-^'''));
-    });
-  });
-}
-
-Matcher throwsFormattedError(String format) {
-  return throwsA(predicate((error) {
-    expect(error, isFormatException);
-    expect(error.message, equals(format));
-    return true;
-  }));
-}
diff --git a/tools/VERSION b/tools/VERSION
index 2a1d14e..ed7cccc 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 1
 MINOR 4
 PATCH 0
-PRERELEASE 1
+PRERELEASE 2
 PRERELEASE_PATCH 0