Sha256: eb44c156e92b4aacee6a7e64bdd1ffec9827cd99a2aa7713d42df4adcf227270

Contents?: true

Size: 655 Bytes

Versions: 19

Compression:

Stored size: 655 Bytes

Contents

require 'rails/generators/named_base'

module DataMigrate
  module Generators
    class DataMigrationGenerator < Rails::Generators::NamedBase #:nodoc:
      class << self
        def source_root
          build_data_migrate_source_root
        end

        private

        def build_data_migrate_source_root
          if DataMigrate.config.data_template_path == DataMigrate::Config::DEFAULT_DATA_TEMPLATE_PATH
            File.expand_path(File.join(File.dirname(__FILE__), generator_name, 'templates'))
          else
            File.expand_path(File.dirname(DataMigrate.config.data_template_path))
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
data_migrate-11.2.0 lib/generators/data_migrate.rb
data_migrate-11.1.0 lib/generators/data_migrate.rb
data_migrate-9.1.3 lib/generators/data_migrate.rb
data_migrate-9.1.2 lib/generators/data_migrate.rb
data_migrate-11.0.0 lib/generators/data_migrate.rb
data_migrate-11.0.0.rc3 lib/generators/data_migrate.rb
data_migrate-11.0.0.rc lib/generators/data_migrate.rb
data_migrate-9.4.4 lib/generators/data_migrate.rb
data_migrate-9.4.2 lib/generators/data_migrate.rb
data_migrate-9.4.1 lib/generators/data_migrate.rb
data_migrate-9.4.0 lib/generators/data_migrate.rb
data_migrate-9.3.0 lib/generators/data_migrate.rb
data_migrate-9.2.0 lib/generators/data_migrate.rb
data_migrate-9.1.1 lib/generators/data_migrate.rb
data_migrate-9.1.0 lib/generators/data_migrate.rb
data_migrate-10.0.3.rc lib/generators/data_migrate.rb
data_migrate-10.0.0.rc1 lib/generators/data_migrate.rb
data_migrate-9.0.0 lib/generators/data_migrate.rb
data_migrate-8.5.0 lib/generators/data_migrate.rb