module Export

Public Class Methods

export_all() click to toggle source
# File app/models/export/base.rb, line 4
def Export.export_all
  Alias.export
  Category.export
  Event.export
  Person.export
  Race.export
  Result.export
  Team.export
  Dir.chdir("#{Rails.root}/public/export") do
    %xrm *.bz2` if Dir.glob("*.bz2").present?
    %xtar --create --bzip2 --file=#{RacingAssociation.current.short_name.downcase}.tar.bz2 *.*`
    %xrm *.txt` if Dir.glob("*.txt").present?
    %xrm *.csv` if Dir.glob("*.csv").present?
  end
end