Sha256: eb96611fc1b4eb58fd2231e14beb5b97a0fdc262c88701b657e2a7c678055c9e
Contents?: true
Size: 750 Bytes
Versions: 10
Compression:
Stored size: 750 Bytes
Contents
module Workhorse class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration class_option :skip_initializer, type: :boolean, default: false, desc: 'Skip generating the initializer file' source_root File.expand_path('templates', __dir__) def self.next_migration_number(_dir) Time.now.utc.strftime('%Y%m%d%H%M%S') end def install_migration migration_template 'create_table_jobs.rb', 'db/migrate/create_table_jobs.rb' end def install_daemon_script template 'bin/workhorse.rb' chmod 'bin/workhorse.rb', 0o755 end def install_initializer template 'config/initializers/workhorse.rb' unless options[:skip_initializer] end end end
Version data entries
10 entries across 10 versions & 1 rubygems