Sha256: 549b60db75a238deaa5c751d69a70534d0bf37be85fbde33bc5a405277dd7f69

Contents?: true

Size: 657 Bytes

Versions: 54

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

54 entries across 54 versions & 1 rubygems

Version Path
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
trusty-cms-6.0.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.0.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.0.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.6.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-6.0.0 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.6.0 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5.9 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5.8 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5.7 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5.6 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5.5.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.5 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.4.4 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.4.3 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.4.2 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.4.1 lib/generators/extension_migration/extension_migration_generator.rb
trusty-cms-5.4.0 lib/generators/extension_migration/extension_migration_generator.rb