Sha256: 414fc14c2df4be8a387a652c893f63406ec0b22e1e8f45e8548d60ec5f333bfe

Contents?: true

Size: 654 Bytes

Versions: 6

Compression:

Stored size: 654 Bytes

Contents

# see http://api.rubyonrails.org/classes/Rails/Railtie.html

require 'simple_worker'
require 'rails'

module SimpleWorker
  class Railtie < Rails::Railtie
#    railtie_name :simple_worker deprecated

    initializer "simple_worker.configure_rails_initialization" do |app|
      puts "Initializing SimpleWorker for Rails 3..."
      SimpleWorker.configure do |c2|
        path = File.join(Rails.root, 'app/models/*.rb')
#        puts 'path=' + path
        c2.models = Dir.glob(path)
        c2.extra_requires += ['active_support/core_ext', 'active_record', 'action_mailer']
#        puts 'config.models=' + c2.models.inspect
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
simple_worker-0.5.8 lib/railtie.rb
simple_worker-0.5.6 lib/railtie.rb
simple_worker-0.5.5 lib/railtie.rb
simple_worker-0.5.4 lib/railtie.rb
simple_worker-0.5.2 lib/railtie.rb
simple_worker-0.5.1 lib/railtie.rb