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

Feedback on API usage? #1

Open
ivantsepp opened this issue May 4, 2015 · 7 comments
Open

Feedback on API usage? #1

ivantsepp opened this issue May 4, 2015 · 7 comments

Comments

@ivantsepp
Copy link
Member

I put some sample code at https://github.com/ivantsepp/aasm_graph/blob/master/bin/aasm_graph. This is how you would use it (if you clone it down, you should be able to run the following):

./bin/aasm_graph -Iexample -rjob Job

It generates this: https://github.com/ivantsepp/aasm_graph/blob/master/job.jpg

This is completely throwaway code! Just a sample implementation. I wanted to get feedback on the command line usage. The -I option will add paths to the load path and the -r option will require the files you want to be loaded. Then the command line takes as arguments the class names you want to generate output for.

What do you think about the usage above? Am I missing something? Do we need -I or -r flags? What about the class names as arguments? It would also be good to think about what we should allow to be configurable. I think rankdir should be configurable to be either LR or TB. What about the label names or font?

Should we also name this project to be aasm-graph so that our class names will be like AASM::Graph::CLI? (I'm going off this naming convention).

cc @alto @kitop Your feedback is greatly appreciated!

@kitop
Copy link
Member

kitop commented May 4, 2015

I like the idea! It's a simple way to integrate it with any project.

The -I and -R look fine to me, and I like the fact that match the irb options! :)

For the name, +1 to aasm-graph and go with that naming convention. Specially if it's part of the aasm organization.

@alto
Copy link
Member

alto commented May 5, 2015

I'm fine with changing the name of the gem to aasm-graph. Just let me know when I can do the actual change (you have to clone again or modify your git settings afterwards).

@alto
Copy link
Member

alto commented May 5, 2015

@ivantsepp The graph looks nice, by the way 👍

@mknapik
Copy link

mknapik commented May 13, 2015

👍 for aasm-graph.
Wouldn't it be better to create rake tasks instead of a binary?

FYI, state_machine gem is not supported any more but it has diagram generation.

@ivantsepp
Copy link
Member Author

I don't see a reason not to use rake tasks. We could do both rake tasks and a binary! Yea I took a look at how state_machine implements its graphing and it looks pretty straightforward

@alto
Copy link
Member

alto commented May 14, 2015

Just let me know, when I can rename the repo to aasm-graph.

@ivantsepp
Copy link
Member Author

Hey @alto, @kitop and I have been working on this gem and I think you can go ahead and rename this repo to avoid any further confusion. Thanks!

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

No branches or pull requests

4 participants