Sha256: 8442c7a15358fdad4177a5fcf035862ec123787c892d0d992784c7648caf5e98

Contents?: true

Size: 1.03 KB

Versions: 24

Compression:

Stored size: 1.03 KB

Contents

$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/../../rspec/lib')

require 'rubygems'
require 'active_record'
gem 'sqlite3-ruby'

require File.dirname(__FILE__) + '/../init'
require 'spec'
  
ActiveRecord::Base.logger = Logger.new('/tmp/dj.log')
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => '/tmp/jobs.sqlite')
ActiveRecord::Migration.verbose = false

ActiveRecord::Schema.define do

  create_table :delayed_jobs, :force => true do |table|
    table.integer  :priority, :default => 0
    table.integer  :attempts, :default => 0
    table.text     :handler
    table.string   :last_error
    table.datetime :run_at
    table.datetime :locked_at
    table.string   :locked_by
    table.datetime :failed_at
    table.timestamps
  end

  create_table :stories, :force => true do |table|
    table.string :text
  end

end


# Purely useful for test cases...
class Story < ActiveRecord::Base
  def tell; text; end       
  def whatever(n, _); tell*n; end
  
  handle_asynchronously :whatever
end

Version data entries

24 entries across 24 versions & 15 rubygems

Version Path
betelgeuse-delayed_job-1.8.0 spec/database.rb
blaxter-delayed_job-1.7.0 spec/database.rb
collectiveidea-delayed_job-1.8.0 spec/database.rb
collectiveidea-delayed_job-1.8.1 spec/database.rb
collectiveidea-delayed_job-1.8.2 spec/database.rb
dburkes-delayed_job-1.7.0 spec/database.rb
factorylabs-delayed_job-1.8.1 spec/database.rb
factorylabs-delayed_job-1.8.2 spec/database.rb
factorylabs-delayed_job-1.8.3 spec/database.rb
slaskis-delayed_job-1.7.0 spec/database.rb
ssoroka-delayed_job-1.7.1 spec/database.rb
texel-delayed_job-1.7.1 spec/database.rb
webmat-delayed_job-1.7.1 spec/database.rb
webmat-delayed_job-1.7.2 spec/database.rb
zilkey-delayed_job-1.7.1 spec/database.rb
blue_light_special-0.2.1 test/rails_root/vendor/gems/delayed_job-1.8.4/spec/database.rb
mathie-delayed_job-1.8.4 spec/database.rb
fdl_delayed_job-1.8.4 spec/database.rb
radar-delayed_job-1.7.1 spec/database.rb
radar-delayed_job-1.7.0 spec/database.rb