module CsvPack

note: for now use in-memory sqlite3 db

Constants

MAJOR
MINOR
PATCH
VERSION

Public Class Methods

banner() click to toggle source
import( *args ) click to toggle source
# File lib/csvpack.rb, line 30
def self.import( *args )
  ## step 1: download
  dl = Downloader.new
  args.each do |arg|
    dl.fetch( arg )
  end

  ## step 2: up 'n' import
  args.each do |arg|
    pack = Pack.new( "./pack/#{arg}/datapackage.json" )
    pack.tables.each do |table|
      table.up!
      table.import!
    end
  end
end
root() click to toggle source
# File lib/csvpack/version.rb, line 18
def self.root
  File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
end
version() click to toggle source
# File lib/csvpack/version.rb, line 10
def self.version
  VERSION
end