Skip to content
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

added support for nicknamed routes #483

Merged
merged 6 commits into from
Jul 26, 2016

Conversation

pbendersky
Copy link
Contributor

adds support for nicknamed routes (fixes #481)

require 'spec_helper'

describe 'a nicknamed mounted api' do
before :all do
Copy link
Contributor

@kzaitsev kzaitsev Jul 26, 2016

Choose a reason for hiding this comment

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

please use let!(:app)


describe 'a nicknamed mounted api' do
before :all do
class NicknamedMountedApi < Grape::API
Copy link
Contributor

Choose a reason for hiding this comment

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

also should be Class.new(Grape::API) do, thanks

require 'spec_helper'

describe 'a nicknamed mounted api' do
def app
Copy link
Contributor

Choose a reason for hiding this comment

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

just use let!(:app) do instead method definition

@kzaitsev
Copy link
Contributor

kzaitsev commented Jul 26, 2016

Thanks, do not forget fix rubocop errors, you can try fix this automatically via rubocop -a

/cc @LeFnord

@LeFnord
Copy link
Member

LeFnord commented Jul 26, 2016

👍 … I really like it … filling the skeleton with functionality

@kzaitsev
Copy link
Contributor

@pbendersky thanks, now you need add this feature to CHANGELOG.md

@pbendersky
Copy link
Contributor Author

pbendersky commented Jul 26, 2016

@Bugagazavr fix or feature? I'm leaning towards fix, as it's in the README, but I can see it as a feature as well.

@kzaitsev
Copy link
Contributor

@pbendersky you can add this as fix.

@pbendersky
Copy link
Contributor Author

All set then!

@kzaitsev kzaitsev merged commit 30ce269 into ruby-grape:master Jul 26, 2016
@kzaitsev
Copy link
Contributor

Great job, thanks again

@@ -9,6 +9,7 @@
* [#476](https://github.com/ruby-grape/grape-swagger/pull/476): Fixes for handling the parameter type when body parameters are defined inside desc block - [@anakinj](https://github.com/anakinj).
* [#478](https://github.com/ruby-grape/grape-swagger/pull/478): Refactors building of properties, corrects documentation of array items - [@LeFnord](https://github.com/LeFnord).
* [#479](https://github.com/ruby-grape/grape-swagger/pull/479): Fix regex for Array and Multi Type in doc_methods. Parsing of "[APoint]" should return "APoint" - [@frodrigo](https://github.com/frodrigo).
* [#483](https://github.com/ruby-grape/grape-swagger/pull/483): Added support for nicknamed routes - [@pbendersky](https://github.com/pbendersky)
Copy link
Member

Choose a reason for hiding this comment

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

This is missing a period ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in #485

LeFnord pushed a commit to LeFnord/grape-swagger that referenced this pull request Feb 9, 2019
* added support for nicknamed routes

* uses let instead of method to instantiate the app

* updated spec to use anon class

* fixed rubocop errors

* Refactor to fix rubocop issues.

* Added entry in Changelog.
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.

Can't override nickname when using namespaces and route params
4 participants