0.0
No commit activity in last 3 years
No release in over 3 years
A tool that helps you generate data into multiple databases
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

~> 4.2.5.1
~> 4.5.0
~> 1.6.1
~> 5.0.2
~> 4.25.0
~> 0.19.1
 Project Readme

Datafactory

Build elegant scenarios that generate load a ton of data (fake or real) into various databases and tables. Supports ActiveRecord, Sequel and Mongoid.

Quickstart

$ gem install datamapper
$ mkdir mydatadomain && cd mydatadomain

Generate your flows:

$ datamapper init myflow
$ datamapper domain billing
$ datamapper domain analytics
$ datamapper domain registrations

And a sample flow:

require 'datafactory/dataflow'

class Main
  include Datafactory::Dataflow

  def up
    use :billing
    users = create_list(:user, 20)

    use :analytics
    users.each do |user|
      puts "creating admin user with email #{user.email}"
      u = create(:admin, email: user.email)
      puts u.inspect
    end

    use :registrations
    users.each do |user|
      puts "creating registrant user with email #{user.email}"
      u = create(:registrant, email: user.email)
      puts u.inspect
    end
  end

  def down
    use :billing
    Billing::User.delete_all

    use :analytics
    Analytics::User.delete_all

    use :registrations
    Registrations::User.delete_all
  end
end

Done.

Contributing

Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).

Thanks:

To all contributors

Copyright

Copyright (c) 2016 Dotan Nahum @jondot. See LICENSE for further details.