Sha256: f802695992321f5b3e92d618b1356a7dd0a57055d2cbe720092c747f2f5c486a

Contents?: true

Size: 519 Bytes

Versions: 14

Compression:

Stored size: 519 Bytes

Contents

class TogMigrationGenerator < Rails::Generator::NamedBase  
  def manifest
    record do |m|
      m.migration_template 'migration.rb', 'db/migrate', :assigns => get_local_assigns
    end
  end

  
  private  
    def get_local_assigns
      returning(assigns = {}) do
        if class_name.underscore =~ /^integrate_(.*)_(?:version)(.*)_(?:from)(.*)/
          assigns[:plugins] = [{:name => $1, :to_version => $2, :from_version => $3 }]
        else
          assigns[:plugins] = []
        end
      end
    end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
IamPersistent-tog-0.4.4 generators/tog_migration/tog_migration_generator.rb
cauta-tog-0.5.3 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.2.1 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.3.0 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.4.0 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.4.1 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.4.2 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.4.4 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.5.0 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.5.1 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.5.2 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.5.3 generators/tog_migration/tog_migration_generator.rb
tog-tog-0.5.4 generators/tog_migration/tog_migration_generator.rb
tog-0.5.4 generators/tog_migration/tog_migration_generator.rb