Sha256: 91e587ecebd269d019da57ccaea204f5f7475f9e4785c3b7e37f494ba9ba310f

Contents?: true

Size: 701 Bytes

Versions: 1

Compression:

Stored size: 701 Bytes

Contents

require "yaml"
require "csv"
require "pathname"

require "active_support"
require "active_record"
require "activerecord-import"

require "seed_gimmick/version"
require "seed_gimmick/errors"
require "seed_gimmick/options"
require "seed_gimmick/inflector"
require "seed_gimmick/finder"
require "seed_gimmick/seed_io"
require "seed_gimmick/seed_file"
require "seed_gimmick/railtie" if defined?(Rails)

module SeedGimmick
  def self.bootstrap!(options = nil)
    SeedFile.find(options).each do |seed|
      seed.bootstrap!
    end
  end

  def self.seed_from(path)
    path = Pathname.new(path.to_s) unless path.is_a?(Pathname)
    options = Options.new(seed_dir: path)
    bootstrap!(options)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
seed_gimmick-0.0.1 lib/seed_gimmick.rb