Skip to content

iguchi1124/seedog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seedog

Hyper master data manager for activerecord.

Usage

Rails

  1. Put db/Seedfile on your application.
# vi: set ft=ruby :

transaction do
  model User do
    record id: 1 do
      name 'user 1'
    end

    record id: 2 do
      name 'user 2'
    end
  end

  model Profile do
    record user_id: 1 do
      biography 'bio 1'
    end
  end

  model Article do
    record id: 1, user_id: 1 do
      title 'welcome!'
      body 'this is first article!'
    end
  end
end
  1. Run bundle exec rails db:seed or bundle exec rails db:seed:dry-run

Installation

Add this line to your application's Gemfile:

gem 'seedog'

And then execute:

$ bundle

Or install it yourself as:

$ gem install seedog

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

About

Hyper master data manager for activerecord.

Resources

License

Stars

Watchers

Forks

Packages

No packages published