Sha256: 9b9e728b427e50f8b0cf6aed683e99d6637d0ec5c8284863af4befd5e92ade16

Contents?: true

Size: 898 Bytes

Versions: 26

Compression:

Stored size: 898 Bytes

Contents

require 'rubygems'

begin
  gem 'sequel', '=3.16.0'
  require('sequel')
rescue LoadError => e
  raise("To use Fossil you need the sequel gem:\n '$ sudo gem install sequel -v=3.16.0'")
end

dir = File.dirname(__FILE__)
files = Dir.glob(File.join(dir,'support','*.rb')) +
        [File.join(dir,'sequel','serializer','serializer.rb')] +
        Dir.glob(File.join(dir,'sequel','*.rb')) +
        Dir.glob(File.join(dir,'models','*.rb'))

class MockDataset < Sequel::Dataset
  def insert(*args); end
  def insert_select(*args); end
  def update(*args); end
  def fetch_rows(sql); end
  def quoted_identifier(c); end
end

class MockDatabase < Sequel::Database
  def execute(sql, opts={}); end
  def reset; end
  def transaction(opts={}); end
  def dataset; MockDataset.new(self); end
end

MOCK_DB = MockDatabase.new unless defined?(MOCK_DB)

Sequel::Model.db = MOCK_DB

files.each{|file| require file}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
fossil-0.5.13 lib/fossil.rb
fossil-0.5.12 lib/fossil.rb
fossil-0.5.11 lib/fossil.rb
fossil-0.5.10 lib/fossil.rb
fossil-0.5.9 lib/fossil.rb
fossil-0.5.8 lib/fossil.rb