Sha256: fa91f8f5f306b392c20d07e4bf1c999382904a28dd118d22355f8a9b1d4c87ed

Contents?: true

Size: 612 Bytes

Versions: 29

Compression:

Stored size: 612 Bytes

Contents

class DelayedJobGenerator < Rails::Generator::Base
  default_options :skip_migration => false
  
  def manifest
    record do |m|
      m.template 'script', 'script/delayed_job', :chmod => 0755
      if !options[:skip_migration] && defined?(ActiveRecord)
        m.migration_template "migration.rb", 'db/migrate',
                             :migration_file_name => "create_delayed_jobs"
      end
    end
  end
  
protected

  def add_options!(opt)
    opt.separator ''
    opt.separator 'Options:'
    opt.on("--skip-migration", "Don't generate a migration") { |v| options[:skip_migration] = v }
  end
  
end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
delayed_job-2.0.8 generators/delayed_job/delayed_job_generator.rb
delayed_job_csi-2.0.7 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.14 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.13 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.12 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.11 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.10 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.9 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.8 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.7 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.6 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.5 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.4 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.3 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.2 generators/delayed_job/delayed_job_generator.rb
delayed_job_with_named_queues-2.0.7.1 generators/delayed_job/delayed_job_generator.rb
yetanothernguyen-delayed_job-0.0.1 generators/delayed_job/delayed_job_generator.rb
delayed_job-2.0.7 generators/delayed_job/delayed_job_generator.rb
emipair-delayed_job-2.0.3.1 generators/delayed_job/delayed_job_generator.rb
delayed_job-2.0.5 generators/delayed_job/delayed_job_generator.rb