rspec / rspec-rails

RSpec for Rails 7+
https://rspec.info
MIT License
5.19k stars 1.04k forks source link

Updateed Documentation to Improve Code Blocks #2727

Closed threeplanetssoftware closed 10 months ago

threeplanetssoftware commented 10 months ago

Similar to the PRs to rspec-expectations and rspec-core, this PR just updates the documentation to better provide syntax highlighting for code blocks. Two things I didn't touch which you might want to consider your stance on in the future:

  1. With the indentation of the code snippet, a lot of the code blocks now have extra spaces in front of each line. This isn't Python, so it won't hurt usability, but you may want to normalize those at some point.
  2. The features/GettingStarted.md file has shell commands that were manually preceded with a dollar sign. This is good for indicating it is a shell but bad for copy/pasting successfully. Unlike the above empty white space, that sigil does have a meaning. Because this was already present I did not touch it, but you may want to consider if they should be removed to let someone copy multiple lines at once.

As before, I ran the automated tests and Cucumber didn't report any issues:

178 scenarios (178 passed)
657 steps (657 passed)
8m57.205s
threeplanetssoftware commented 10 months ago

Please see the latest push for fixes to the above issues. Will go back and check the other repos I touched.

threeplanetssoftware commented 10 months ago

My apologies for not noticing the ordered list repeating number 1. I have fixed the indentation of those blocks so that the list is ordered again. I ran the cucumber checks again and it is still passing. Have a great evening,

pirj commented 10 months ago

check all these fence changes against the website generation

Two observations:

I will take a closer look later.

threeplanetssoftware commented 10 months ago

Thank you!

JonRowe commented 10 months ago

These have been published, they don't change the output though because our syntax highlighting on features at least don't support the extra information I guess

threeplanetssoftware commented 9 months ago

Good morning! I appreciate your pushing a fresh copy of the docs live, I know that can be tedious.

I believe the updated formatting should work, as I was able to use your rspec-dev and rspec.github.io repositories to view it. I suspect the issue is that the latest rspec-rails tag (6.1.1) was cut two weeks ago, prior to merging these documentation changes.

I can recreate the formatting issue on the current rspec-dev repository by running rake update-docs["6.1.1"]. If I add a new tag to rspec-rails of 6.1.2 at the current head, then update_docs displays the newer formatting.

image

Note: I do not expect you to cut a new release just for documentation, but whenever you do have a new release, I believe this will work. Thank you again for your work on rspec, I have been adding a lot of it in the past week and have greatly enjoyed it.

JonRowe commented 9 months ago

The build ran against 6-1-maintenance which is supposed to pull in changes even if not released, I also noticed no change locally on my machine 🤔