Skip to content

Fix name of template directory#124

Merged
JJ merged 2 commits intoRaku:masterfrom
paultcochrane:pr/fix-template-dir-naming-issue-120
Jul 29, 2020
Merged

Fix name of template directory#124
JJ merged 2 commits intoRaku:masterfrom
paultcochrane:pr/fix-template-dir-naming-issue-120

Conversation

@paultcochrane
Copy link
Contributor

The name of the template directory was changed to templates in
44e524d, which was incorrect as discussed in #120. This commit fixes
issue #120 by using the singular form for this directory name and hence
fixes the test error being seen in t/101-cli.t.

The name of the `template` directory was changed to `templates` in
44e524d, which was incorrect as discussed in Raku#120.  This commit fixes
issue Raku#120 by using the singular form for this directory name and hence
fixes the test error being seen in `t/101-cli.t`.
JJ
JJ previously approved these changes Jul 29, 2020
Copy link
Contributor

@JJ JJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a change, it's OK, but I think the underlying code should be refactored so that every name and list is in a constant, so that we don't have to change it in many places going forward.

@paultcochrane
Copy link
Contributor Author

I agree with you wrt refactoring the code. However, should the highlights directory also be checked for existence on line 123 of CLI.pm6? (It probably should be, but I'm not sufficiently experienced with this code to make that call). Also, how to handle the extra Boolean condition for template at the end of line 123 (!"./template".IO.e and $v) which the other variables don't have?

@JJ
Copy link
Contributor

JJ commented Jul 29, 2020

I agree with you wrt refactoring the code. However, should the highlights directory also be checked for existence on line 123 of CLI.pm6? (It probably should be, but I'm not sufficiently experienced with this code to make that call). Also, how to handle the extra Boolean condition for template at the end of line 123 (!"./template".IO.e and $v) which the other variables don't have?

It most probably should...

paultcochrane added a commit to paultcochrane/Documentable that referenced this pull request Jul 29, 2020
As recommended by @JJ in Raku#124.  This allows information about the
default list of asset-related directories to be localised to one place
and hence make future extension or change easier.
@paultcochrane paultcochrane requested a review from JJ July 29, 2020 12:12
@paultcochrane
Copy link
Contributor Author

Unfortunately, I think the Travis tests will still fail (I'm getting test failures about the render method not being found; also when I'm using documentable directly). Nevertheless, the test which was failing on the missing template directory will still pass.

JJ
JJ previously approved these changes Jul 29, 2020
Copy link
Contributor

@JJ JJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First one is just nitpick, but you should really check the second; the changed code is slightly different. Might be this one is better, which is why I approve; but please check it any way, just in case.

paultcochrane added a commit to paultcochrane/Documentable that referenced this pull request Jul 29, 2020
As recommended by @JJ in Raku#124.  This allows information about the
default list of asset-related directories to be localised to one place
and hence make future extension or change easier.
@paultcochrane paultcochrane force-pushed the pr/fix-template-dir-naming-issue-120 branch from a4a8544 to b3d1b51 Compare July 29, 2020 16:46
@paultcochrane
Copy link
Contributor Author

@JJ many thanks for your comments and feedback! It's refreshing to have someone review my patches so closely!

As recommended by @JJ in Raku#124.  This allows information about the
default list of asset-related directories to be localised to one place
and hence make future extension or change easier.
@paultcochrane paultcochrane force-pushed the pr/fix-template-dir-naming-issue-120 branch from b3d1b51 to 6375510 Compare July 29, 2020 16:51
@JJ
Copy link
Contributor

JJ commented Jul 29, 2020

@JJ many thanks for your comments and feedback! It's refreshing to have someone review my patches so closely!

To the point that documentation is mission-critical, this module is an essential part of that mission, so I guess it pays off to check out pull requests. Which, BTW, I really appreciate.

Copy link
Contributor

@JJ JJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@JJ JJ merged commit e91aea5 into Raku:master Jul 29, 2020
@antoniogamiz antoniogamiz mentioned this pull request Jul 29, 2020
@paultcochrane paultcochrane deleted the pr/fix-template-dir-naming-issue-120 branch July 29, 2020 20:53
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.

2 participants