Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docs for fuchsia_ctl #56

Merged
merged 3 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ task:
activate_script: pub global activate flutter_plugin_tools
matrix:
- name: analyze
# TODO(goderbauer): remove custom-analysis once fuchsia_ctl and gauge have proper API docs.
script: ./script/incremental_build.sh analyze --custom-analysis fuchsia_ctl,gauge
# TODO(goderbauer): remove custom-analysis once gauge has proper API docs.
script: ./script/incremental_build.sh analyze --custom-analysis gauge
- name: publishable
script: ./script/check_publish.sh
depends_on:
Expand Down
6 changes: 0 additions & 6 deletions packages/fuchsia_ctl/analysis_options.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions packages/fuchsia_ctl/lib/src/dev_finder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ class DevFinder {

/// The exception thrown when a [DevFinder] lookup fails.
class DevFinderException implements Exception {
/// Creates a new [DevFinderException], such as when dev_finder fails to find
/// a device.
const DevFinderException(this.message);

/// The user-facing message to display.
final String message;

@override
Expand Down
2 changes: 1 addition & 1 deletion packages/fuchsia_ctl/lib/src/image_paver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ImagePaver {
/// The [FileSystem] implementation used to
final FileSystem fs;

// The implementation to use for untarring system images.
/// The implementation to use for untarring system images.
final Tar tar;

/// The implementation to use for creating SSH keys.
Expand Down
1 change: 1 addition & 0 deletions packages/fuchsia_ctl/lib/src/operation_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class OperationResult {
return OperationResult._(false, info: info, error: error);
}

/// Creates an [OperationResult] from a [ProcessResult].
factory OperationResult.fromProcessResult(
ProcessResult result, {
int expectedExitCode = 0,
Expand Down
4 changes: 4 additions & 0 deletions packages/fuchsia_ctl/lib/src/ssh_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class SshClient {
/// The [ProcessManager] to use for spawning `ssh`.
final ProcessManager processManager;

/// Creates a list of arguments to pass to ssh.
///
/// This method is not intended for use outside of this library, except for
/// in unit tests.
@visibleForTesting
List<String> getSshArguments({
String identityFilePath,
Expand Down
11 changes: 10 additions & 1 deletion packages/fuchsia_ctl/lib/src/ssh_key_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ abstract class SshKeyManager {
/// A class that delegates creating SSH keys to the system `ssh-keygen`.
@immutable
class SystemSshKeyManager implements SshKeyManager {
/// Creates a wrapper for ssh-keygen.
///
/// The arguments must not be null, and will be used to spawn a ssh-keygen
/// process and manipulate the files it creates.
const SystemSshKeyManager({
this.processManager = const LocalProcessManager(),
this.fs = const LocalFileSystem(),
});
}) : assert(processManager != null),
assert(fs != null);

/// The [ProcessManager] implementation to use when spawning ssh-keygen.
final ProcessManager processManager;

/// The [FileSystem] implementation to use when creating the authorized_keys
/// file.
final FileSystem fs;

@override
Expand Down
3 changes: 3 additions & 0 deletions packages/fuchsia_ctl/lib/src/tar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ abstract class Tar {
/// A const constructor to allow subclasses to create const constructors.
const Tar();

/// Untars a tar file.
Future<OperationResult> untar(String src, String destination);
}

Expand All @@ -30,6 +31,8 @@ class SystemTar implements Tar {
this.processManager = const LocalProcessManager(),
}) : assert(processManager != null);

/// The [ProcessManager] impleemntation to use when spawning the system tar
/// program.
final ProcessManager processManager;

@override
Expand Down