Sha256: 1ae17da5668b1c73bba4a28a602e1ade4d0f893d443f9c8d8f9ced2a88ef49c3

Contents?: true

Size: 1019 Bytes

Versions: 1

Compression:

Stored size: 1019 Bytes

Contents

###
# NB: for local testing run like:
#
# 1.8.x: ruby -Ilib -rrubygems lib/sportdb.rb
# 1.9.x: ruby -Ilib lib/sportdb.rb

# core and stlibs

require 'yaml'
require 'pp'
require 'logger'
require 'optparse'
require 'fileutils'

# rubygems

require 'active_record'   ## todo: add sqlite3? etc.


# our own code

require 'sportdb/schema'
require 'sportdb/models'
require 'sportdb/utils'
require 'sportdb/loader'
require 'sportdb/version'
require 'sportdb/cli/opts'
require 'sportdb/cli/runner'

module SportDB

  def self.banner
    "sportdb #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
  end

  def self.root
    "#{File.expand_path( File.dirname(File.dirname(__FILE__)) )}"
  end

  def self.main
    Runner.new.run(ARGV)
  end
  

  # load built-in (that is, bundled within the gem) named seeds
  # - pass in an array of seed names e.g. [ 'cl/teams', 'cl/2012_13/cl' ] etc.

  def self.load( args )
    Loader.new.run( args )
  end

end  # module SportDB


SportDB.main if __FILE__ == $0

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sportdb-0.2.0 lib/sportdb.rb