| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 /// Pub-specific scheduled_test descriptors. | 5 /// Pub-specific scheduled_test descriptors. |
| 6 import 'package:oauth2/oauth2.dart' as oauth2; | 6 import 'package:oauth2/oauth2.dart' as oauth2; |
| 7 import 'package:pub/src/io.dart'; | 7 import 'package:pub/src/io.dart'; |
| 8 import 'package:pub/src/utils.dart'; | 8 import 'package:pub/src/utils.dart'; |
| 9 import 'package:scheduled_test/descriptor.dart'; | 9 import 'package:scheduled_test/descriptor.dart'; |
| 10 import 'package:scheduled_test/scheduled_server.dart'; | 10 import 'package:scheduled_test/scheduled_server.dart'; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 }); | 146 }); |
| 147 | 147 |
| 148 return hostedCache(contents); | 148 return hostedCache(contents); |
| 149 } | 149 } |
| 150 | 150 |
| 151 /// Describes the main cache directory containing cached hosted packages | 151 /// Describes the main cache directory containing cached hosted packages |
| 152 /// downloaded from the mock package server. | 152 /// downloaded from the mock package server. |
| 153 Descriptor hostedCache(Iterable<Descriptor> contents) { | 153 Descriptor hostedCache(Iterable<Descriptor> contents) { |
| 154 return dir(cachePath, [ | 154 return dir(cachePath, [ |
| 155 dir('hosted', [ | 155 dir('hosted', [ |
| 156 async(port.then((p) => dir('localhost%58$p', contents))) | 156 async(globalServer.port.then((p) => dir('localhost%58$p', contents))) |
| 157 ]) | 157 ]) |
| 158 ]); | 158 ]); |
| 159 } | 159 } |
| 160 | 160 |
| 161 /// Describes the file in the system cache that contains the client's OAuth2 | 161 /// Describes the file in the system cache that contains the client's OAuth2 |
| 162 /// credentials. The URL "/token" on [server] will be used as the token | 162 /// credentials. The URL "/token" on [server] will be used as the token |
| 163 /// endpoint for refreshing the access token. | 163 /// endpoint for refreshing the access token. |
| 164 Descriptor credentialsFile( | 164 Descriptor credentialsFile( |
| 165 ScheduledServer server, | 165 ScheduledServer server, |
| 166 String accessToken, | 166 String accessToken, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 189 /// are located on disk. If the strings are semantic versions, then the packages | 189 /// are located on disk. If the strings are semantic versions, then the packages |
| 190 /// are located in the system cache; otherwise, the strings are interpreted as | 190 /// are located in the system cache; otherwise, the strings are interpreted as |
| 191 /// relative `file:` URLs. | 191 /// relative `file:` URLs. |
| 192 /// | 192 /// |
| 193 /// Validation checks that the `.packages` file exists, has the expected | 193 /// Validation checks that the `.packages` file exists, has the expected |
| 194 /// entries (one per key in [dependencies]), each with a path that contains | 194 /// entries (one per key in [dependencies]), each with a path that contains |
| 195 /// either the version string (for a reference to the pub cache) or a | 195 /// either the version string (for a reference to the pub cache) or a |
| 196 /// path to a path dependency, relative to the application directory. | 196 /// path to a path dependency, relative to the application directory. |
| 197 Descriptor packagesFile([Map dependencies]) => | 197 Descriptor packagesFile([Map dependencies]) => |
| 198 new PackagesFileDescriptor(dependencies); | 198 new PackagesFileDescriptor(dependencies); |
| OLD | NEW |