Conversation
|
Wow this is amazing, thank you! |
|
This is great! Good work... Okay so to get things working I had to:
going to work some more on it tomorrow. do you want to commit? |
|
@matteodepalo That makes sense, I'll refactor it.
|
|
i am using ENV='test' a couple of things to note…
let me know if there’s anything you would like me to test. |
|
|
For 2) I'd like to see it as an option. Keeping separate files helps readability and caching. |
lib/rspec_api_blueprint.rb
Outdated
There was a problem hiding this comment.
There is an issue with this because if you put your controllers into a separate folder, for example app/controllers/api it blows up.
There was a problem hiding this comment.
That's what the Configuration is for.
However, I'll be happy with a better way to determine the file location. One option is to take it from the described_class if the spec is written as
describe Api::ArenasController do
...
endwhich would work for the controller (action) docs. Not sure how to leverage this for models although they are usually all in one folder even if you have multiple api versions.
There was a problem hiding this comment.
Good point, didn't notice that config option.
I don't think there is a need to be smarter about determining the location since in request specs you usually write describe 'Arenas Requests' instead of specifying the controller class.
There was a problem hiding this comment.
Well, about Arenas Requests... I changed it to read as Group Arena since that's what is then generated into the blueprint and I'm not sure ... Requests is a rspec (community) standard.
There was a problem hiding this comment.
Yeah in any case it's usually strings.
|
Anyone still interested in this? I'd love to see this become reality. |
|
We're actively using it internally (latest changes at https://github.com/chute/rspec_api_blueprint/tree/feat/markdown-docs). Will try to find some time probably next weekend to refactor the code a finish the PR. |
|
I was going to pull and rebase this, but it's going to be tough because the PR has no tests :( |
|
I started writing some tests on my branch, let me review and push them. |
|
I just started using this gem, I see the dates of this comment is this gem still being maintained? |
|
@ChrisCPO Not very much maintained although it's still being used. You can pull the latest from https://github.com/chute/rspec_api_blueprint/tree/feat/markdown-docs but it comes with no warranty ;) |
Still WIP, opening the PR for feedback on design changes I made for the sake of clarity/simplification.
Also would like to add tests before merging (currently have them almost working locally).