Skip to content
This repository was archived by the owner on Mar 5, 2018. It is now read-only.

lexgorbunov/seedman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seedman

Gem для добавления прогресбара к сидам

Пример

users: [
          {
            email: 'user@example.com',
            password: '123456'
          }
        ]

seedman = Seedman.new(title: 'Заполнение...')

seedman.add 'Создание пользователей', users.count do
  seedman.store.users = users.map do |attrs|
    result = User.create!(attrs)
    seedman.inc
    result
  end
end

seedman.process

В seedman.store.users будут находиться созданные пользователи

Installation

Add this line to your application's Gemfile:

gem 'seedman'

And then execute:

$ bundle

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors