Sha256: 7606ea0b1bc0708fe8e2c2c9b5da9e8d0c4f8bb6151bbf0a920e2b0ae41c4086

Contents?: true

Size: 573 Bytes

Versions: 4

Compression:

Stored size: 573 Bytes

Contents

require 'rails/generators'

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

      source_root File.expand_path('../templates', __FILE__)

      def create_initializer_file
        copy_file 'initializer.rb', 'config/initializers/sidejobs.rb'
      end

      def create_migration_file
        migration_template 'migration.rb', 'db/migrate/create_sidejobs.rb'
      end

      def self.next_migration_number(path)
        Time.now.utc.strftime '%Y%m%d%H%M%S'
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sidejobs-5.1.1 lib/generators/sidejobs/install/install_generator.rb
sidejobs-5.1.0 lib/generators/sidejobs/install/install_generator.rb
sidejobs-4.0.0.2 lib/generators/sidejobs/install/install_generator.rb
sidejobs-4.0.0.1 lib/generators/sidejobs/install/install_generator.rb