Skip to content

Improve human readable fallback version of CLI help messages #3921

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

Merged
merged 6 commits into from
Sep 4, 2020

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Sep 1, 2020

Generating the txt version of man pages with groff is inconvenient for contributors since:

  • It generates inconsisten output accross groff versions.
  • It generates a lot of unnecessary whitespace changes when unrelated content changes, making diffs harder to read.

These pages are only built to be able to provide a human readable version of man pages as a fallback when man is not available.

But we can use the original .ronn sources for that.

This PR implements that, and I actually find the new output more readable, so I'm going to sell this as a documentation improvement 😄.

Before:

BUNDLE-OPEN(1)							BUNDLE-OPEN(1)



NAME
       bundle-open - Opens the source directory for a gem in your bundle

SYNOPSIS
       bundle open [GEM]

DESCRIPTION
       Opens the source directory of the provided GEM in your editor.

       For  this to work the EDITOR or BUNDLER_EDITOR environment variable has
       to be set.

       Example:



	   bundle open 'rack'



       Will open the source directory for the 'rack' gem in your bundle.



				 August 2020			BUNDLE-OPEN(1)

After:

$ bundle open --help
bundle-open(1) -- Opens the source directory for a gem in your bundle
=====================================================================

## SYNOPSIS

`bundle open` [GEM]

## DESCRIPTION

Opens the source directory of the provided GEM in your editor.

For this to work the `EDITOR` or `BUNDLER_EDITOR` environment variable has to
be set.

Example:

    bundle open 'rack'

Will open the source directory for the 'rack' gem in your bundle.

Closes #3918.
Closes #3193 as a side effect from removing txt versions of man pages.

Tasks:

  • Describe the problem / feature
  • Write tests
  • Write code to solve the problem
  • Get code review from coworkers / friends

I will abide by the code of conduct.

@deivid-rodriguez
Copy link
Member Author

CI failure should get fixed by ruby/ruby#3497.

@deivid-rodriguez
Copy link
Member Author

ruby-core fix was merged. I'll retry CI in 24h to make sure that github actions' ruby-head has picked up the fix.

It makes it easier for replacing the txt versions, and also consistent
since `man/gemfile.5.ronn` is already named with this criteria.
Make `map` actually do something useful.
Use the ronn sources as the human readable fallback.
@deivid-rodriguez
Copy link
Member Author

PR rebased. Will merge after CI passes since I can only see upsides and it's a hard PR to keep up to date with the default branch.

@deivid-rodriguez deivid-rodriguez merged commit b7cabde into master Sep 4, 2020
@deivid-rodriguez deivid-rodriguez deleted the remove_txt_docs branch September 4, 2020 10:54
@deivid-rodriguez deivid-rodriguez mentioned this pull request Sep 4, 2020
4 tasks
@eregon
Copy link
Contributor

eregon commented Sep 4, 2020

Thank you!

deivid-rodriguez added a commit that referenced this pull request Oct 5, 2020
Improve human readable fallback version of CLI help messages

(cherry picked from commit b7cabde)
deivid-rodriguez added a commit that referenced this pull request Oct 5, 2020
Improve human readable fallback version of CLI help messages

(cherry picked from commit b7cabde)
deivid-rodriguez added a commit that referenced this pull request Oct 5, 2020
Improve human readable fallback version of CLI help messages

(cherry picked from commit b7cabde)
deivid-rodriguez added a commit that referenced this pull request Oct 6, 2020
Improve human readable fallback version of CLI help messages

(cherry picked from commit b7cabde)
deivid-rodriguez added a commit that referenced this pull request Oct 6, 2020
Improve human readable fallback version of CLI help messages

(cherry picked from commit b7cabde)
deivid-rodriguez added a commit that referenced this pull request Oct 6, 2020
Improve human readable fallback version of CLI help messages

(cherry picked from commit b7cabde)
hsbt added a commit to ruby/ruby that referenced this pull request Oct 15, 2020
tnir added a commit to tnir/bundler-site that referenced this pull request Jun 22, 2022
Dead links to source Git happen on both for v2.3 and earlier man pages.

This regression has happened since 2020-09-04 with rubygems/rubygems#3921
rubygems/rubygems#3921
but most of them was resolved in PR 542.
rubygems#542

Due to missing tags for Bundler 2.0.2 and 2.1.4 on GitHub,
we need to link the latest patch versions available on GitHub.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
tnir added a commit to tnir/bundler-site that referenced this pull request Jun 23, 2022
Dead links to source Git happen on both for v2.3 and earlier man pages.

This regression has happened since 2020-09-04 with rubygems/rubygems#3921
rubygems/rubygems#3921
but most of them was resolved in PR 542.
rubygems#542

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
tnir added a commit to tnir/bundler-site that referenced this pull request Jun 23, 2022
This regression has happened since 2020-09-04 with rubygems/rubygems#3921
- rubygems/rubygems#3921
but most of them was resolved in PR 542.
- rubygems#542
Links from each man page will be fixed in PR 615 apart from this
- rubygems#615

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
tnir added a commit to tnir/bundler-site that referenced this pull request Jun 23, 2022
Dead links to source Git happen on both for v2.3 and earlier man pages.

This regression has happened since 2020-09-04 with rubygems/rubygems#3921
rubygems/rubygems#3921
but most of them was resolved in PR 542.
rubygems#542

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
tnir added a commit to tnir/bundler-site that referenced this pull request Jun 24, 2022
Dead links to source Git happen on both for v2.3 and earlier man pages.

This regression has happened since 2020-09-04 with rubygems/rubygems#3921
rubygems/rubygems#3921
but most of them was resolved in PR 542.
rubygems#542

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
purecodecoach added a commit to purecodecoach/bundler-site that referenced this pull request Jan 13, 2023
This regression has happened since 2020-09-04 with rubygems/rubygems#3921
- rubygems/rubygems#3921
but most of them was resolved in PR 542.
- rubygems/bundler-site#542
Links from each man page will be fixed in PR 615 apart from this
- rubygems/bundler-site#615

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
purecodecoach added a commit to purecodecoach/bundler-site that referenced this pull request Jan 13, 2023
Dead links to source Git happen on both for v2.3 and earlier man pages.

This regression has happened since 2020-09-04 with rubygems/rubygems#3921
rubygems/rubygems#3921
but most of them was resolved in PR 542.
rubygems/bundler-site#542

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove txt version of man pages The .txt (help) files have malformed ANSI sequences.
3 participants