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

Rails/HttpStatus custom HTTP status #560

Closed
harold-s opened this issue Feb 23, 2018 · 1 comment
Closed

Rails/HttpStatus custom HTTP status #560

harold-s opened this issue Feb 23, 2018 · 1 comment
Labels

Comments

@harold-s
Copy link

harold-s commented Feb 23, 2018

rubocop : 0.52.1
rubocop-rspec : 1.23.0

Hello the new Cop Rails/HttpStatus is relying on ::Rack::Utils::SYMBOL_TO_STATUS_CODE to check if we're using a symbol.
::Rack::Utils::SYMBOL_TO_STATUS_CODE only has symbols for the following http status :

[100, 101, 102, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511]

If we're using custom HTTP status (like 550), then we get an offense.

@harold-s harold-s changed the title Rubocop:Cop:Rspec:Rails:HttpStatus custom HTTP status Rails/HttpStatus custom HTTP status Feb 23, 2018
@bquorning bquorning added the bug label Feb 23, 2018
@harold-s
Copy link
Author

Thanks !!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants