Sha256: ef49c00111f8bd64b111d6bcb49eeec5701029dd98dd12659050bbb869c4558c

Contents?: true

Size: 658 Bytes

Versions: 130

Compression:

Stored size: 658 Bytes

Contents

require 'rails_generator/base'
require 'rails_generator/generators/components/migration/migration_generator'

class ExtensionMigrationGenerator < MigrationGenerator

  attr_accessor :extension_name

  def initialize(runtime_args, runtime_options = {})
    runtime_args = runtime_args.dup
    @extension_name = runtime_args.shift
    super(runtime_args, runtime_options)
  end

  def banner
    "Usage: #{$0} extension_migration ExtensionName MigrationName [field:type, field:type]"
  end

  def extension_path
    File.join('vendor', 'extensions', @extension_name.underscore)
  end

  def destination_root
    File.join(Rails.root, extension_path)
  end
end

Version data entries

130 entries across 130 versions & 1 rubygems

Version Path
trusty-cms-5.1.0 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.9 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.7 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.6 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.5 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.4 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.3.5 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.0.0 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.3.4 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.3.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.3.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.3.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.2.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.2.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.2.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-4.2 lib/generators/extension_migration/extension_migration_generator.rb