/usr/share/backgroundrb/generators/bdrb_migration/bdrb_migration_generator.rb is in libbackgroundrb-ruby1.8 1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | class BdrbMigrationGenerator < Rails::Generator::NamedBase
def initialize(runtime_args, runtime_options = {})
runtime_args << 'CreateBackgroundrbQueueTable' if runtime_args.empty?
super
end
def manifest
record do |m|
m.migration_template 'migration.rb', 'db/migrate',
:assigns => { :bdrb_table_name => default_bdrb_table_name }
end
end
protected
def default_bdrb_table_name
ActiveRecord::Base.pluralize_table_names ? 'bdrb_job_queue'.pluralize : 'bdrb_job_queue'
end
end
|