Merge pull request #14 from hterkelsen/no_directory

Don't use Uri.directory
diff --git a/lib/discovery.dart b/lib/discovery.dart
index 52f208d..f298a0a 100644
--- a/lib/discovery.dart
+++ b/lib/discovery.dart
@@ -101,7 +101,7 @@
 /// a `packages/` directory in the same place.
 /// If that also fails, it starts checking parent directories for a `.packages`
 /// file, and stops if it finds it.
-/// Otherwise it gives up and returns [Pacakges.noPackages].
+/// Otherwise it gives up and returns [Packages.noPackages].
 Packages findPackagesFromFile(Uri fileBaseUri) {
   Uri baseDirectoryUri = fileBaseUri;
   if (!fileBaseUri.path.endsWith('/')) {
@@ -135,7 +135,7 @@
 /// By default, this function only works for `http:` and `https:` URIs.
 /// To support other schemes, a loader must be provided, which is used to
 /// try to load the `.packages` file. The loader should return the contents
-/// of the requestsed `.packages` file as bytes, which will be assumed to be
+/// of the requested `.packages` file as bytes, which will be assumed to be
 /// UTF-8 encoded.
 Future<Packages> findPackagesFromNonFile(Uri nonFileUri,
                                          {Future<List<int>> loader(Uri name)}) {
diff --git a/lib/packages.dart b/lib/packages.dart
index 8523ecc..3fba062 100644
--- a/lib/packages.dart
+++ b/lib/packages.dart
@@ -57,7 +57,7 @@
   ///   for the existence of a `.packages` file. If one is found, it is loaded
   ///   just as in the first step.
   /// * If no file is found before reaching the file system root,
-  ///   the constant [noPacakages] is returned. It's a `Packages` object
+  ///   the constant [noPackages] is returned. It's a `Packages` object
   ///   with no available packages.
   ///
   static Future<Packages> find(Uri baseLocation) => findPackages(baseLocation);
diff --git a/lib/packages_file.dart b/lib/packages_file.dart
index 03b37b6..2228cb3 100644
--- a/lib/packages_file.dart
+++ b/lib/packages_file.dart
@@ -10,7 +10,7 @@
 /// Parses a `.packages` file into a map from package name to base URI.
 ///
 /// The [source] is the byte content of a `.packages` file, assumed to be
-/// UTF-8 encoded. In practice, all sinficant parts of the file must be ASCII,
+/// UTF-8 encoded. In practice, all significant parts of the file must be ASCII,
 /// so Latin-1 or Windows-1252 encoding will also work fine.
 ///
 /// If the file content is available as a string, its [String.codeUnits] can
diff --git a/lib/src/packages_impl.dart b/lib/src/packages_impl.dart
index 880b9db..645d765 100644
--- a/lib/src/packages_impl.dart
+++ b/lib/src/packages_impl.dart
@@ -50,9 +50,9 @@
   /// Returns `null` if no package exists with that name, and that can be
   /// determined.
   Uri _getBase(String packageName);
-  
+
   // TODO: inline to uri.normalizePath() when we move to 1.11
-  static Uri _normalizePath(Uri uri) => new Uri().resolveUri(uri); 
+  static Uri _normalizePath(Uri uri) => new Uri().resolveUri(uri);
 }
 
 /// A [Packages] implementation based on an existing map.
@@ -73,7 +73,7 @@
   FilePackagesDirectoryPackages(this._packageDir);
 
   Uri _getBase(String packageName) =>
-      new Uri.directory(path.join(_packageDir.path, packageName, ''));
+      new Uri.file(path.join(_packageDir.path, packageName, '.'));
 
   Iterable<String> _listPackageNames() {
     return _packageDir.listSync()
diff --git a/pubspec.yaml b/pubspec.yaml
index 20494b9..2a84d20 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: package_config
-version: 0.0.2+2
+version: 0.0.2+3
 description: Support for working with Package Resolution config files.
 author: Dart Team <misc@dartlang.org>
 homepage: https://github.com/dart-lang/package_config
diff --git a/test/discovery_test.dart b/test/discovery_test.dart
index 4a88928..16bdd26 100644
--- a/test/discovery_test.dart
+++ b/test/discovery_test.dart
@@ -215,7 +215,7 @@
     tearDown(() {
       tempDir.deleteSync(recursive: true);
     });
-    test(name, () => fileTest(new Uri.directory(tempDir.path)));
+    test(name, () => fileTest(new Uri.file(path.join(tempDir.path, "."))));
   });
 }