Skip to content

Added support for kramdown, redcarpet and custom formatters. #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2014

Conversation

antek-drzewiecki
Copy link
Contributor

This pull requests add support for Kramdown, Redcarpet and custom markdown formatters.
To mark up your code, you need to configure grape-swagger with a markdown adapter.
Implementation relates to issue #138.

Feedback is appreciated.

@antek-drzewiecki
Copy link
Contributor Author

I noticed redcarpet does not work with jruby because it's written in C. Maybe extract the redcarpet adapter in a separate gem? Or are there other work-arounds?

@@ -16,6 +16,7 @@
* [#128](https://github.com/tim-vandecasteele/grape-swagger/pull/128): Combine global models and endpoint entities - [@dspaeth-faber](https://github.com/dspaeth-faber).
* [#132](https://github.com/tim-vandecasteele/grape-swagger/pull/132): Addes support for enum values in entity documentation and form parameters - [@Antek-drzewiecki](https://github.com/Antek-drzewiecki).
* [#135](https://github.com/tim-vandecasteele/grape-swagger/pull/135): Fixed model inclusion in models with aliased references - [@cdarne](https://github.com/cdarne).
* Added support for kramdown, redcarpet and custom formatters - [@Antek-drzewiecki](https://github.com/Antek-drzewiecki).
Copy link
Member

Choose a reason for hiding this comment

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

Amend with a link to this PR.

@dblock
Copy link
Member

dblock commented Aug 14, 2014

You should be able to exclude the tests that cannot run on JRuby programmatically, start with .gemspec as explained in http://stackoverflow.com/questions/8940271/build-a-ruby-gem-and-conditionally-specify-dependencies and put conditions around specs.

@antek-drzewiecki
Copy link
Contributor Author

Thanks for the review, I forgot that the gemspec file is ruby too. ;) I also removed the gemfile.lock from the project since many best practices state that the lock file should not be included in ruby gems.

@dblock
Copy link
Member

dblock commented Aug 14, 2014

This is perfect, merging.

dblock added a commit that referenced this pull request Aug 14, 2014
Added support for kramdown, redcarpet and custom formatters.
@dblock dblock merged commit 4635912 into ruby-grape:master Aug 14, 2014
@dblock
Copy link
Member

dblock commented Aug 14, 2014

I think it would be good to add an UPGRADING document, ala Grape's and note that this is an API change.

@antek-drzewiecki
Copy link
Contributor Author

Good idea dblock, i'll start working on it tomorrow.

@kai-breitbarth-zz
Copy link

undefined method `StandardError' for #GrapeSwagger::Markdown:0x007f40ba91e6f8 (NoMethodError)

antek-drzewiecki pushed a commit to antek-drzewiecki/grape-swagger that referenced this pull request Aug 14, 2014
…anged throw of StandardError to ArgumentError.
@antek-drzewiecki
Copy link
Contributor Author

Thank you @kai-breitbarth, spec didn't cover that very well.

dblock added a commit that referenced this pull request Aug 15, 2014
@dblock
Copy link
Member

dblock commented Aug 15, 2014

Merged the fix.

@dblock
Copy link
Member

dblock commented Aug 17, 2014

@antek-drzewiecki FYI, I added RELEASING.md, it might need a mention on the bottom about announcing a new release to read UPGRADING.

@dblock
Copy link
Member

dblock commented Aug 27, 2014

Bump @antek-drzewiecki on UPGRADING - I was hoping to release this.

@antek-drzewiecki
Copy link
Contributor Author

@dblockotorg. I am currently on holyday. I found a public pc I could use to
issue the upgrading document. But I found myself that github.com does not
respond or is down currently. So i'll look for a public pc tonight, maybe
github does respond so I can add a ssh key, so I can push the document.

On Wed, Aug 27, 2014 at 6:48 PM, Daniel Doubrovkine (dB.) @dblockdotorg <
notifications@github.com> wrote:

Bump @antek-drzewiecki https://github.com/Antek-drzewiecki on UPGRADING

  • I was hoping to release this.


Reply to this email directly or view it on GitHub
https://github.com/tim-vandecasteele/grape-swagger/pull/142#issuecomment-53603587
.

@dblock
Copy link
Member

dblock commented Aug 29, 2014

I'd take content as a comment here if that doesn't work - happy to integrate that.

@antek-drzewiecki
Copy link
Contributor Author

I managed to set up a pull request #147 :) I hope you find it to your liking.

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.

3 participants