Sha256: db2aee5e269d871fba2150826bdf823604d8738ddfb1279cdd2095fdcc929088
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
class BackupGenerator < 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 Rake Tasks and Backup Database m.directory "lib/tasks" m.directory "lib/tasks/backup" m.file "tasks/backup.rake", "lib/tasks/backup/backup.rake" # Generates the configuration file m.directory "config" m.file "config/backup.rb", "config/backup.rb" # Generates the database migration file m.migration_template "migrations/create_backup_tables.rb", "db/migrate", :migration_file_name => "create_backup_tables" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
backup-2.1.1 | generators/backup/backup_generator.rb |
backup-2.1.0 | generators/backup/backup_generator.rb |
backup-2.0.0 | generators/backup/backup_generator.rb |