{"action":"created","issue":{"url":"https://api.github.com/repos/voormedia/rails-erd/issues/175","labels_url":"https://api.github.com/repos/voormedia/rails-erd/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/voormedia/rails-erd/issues/175/comments","events_url":"https://api.github.com/repos/voormedia/rails-erd/issues/175/events","html_url":"https://github.com/voormedia/rails-erd/issues/175","id":113892487,"number":175,"title":"Gem behavior differs depending on whether it is run with 'rake erd' or 'bundle exec erd'","user":{"login":"cherimarie","id":2523812,"avatar_url":"https://avatars.githubusercontent.com/u/2523812?v=3","gravatar_id":"","url":"https://api.github.com/users/cherimarie","html_url":"https://github.com/cherimarie","followers_url":"https://api.github.com/users/cherimarie/followers","following_url":"https://api.github.com/users/cherimarie/following{/other_user}","gists_url":"https://api.github.com/users/cherimarie/gists{/gist_id}","starred_url":"https://api.github.com/users/cherimarie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cherimarie/subscriptions","organizations_url":"https://api.github.com/users/cherimarie/orgs","repos_url":"https://api.github.com/users/cherimarie/repos","events_url":"https://api.github.com/users/cherimarie/events{/privacy}","received_events_url":"https://api.github.com/users/cherimarie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/voormedia/rails-erd/labels/Documentation","name":"Documentation","color":"d4c5f9"},{"url":"https://api.github.com/repos/voormedia/rails-erd/labels/Enhancement","name":"Enhancement","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-28T18:37:51Z","updated_at":"2015-11-04T21:33:14Z","closed_at":null,"body":"This is confusing! \r\n\r\nexample: \r\nConfiguration settings must be prepended with '--' for 'bundle exec erd', but not with 'rake erd'\r\n```bundle exec erd --attributes=false --orientation=vertical``` Valid!\r\n```rake erd attributes=false orientation=vertical``` Valid!\r\n\r\n```bundle exec erd attributes=false orientation=vertical``` Invalid :(\r\n```rake erd --attributes=false --orientation=vertical``` Invalid :(\r\n\r\nexample: \r\nOrientation option does nothing when included in 'bundle exec erd', but does alter results when included in 'rake erd'.\r\n\r\nPossible solutions: \r\n- update documentation to clearly explain expected behavior with the different commands\r\n- update gem so that behavior is the same no matter how it's run\r\n\r\nUpdating documentation is relatively straightforward, so seems a good place to start. \r\n\r\nAre these differences in behavior intentional? Is eliminating them desirable? "},"comment":{"url":"https://api.github.com/repos/voormedia/rails-erd/issues/comments/153872602","html_url":"https://github.com/voormedia/rails-erd/issues/175#issuecomment-153872602","issue_url":"https://api.github.com/repos/voormedia/rails-erd/issues/175","id":153872602,"user":{"login":"kerrizor","id":257689,"avatar_url":"https://avatars.githubusercontent.com/u/257689?v=3","gravatar_id":"","url":"https://api.github.com/users/kerrizor","html_url":"https://github.com/kerrizor","followers_url":"https://api.github.com/users/kerrizor/followers","following_url":"https://api.github.com/users/kerrizor/following{/other_user}","gists_url":"https://api.github.com/users/kerrizor/gists{/gist_id}","starred_url":"https://api.github.com/users/kerrizor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerrizor/subscriptions","organizations_url":"https://api.github.com/users/kerrizor/orgs","repos_url":"https://api.github.com/users/kerrizor/repos","events_url":"https://api.github.com/users/kerrizor/events{/privacy}","received_events_url":"https://api.github.com/users/kerrizor/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T21:33:14Z","updated_at":"2015-11-04T21:33:14Z","body":"After looking at the implementation, I think we do need to narrow the \"surface area\" here. \r\n\r\nI'm reluctant to remove the binary (`$ bundle exec erd` or simply `$ erd`) because\r\n+ preferences and config files for repeatable/comparable ERD generation was strongly desired by many users\r\n+ setting preferences via environment variables is cumbersome\r\n+ having a binary removes the need to actually install the thing into your project\r\n\r\nI'm reluctant to remove the rake task because\r\n+ it is somewhat easier to automate for post-CI builds or as part of `rake db:migrate`\r\n+ it feels a bit more accessible and expected to add rake tasks, and sets a pattern for hooking into existing tools\r\n\r\nI believe we could refactor the rake task(s) to align with the command line tool in terms of what is executed, either by simply running the same command and interpreting environment variables into `choice` options, or by actually attempting a system call (somewhat inadvisable, but we can experiment.) This would let us keep both methods in place for the differing use cases. Thoughts?"}}