Sha256: cc3a32bd819bc74ebfadd82f8b0d0cc74c7e4647be9ef3d1e66d1deb5196852e

Contents?: true

Size: 832 Bytes

Versions: 1

Compression:

Stored size: 832 Bytes

Contents

#
# testing ruote-sequel
#
# Thu Feb 10 11:14:56 JST 2011
#

require 'yajl' rescue require 'json'
require 'rufus-json'
Rufus::Json.detect_backend

require 'ruote-sequel'

unless $sequel

  $sequel = Sequel.connect('postgres://localhost/ruote_test')
  #$sequel = Sequel.connect('mysql://root:root@localhost/ruote_test')

  Ruote::Sequel.create_table($sequel, true)
    # true forces re_create of 'documents' table

  require 'logger'

  logger = nil

  if ARGV.include?('-l') || ARGV.include?('--l')
    FileUtils.rm('debug.log') rescue nil
    logger = Logger.new('debug.log')
  elsif ARGV.include?('-ls') || ARGV.include?('--ls')
    logger = Logger.new($stdout)
  end

  if logger
    logger.level = Logger::DEBUG
    $sequel.loggers << logger
  end
end


def new_storage (opts)

  Ruote::Sequel::Storage.new($sequel, opts)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-sequel-2.2.0 test/functional_connection.rb