Sha256: 9651251d3f0f923ec7feda750d2c542cc78a8c1840a0b77eaa07d970de32795b

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators'
require 'rails/generators/migration'
require 'rails/generators/active_record'

module DelayedJobHeartbeatPlugin
  class InstallGenerator < Rails::Generators::Base
    include Rails::Generators::Migration

    source_paths << File.join(File.dirname(__FILE__), 'templates')

    def create_migration_file
      migration_template('migration.erb', 'db/migrate/create_delayed_workers.rb')
    end

    def self.next_migration_number(dirname)
      ActiveRecord::Generators::Base.next_migration_number(dirname)
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
delayed_job_heartbeat_plugin-0.6.0 lib/generators/delayed_job_heartbeat_plugin/install_generator.rb
delayed_job_heartbeat_plugin-0.5.0 lib/generators/delayed_job_heartbeat_plugin/install_generator.rb
delayed_job_heartbeat_plugin-0.4.0 lib/generators/delayed_job_heartbeat_plugin/install_generator.rb