Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Fix incorrect sectioning in gemfile man page #7265

Merged
2 commits merged into from
Jul 31, 2019
Merged

Fix incorrect sectioning in gemfile man page #7265

2 commits merged into from
Jul 31, 2019

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user problem that led to this PR?

The problem was that Gemfile's man page has incorrect syntax in the section where examples for :ref, :tag and :branch are given.

What was your diagnosis of the problem?

My diagnosis was that the section was incorrect since the examples were listed as a separate section. Also, the syntax seems incorrect, since building the docs with ronn-ng (something I've been experimenting with lately) gives the following error:

$ bin/rake man/gemfile.5
/home/deivid/.rbenv/versions/2.6.3/bin/ruby -S ronn --roff --pipe man/gemfile.5.ronn > man/gemfile.5
warn: unrecognized inline tag: ["p"]
warn: unrecognized inline tag: ["p"]
warn: unrecognized inline tag: ["p"]
man/gemfile.5 ran for   0.000305   0.000038   0.317832 (  0.317939)

What is your fix for the problem, implemented in this PR?

My fix is to correct the syntax. The comparison of the rendered man page is:

bundle help gemfile (before)

   (...)
       branch, tag, and ref
              You MUST only specify at most one of these options. The default is :branch => "master"

       For example:

       submodules
              For  reference,  a  git  submodule https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you have another git repository within a subfolder of your
              repository. Specify :submodules => true to cause bundler to expand any submodules included in the git repository
   (...)

bundle help gemfile (after)

   (...)
       branch, tag, and ref
              You MUST only specify at most one of these options. The default is :branch => "master". For example:

              git "https://github.com/rails/rails.git", :branch => "5-0-stable" do

              git "https://github.com/rails/rails.git", :tag => "v5.0.0" do

              git "https://github.com/rails/rails.git", :ref => "4aded" do

       submodules
              For  reference,  a  git  submodule https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you have another git repository within a subfolder of your
              repository. Specify :submodules => true to cause bundler to expand any submodules included in the git repository
   (...)

Why did you choose this fix out of the possible options?

I chose this fix because it seems like the right thing to do.

@deivid-rodriguez
Copy link
Member Author

Well, I'm now looking at the documentation that will become "visible" after this fix, and I see that it's incorrect 🤣

Shouldn't

git "https://github.com/rails/rails.git", :branch => "5-0-stable" do

be

gem "rails", :git => "https://github.com/rails/rails.git", :branch => "5-0-stable"

And so on?

@deivid-rodriguez
Copy link
Member Author

Straightforward fix, so I'll merge it.

@bundlerbot r+

ghost pushed a commit that referenced this pull request Jul 31, 2019
7265: Fix incorrect sectioning in `gemfile` man page r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that Gemfile's man page has incorrect syntax in the section where examples for `:ref`, `:tag` and `:branch` are given.

### What was your diagnosis of the problem?

My diagnosis was that the section was incorrect since the examples were listed as a separate section. Also, the syntax seems incorrect, since building the docs with [ronn-ng]() (something I've been experimenting with lately) gives the following error:

```
$ bin/rake man/gemfile.5
/home/deivid/.rbenv/versions/2.6.3/bin/ruby -S ronn --roff --pipe man/gemfile.5.ronn > man/gemfile.5
warn: unrecognized inline tag: ["p"]
warn: unrecognized inline tag: ["p"]
warn: unrecognized inline tag: ["p"]
man/gemfile.5 ran for   0.000305   0.000038   0.317832 (  0.317939)
```

### What is your fix for the problem, implemented in this PR?

My fix is to correct the syntax. The comparison of the rendered man page is:

#### `bundle help gemfile` (before)

```
   (...)
       branch, tag, and ref
              You MUST only specify at most one of these options. The default is :branch => "master"

       For example:

       submodules
              For  reference,  a  git  submodule https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you have another git repository within a subfolder of your
              repository. Specify :submodules => true to cause bundler to expand any submodules included in the git repository
   (...)
```

#### `bundle help gemfile` (after)

```
   (...)
       branch, tag, and ref
              You MUST only specify at most one of these options. The default is :branch => "master". For example:

              git "https://github.com/rails/rails.git", :branch => "5-0-stable" do

              git "https://github.com/rails/rails.git", :tag => "v5.0.0" do

              git "https://github.com/rails/rails.git", :ref => "4aded" do

       submodules
              For  reference,  a  git  submodule https://git-scm.com/book/en/v2/Git-Tools-Submodules lets you have another git repository within a subfolder of your
              repository. Specify :submodules => true to cause bundler to expand any submodules included in the git repository
   (...)
```

### Why did you choose this fix out of the possible options?

I chose this fix because it seems like the right thing to do.


Co-authored-by: David Rodríguez <[email protected]>
@ghost
Copy link

ghost commented Jul 31, 2019

Build succeeded

@ghost ghost merged commit bda0fa0 into master Jul 31, 2019
@ghost ghost deleted the fix_gemfile_manpage branch July 31, 2019 11:10
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant