(PROJECT NEEDS NEW MAINTAINER) Seed Fu-like functionality for Mongoid
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
John Bintz 9feb8e6459
Merge pull request #3 from pblesi/master
7 years ago
config add some tests and the ability to create objects via hashes 11 years ago
features fix seed_once! functionality 9 years ago
lib add quiet flag to seed output 9 years ago
.gitignore initial commit 11 years ago
Gemfile add some tests and the ability to create objects via hashes 11 years ago
Guardfile add some tests and the ability to create objects via hashes 11 years ago
LICENSE.txt initial commit 11 years ago
README.md add ability to seed through code 11 years ago
Rakefile add some tests and the ability to create objects via hashes 11 years ago
seed-fu-mongoid.gemspec add some tests and the ability to create objects via hashes 11 years ago

README.md

I missed Seed Fu when I was working on a Mongoid app, so I hacked this together in about 20 minutes. No tests whatsoever but it works with my very simple Seed Fu-like seed data, so if you like it, contribute some tests!

Usage

Seed files in db/fixtures/*.rb:

PermissionType.seed do |s|
  s.id = 1
  s.type = 'Users'
end

PermissionType.seed do |s|
  s.id = 2
  s.type = 'Sites'
end

Then rake db:seed_fu if you're in Rails.

Simple!

Capistrano

require 'seed-fu-mongoid/capistrano' to have your data get re-seeded on deploy.

Cucumber/RSpec

SeedFuMongoid.seed