Sha256: 24ef54fdcaef95f9b77308a73dd98eaa4ebfc6306a0702f412ad4d2458902ce1

Contents?: true

Size: 1.3 KB

Versions: 17

Compression:

Stored size: 1.3 KB

Contents

class BackupUpdateGenerator < Rails::Generator::Base

  # This method gets initialized when the generator gets run.
  # It will receive an array of arguments inside @args
  def initialize(runtime_args, runtime_options = {})
    super
  end
  
  # Processes the file generation/templating
  # This will automatically be run after the initialize method
  def manifest
    record do |m|
      
      # Generates the database update migration file
      m.migration_template                    "migrations/update_backup_tables.rb",
                                              "db/migrate",
                                              :migration_file_name => "update_backup_tables"
      
      # Outputs the generators message to the terminal
      puts message
    end
  end
  
  def message
    <<-MESSAGE
    
    
    
    ==============================================================
    Backup's update files have been generated!
    ==============================================================
    
    Please follow these instructions Backup:
    
    1: Please migrate the database to finish the update!

      rake db:migrate
    
    
    For More Information:
    http://github.com/meskyanichi/backup
    
    ==============================================================
    
    
    
    MESSAGE
  end
  
end

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
backup-2.4.5.1 generators/backup_update/backup_update_generator.rb
backup-2.4.5 generators/backup_update/backup_update_generator.rb
namxam-backup-2.4.5 generators/backup_update/backup_update_generator.rb
backup-2.4.4 generators/backup_update/backup_update_generator.rb
backup-2.4.3 generators/backup_update/backup_update_generator.rb
backup-2.4.1 generators/backup_update/backup_update_generator.rb
dmitryv-backup-2.4.0 generators/backup_update/backup_update_generator.rb
backup-2.4.0 generators/backup_update/backup_update_generator.rb
backup-2.3.3.1 generators/backup_update/backup_update_generator.rb
backup-2.3.3 generators/backup_update/backup_update_generator.rb
backup-2.3.2 generators/backup_update/backup_update_generator.rb
backup-2.3.2.pre3 generators/backup_update/backup_update_generator.rb
backup-2.3.2.pre2 generators/backup_update/backup_update_generator.rb
backup-2.3.2.pre generators/backup_update/backup_update_generator.rb
backup-wakiki-2.4.1 generators/backup_update/backup_update_generator.rb
backup-gundua-2.3.1.2 generators/backup_update/backup_update_generator.rb
backup-gundua-2.3.1.1 generators/backup_update/backup_update_generator.rb