rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.23k stars 765 forks source link

disable_monkey_patching url in spec helper template links to unavailable Relish documentation #3031

Closed tomczak-mateusz closed 1 year ago

tomczak-mateusz commented 1 year ago

Subject of the issue

disable_monkey_patching url in spec helper template links to unavailable Relish documentation

As I have read on page: https://rspec.info/documentation/ - RSpec documentation is being moved to rspec.info from RelishApp:

Screenshot 2023-04-16 at 11 50 34

I have opened this issue as it might be confusing for the fresh RSpec users to hit the unavailable link.

Your environment

Steps to reproduce

  1. add rspec-rails to Rails application
  2. run rails generate rspec:install
  3. open generated spec_helper file
  4. go to:
    # Limits the available syntax to the non-monkey patched syntax that is
    # recommended. For more details, see:
    # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
    config.disable_monkey_patching!
  5. open For more details, see link: https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
  6. application error template should be shown with 503 error status Screenshot 2023-04-16 at 11 46 26

Expected behavior

Actual behavior

pirj commented 1 year ago

@JonRowe If I replace 3.12 in https://rspec.info/documentation/3.12/rspec-core/RSpec/Core/Configuration.html#disable_monkey_patching!-instance_method to latest, it redirects to the right page, but the #disable_monkey_patching!-instance_method anchor is lost.

tomczak-mateusz commented 1 year ago

@pirj hi, correct, it's the same case for me.

btw I have tried to open Pull Request with updates for links from RelishApp to RSpec.info around the whole repository, but while doing so I'm getting 403 error:

➜  rspec-core git:(main) git checkout -b issue-3031
Switched to a new branch 'issue-3031'

➜  rspec-core git:(issue-3031) git push -u origin issue-3031
remote: Permission to rspec/rspec-core.git denied to tomczak-mateusz.
fatal: unable to access 'https://github.com/rspec/rspec-core.git/': The requested URL returned error: 403

any ideas what's wrong with this flow? :confused: it's not clear to me after following https://github.com/rspec/rspec-core#contributing

pirj commented 1 year ago

It's missing from the docs, but normally, you fork the repo, push the changes to your forked repo, and send a PR upstream.

tomczak-mateusz commented 1 year ago

@pirj thanks, gonna try the proposed path

@JonRowe I would also like to suggest to update the GitHub repository 'About' url from : relishapp.com/rspec/rspec-core to https://rspec.info/documentation/latest/rspec-core/ as it might be currently confusing for the users that are not aware that Relish docs are down.

Screenshot 2023-04-16 at 12 27 29
pirj commented 1 year ago

Nice catch. Other repos, too, and rspec-rails to https://rspec.info/documentation/latest/rspec-rails

tomczak-mateusz commented 1 year ago

@pirj @JonRowe I have taken the opportunity to open the issues for 'About' url updates in each of the repos that mentions Relish for consistency & track ability: rspec-core: https://github.com/rspec/rspec-core/issues/3032 rspec-mocks: https://github.com/rspec/rspec-mocks/issues/1543 rspec-expectations: https://github.com/rspec/rspec-expectations/issues/1417

tomczak-mateusz commented 1 year ago

@JonRowe If I replace 3.12 in https://rspec.info/documentation/3.12/rspec-core/RSpec/Core/Configuration.html#disable_monkey_patching!-instance_method to latest, it redirects to the right page, but the #disable_monkey_patching!-instance_method anchor is lost.

@JonRowe if it's possible to fix rspec.info docs to work with latest in the url path and to not drop the anchor part like in the example above - I would be very happy to update all Relish related links in rspec-core, rspec-rails, rspec-mocks, and rspec-expectations to work with rspec.info.

Please confirm if that's doable. :wink:

pirj commented 1 year ago

@tomczak-mateusz I guess this is handled here and here if you feel adventurous enough to try fixing the missing anchor.

JonRowe commented 1 year ago

Fixed in #3035

JonRowe commented 1 year ago

Remove of the link in generated content was released in 3.12.2