-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add option for display header text for routes inspector #78
Conversation
@davydovanton This is good for clarity 👍 I'd add a line of separation between the headers and the routes. |
methods: 'Method'.freeze, | ||
path: 'Path'.freeze, | ||
endpoint: 'Action'.freeze | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davydovanton Can you please freeze the hash instead of the single values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice idea, I like this 👍
d8dc8be
to
90aaceb
Compare
@jodosha done. If you want I can squash the commits to one |
nice one |
thanks @joneslee85! 😊 |
Please squash them!
|
90aaceb
to
844b88e
Compare
@jodosha done 🎉 |
Add option for display header text for routes inspector
Thanks! 🌟 P.S.: @jodosha I want to add search pattern (like in rails/rails#18902) what do you think it's good idea? |
@davydovanton No thanks 😄 When in doubt, always rely on UNIX. |
@davydovanton No, I wasn't trolling. Sorry if you've got that feeling. Let me better explain. Our inspector relies on Ruby's way to print on stdout. That is compliant with UNIX pipes. So we don't have to worry how the output of our command is used by other programs like If we include that Because The less features you add, the less you have to worry about. |
wow, thanks for explanation! I agree with you and I think the Unix way is missing in rails. |
A further clarification on what stated above. It's possible to make this feature fully compliant with UNIX. That Pseudo code: routes = ['books', 'book']
input = 'books'
result = routes.find_all do |route|
route.match /#{ input }/
end
puts result However, |
Why this is needful
This option will provide better formatting for
lotus routes
command, for example:/cc @jodosha