Sha256: da9978085e7dc06f1d091d3fc7059695f4451f1b4078e285aadac7615bbd58b9

Contents?: true

Size: 898 Bytes

Versions: 12

Compression:

Stored size: 898 Bytes

Contents

require 'rubygems'

begin
  gem 'sequel', '=3.21.0'
  require('sequel')
rescue LoadError => e
  raise("To use Fossil you need the sequel gem:\n '$ sudo gem install sequel -v=3.21.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

12 entries across 12 versions & 1 rubygems

Version Path
fossil-0.5.50 lib/fossil.rb
fossil-0.5.49 lib/fossil.rb
fossil-0.5.48 lib/fossil.rb
fossil-0.5.47 lib/fossil.rb
fossil-0.5.46 lib/fossil.rb
fossil-0.5.45 lib/fossil.rb
fossil-0.5.44 lib/fossil.rb
fossil-0.5.43 lib/fossil.rb
fossil-0.5.42 lib/fossil.rb
fossil-0.5.41 lib/fossil.rb
fossil-0.5.40 lib/fossil.rb
fossil-0.5.39 lib/fossil.rb