OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library hosted_source; | 5 library hosted_source; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
9 import 'dart:json' as json; | 9 import 'dart:json' as json; |
10 import 'dart:uri'; | 10 import 'dart:uri'; |
11 | 11 |
12 // TODO(nweiz): Make this import better. | 12 // TODO(nweiz): Make this import better. |
kevmoo-old
2013/03/26 20:06:25
Missed a TODO.
nweiz
2013/03/26 20:50:38
Done.
| |
13 import '../../pkg/http/lib/http.dart' as http; | 13 import 'package:http/http.dart' as http; |
14 import '../../pkg/pathos/lib/path.dart' as path; | 14 import 'package:pathos/path.dart' as path; |
15 | 15 |
16 import 'http.dart'; | 16 import 'http.dart'; |
17 import 'io.dart'; | 17 import 'io.dart'; |
18 import 'log.dart' as log; | 18 import 'log.dart' as log; |
19 import 'package.dart'; | 19 import 'package.dart'; |
20 import 'pubspec.dart'; | 20 import 'pubspec.dart'; |
21 import 'source.dart'; | 21 import 'source.dart'; |
22 import 'source_registry.dart'; | 22 import 'source_registry.dart'; |
23 import 'utils.dart'; | 23 import 'utils.dart'; |
24 import 'version.dart'; | 24 import 'version.dart'; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 } | 205 } |
206 | 206 |
207 var name = description["name"]; | 207 var name = description["name"]; |
208 if (name is! String) { | 208 if (name is! String) { |
209 throw new FormatException("The 'name' key must have a string value."); | 209 throw new FormatException("The 'name' key must have a string value."); |
210 } | 210 } |
211 | 211 |
212 var url = description.containsKey("url") ? description["url"] : _defaultUrl; | 212 var url = description.containsKey("url") ? description["url"] : _defaultUrl; |
213 return new Pair<String, String>(name, url); | 213 return new Pair<String, String>(name, url); |
214 } | 214 } |
OLD | NEW |