Sha256: 7a74c2897bdf27dcf04b7cd5e9dc4f39f4c55898d490760c391dd9cfba2ab0b4

Contents?: true

Size: 1.14 KB

Versions: 26

Compression:

Stored size: 1.14 KB

Contents

require 'rubygems'

begin
  gem 'sequel', '=3.5.0'
  require('sequel')
rescue LoadError => e
  warn 'To use Fossil you need the sequel gem:'
  warn '$ sudo gem install sequel -v=3.5.0'
  exit(1)
end

begin
  gem 'activesupport', '=2.3.5'
  require('active_support')
rescue LoadError => e
  p e
  warn 'To use Fossil you need the active_support gem:'
  warn '$ sudo gem install active_support -v=2.3.5'
  exit(1)
end

dir = File.dirname(__FILE__)
files = [File.join(dir,'number_helper.rb')] +
        [File.join(dir,'hash_extentions.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.3.17 lib/fossil.rb
fossil-0.3.16 lib/fossil.rb
fossil-0.3.15 lib/fossil.rb
fossil-0.3.14 lib/fossil.rb
fossil-0.3.13 lib/fossil.rb
fossil-0.3.12 lib/fossil.rb
fossil-0.3.11 lib/fossil.rb
fossil-0.3.10 lib/fossil.rb
fossil-0.3.9 lib/fossil.rb
fossil-0.3.8 lib/fossil.rb
fossil-0.3.7 lib/fossil.rb
fossil-0.3.6 lib/fossil.rb
fossil-0.3.5 lib/fossil.rb
fossil-0.3.4 lib/fossil.rb
fossil-0.3.3 lib/fossil.rb
fossil-0.3.2 lib/fossil.rb
fossil-0.3.1 lib/fossil.rb
fossil-0.3.0 lib/fossil.rb
fossil-0.2.9 lib/fossil.rb
fossil-0.2.8 lib/fossil.rb