Sha256: 270b613d6c2dc2509a492d49745b7107ce8caabd6863e10ebd04cbca55a6aff8

Contents?: true

Size: 616 Bytes

Versions: 56

Compression:

Stored size: 616 Bytes

Contents

require 'rails/generators/named_base'

module Rails
  module Generators # :nodoc:
    class JobGenerator < Rails::Generators::NamedBase # :nodoc:
      desc 'This generator creates an active job file at app/jobs'

      class_option :queue, type: :string, default: 'default', desc: 'The queue name for the generated job'

      check_class_collision suffix: 'Job'

      hook_for :test_framework

      def self.default_generator_root
        File.dirname(__FILE__)
      end

      def create_job_file
        template 'job.rb', File.join('app/jobs', class_path, "#{file_name}_job.rb")
      end

    end
  end
end

Version data entries

56 entries across 55 versions & 10 rubygems

Version Path
activejob-4.2.5.1 lib/rails/generators/job/job_generator.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/activejob-4.2.4/lib/rails/generators/job/job_generator.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/activejob-4.2.4/lib/rails/generators/job/job_generator.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/activejob-4.2.4/lib/rails/generators/job/job_generator.rb
activejob-4.2.5 lib/rails/generators/job/job_generator.rb
activejob-4.2.5.rc2 lib/rails/generators/job/job_generator.rb
activejob-4.2.5.rc1 lib/rails/generators/job/job_generator.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.4/lib/rails/generators/job/job_generator.rb
activejob-4.2.4 lib/rails/generators/job/job_generator.rb
activejob-4.2.4.rc1 lib/rails/generators/job/job_generator.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/activejob-4.2.3/lib/rails/generators/job/job_generator.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/activejob-4.2.3/lib/rails/generators/job/job_generator.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activejob-4.2.1/lib/rails/generators/job/job_generator.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activejob-4.2.2/lib/rails/generators/job/job_generator.rb
activejob-4.2.3 lib/rails/generators/job/job_generator.rb
activejob-4.2.3.rc1 lib/rails/generators/job/job_generator.rb
activejob-4.2.2 lib/rails/generators/job/job_generator.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/activejob-4.2.1/lib/rails/generators/job/job_generator.rb
activejob-4.2.1 lib/rails/generators/job/job_generator.rb
activejob-4.2.1.rc4 lib/rails/generators/job/job_generator.rb