Sha256: 549b60db75a238deaa5c751d69a70534d0bf37be85fbde33bc5a405277dd7f69

Contents?: true

Size: 657 Bytes

Versions: 52

Compression:

Stored size: 657 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

52 entries across 52 versions & 1 rubygems

Version Path
trusty-cms-7.0.10 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.9 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.8 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.7 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.6 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.5 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.4 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.3.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-7.0.0 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.2.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.2.2.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.2.0 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.1.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.1.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.0.5 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.0.4 lib/generators/extension_migration/extension_migration_generator.rb