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

Swap command descriptions and summaries #101

Merged

Conversation

msabramo
Copy link
Contributor

Because commander shows the summary when you do aptly-cli --help and
it displays the description when you do - e.g.: aptly-cli repo_upload --help.

So the summary should be shorter than the description.

Before:

  NAME:

    aptly-cli

  DESCRIPTION:

    Aptly repository API client

  COMMANDS:

    file_delete        Deletes all files in upload directory and directory itself. Or delete just a file
    file_list          List all directories that contain uploaded files
    file_upload        Parameter --directory is upload directory name. Directory would be created if it doesn’t exist.
    graph              Download a graph of repository layout.  Current options are "svg" and "png"
    help               Display global or [command] help documentation
    publish_drop       Delete published repository, clean up files in published directory.
    publish_list       List published repositories.
    publish_repo       Publish local repository or snapshot under specified prefix. Storage might be passed in prefix as well, e.g. s3:packages/. To supply empty prefix,
just remove last part (POST /api/publish/:prefix/<:repos>or<:snapshots>
    publish_update     Update published repository. If local repository has been published, published repository would be updated to match local repository contents. If
snapshots have been been published, it is possible to switch each component to new snapshot
    repo_create        Create a new repository, requires --name
    repo_delete        Delete a local repository, requires --name
    repo_edit          Edit a local repository metadata, requires --name
    repo_list          Show list of currently available local repositories
    repo_package_query List all packages in local repository or perform search on repository contents and return result., requires --name
    repo_show          Returns basic information about local repository
    repo_upload        Import packages from files (uploaded using File Upload API) to the local repository. If directory specified, aptly would discover package files
automatically.

  Adding same package to local repository is not an error.

  By default aptly would try to remove every successfully processed file and directory :dir (if it becomes empty after import).
    snapshot_create    Create snapshot of current local repository :name contents as new snapshot with name :snapname
    snapshot_delete    Delete snapshot. Snapshot can’t be deleted if it is published. aptly would refuse to delete snapshot if it has been used as source to create other
snapshots, but that could be overridden with force parameter
    snapshot_diff      Calculate difference between two snapshots --name (left) and --withsnapshot (right).
    snapshot_list      Return list of all snapshots created in the system
    snapshot_search    List all packages in snapshot or perform search on snapshot contents and return result
    snapshot_show      Get information about snapshot by name
    snapshot_update    Update snapshot’s description or name
    version            Display aptly server version
...

After:

  NAME:

    aptly-cli

  DESCRIPTION:

    Aptly repository API client

  COMMANDS:

    file_delete        File delete
    file_list          List all directories
    file_upload        File upload
    graph              Download an svg or png graph of repository layout
    help               Display global or [command] help documentation
    publish_drop       Delete published repository
    publish_list       List published repositories
    publish_repo       Publish local repository or snapshot under specified prefix
    publish_update     Update published repository
    repo_create        Create a new repository, requires --name
    repo_delete        Delete a local repository, requires --name
    repo_edit          Edit a local repository metadata, requires --name
    repo_list          Show list of currently available local repositories
    repo_package_query List all packages or search on repo contents, requires --name
    repo_show          Returns basic information about local repository
    repo_upload        Import packages from files
    snapshot_create    Create snapshot, require --name
    snapshot_delete    Delete snapshot, require --name
    snapshot_diff      Calculate difference between two snapshots
    snapshot_list      Return list of all snapshots created in the system
    snapshot_search    List all packages in snapshot or perform search
    snapshot_show      Get information about snapshot by name
    snapshot_update    Update snapshot’s description or name
    version            Display aptly server version

  GLOBAL OPTIONS:

    -h, --help
        Display help documentation

    -v, --version
        Display version information

Because commander shows the summary when you do `aptly-cli --help` and
it displays the description when you do - e.g.: `aptly-cli repo_upload
--help`.

So the summary should be shorter than the description.

Before:

```
  NAME:

    aptly-cli

  DESCRIPTION:

    Aptly repository API client

  COMMANDS:

    file_delete        Deletes all files in upload directory and directory itself. Or delete just a file
    file_list          List all directories that contain uploaded files
    file_upload        Parameter --directory is upload directory name. Directory would be created if it doesn’t exist.
    graph              Download a graph of repository layout.  Current options are "svg" and "png"
    help               Display global or [command] help documentation
    publish_drop       Delete published repository, clean up files in published directory.
    publish_list       List published repositories.
    publish_repo       Publish local repository or snapshot under specified prefix. Storage might be passed in prefix as well, e.g. s3:packages/. To supply empty prefix,
just remove last part (POST /api/publish/:prefix/<:repos>or<:snapshots>
    publish_update     Update published repository. If local repository has been published, published repository would be updated to match local repository contents. If
snapshots have been been published, it is possible to switch each component to new snapshot
    repo_create        Create a new repository, requires --name
    repo_delete        Delete a local repository, requires --name
    repo_edit          Edit a local repository metadata, requires --name
    repo_list          Show list of currently available local repositories
    repo_package_query List all packages in local repository or perform search on repository contents and return result., requires --name
    repo_show          Returns basic information about local repository
    repo_upload        Import packages from files (uploaded using File Upload API) to the local repository. If directory specified, aptly would discover package files
automatically.

  Adding same package to local repository is not an error.

  By default aptly would try to remove every successfully processed file and directory :dir (if it becomes empty after import).
    snapshot_create    Create snapshot of current local repository :name contents as new snapshot with name :snapname
    snapshot_delete    Delete snapshot. Snapshot can’t be deleted if it is published. aptly would refuse to delete snapshot if it has been used as source to create other
snapshots, but that could be overridden with force parameter
    snapshot_diff      Calculate difference between two snapshots --name (left) and --withsnapshot (right).
    snapshot_list      Return list of all snapshots created in the system
    snapshot_search    List all packages in snapshot or perform search on snapshot contents and return result
    snapshot_show      Get information about snapshot by name
    snapshot_update    Update snapshot’s description or name
    version            Display aptly server version
...
```

After:

```
  NAME:

    aptly-cli

  DESCRIPTION:

    Aptly repository API client

  COMMANDS:

    file_delete        File delete
    file_list          List all directories
    file_upload        File upload
    graph              Download an svg or png graph of repository layout
    help               Display global or [command] help documentation
    publish_drop       Delete published repository
    publish_list       List published repositories
    publish_repo       Publish local repository or snapshot under specified prefix
    publish_update     Update published repository
    repo_create        Create a new repository, requires --name
    repo_delete        Delete a local repository, requires --name
    repo_edit          Edit a local repository metadata, requires --name
    repo_list          Show list of currently available local repositories
    repo_package_query List all packages or search on repo contents, requires --name
    repo_show          Returns basic information about local repository
    repo_upload        Import packages from files
    snapshot_create    Create snapshot, require --name
    snapshot_delete    Delete snapshot, require --name
    snapshot_diff      Calculate difference between two snapshots
    snapshot_list      Return list of all snapshots created in the system
    snapshot_search    List all packages in snapshot or perform search
    snapshot_show      Get information about snapshot by name
    snapshot_update    Update snapshot’s description or name
    version            Display aptly server version

  GLOBAL OPTIONS:

    -h, --help
        Display help documentation

    -v, --version
        Display version information
```
@coveralls
Copy link

coveralls commented Jul 16, 2016

Coverage Status

Coverage remained the same at 92.403% when pulling 6cc228c on msabramo:swap_command_descriptions_and_summaries into 8161830 on sepulworld:master.

@sepulworld
Copy link
Owner

msabramo added a commit to msabramo/aptly_cli that referenced this pull request Jul 21, 2016
to reflect the changed help summaries in sepulworld#101.
sepulworld pushed a commit that referenced this pull request Jul 21, 2016
to reflect the changed help summaries in #101.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants