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

document auto-generate features #162

Open
kerrizor opened this Issue Aug 22, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@kerrizor
Contributor

kerrizor commented Aug 22, 2015

Added by #148 the auto-generate feature will, when installed, generate a new ERD whenever rake db:migrate is invoked in development.

@kerrizor kerrizor added this to the 1.5.0 milestone Aug 22, 2015

@cherimarie

This comment has been minimized.

Show comment
Hide comment
@cherimarie

cherimarie Oct 23, 2015

Contributor

screen shot 2015-10-23 at 1 21 46 pm

We can't get this feature to work, on any of three projects we tried it in. So maybe we need documentation before we can write documentation? :)

Also, does documentation for features like this go in the README or the Jekyll site?

Contributor

cherimarie commented Oct 23, 2015

screen shot 2015-10-23 at 1 21 46 pm

We can't get this feature to work, on any of three projects we tried it in. So maybe we need documentation before we can write documentation? :)

Also, does documentation for features like this go in the README or the Jekyll site?

@mintuhouse

This comment has been minimized.

Show comment
Hide comment
@mintuhouse

mintuhouse Dec 9, 2015

There a couple of changes that need to be made before it works.

  1. In auto_generate_diagram.rake,
    Erd is undefined.
    It should be changed to RailsErd.load_tasks
  2. And define load_tasks in rails_erd.rb
  def self.loaded_tasks=(val); @loaded_tasks = val; end
  def self.loaded_tasks; return @loaded_tasks; end

  def self.load_tasks
    return if(self.loaded_tasks)
    self.loaded_tasks = true

    Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
  end

Note: See annotate for original implementation

  1. Also in auto_generate_diagram.rake, either we need to define a rake task erd:default or change that line to bundle exec erd

Note:
Configuring can now only be done via .erdconfig.
Ideal way I suppose would be invoke CLI and allow config as part of template rake task

mintuhouse commented Dec 9, 2015

There a couple of changes that need to be made before it works.

  1. In auto_generate_diagram.rake,
    Erd is undefined.
    It should be changed to RailsErd.load_tasks
  2. And define load_tasks in rails_erd.rb
  def self.loaded_tasks=(val); @loaded_tasks = val; end
  def self.loaded_tasks; return @loaded_tasks; end

  def self.load_tasks
    return if(self.loaded_tasks)
    self.loaded_tasks = true

    Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
  end

Note: See annotate for original implementation

  1. Also in auto_generate_diagram.rake, either we need to define a rake task erd:default or change that line to bundle exec erd

Note:
Configuring can now only be done via .erdconfig.
Ideal way I suppose would be invoke CLI and allow config as part of template rake task

@nielspetersen

This comment has been minimized.

Show comment
Hide comment
@nielspetersen

nielspetersen Feb 2, 2016

We've listed this issue within the 14th RubyIssues. https://rubyissues.ongoodbits.com/. 💎
We keep our fingers crossed!

nielspetersen commented Feb 2, 2016

We've listed this issue within the 14th RubyIssues. https://rubyissues.ongoodbits.com/. 💎
We keep our fingers crossed!

@kerrizor kerrizor removed this from the 1.5.0 milestone May 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment