Class: TowncrierGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- TowncrierGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/towncrier_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
4 5 6 7 |
# File 'lib/generators/towncrier_generator.rb', line 4 def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#copy_files ⇒ Object
12 13 14 15 16 17 |
# File 'lib/generators/towncrier_generator.rb', line 12 def copy_files copy_file "towncrier.yml", "config/towncrier.yml" copy_file "towncry.rb", "app/models/towncry.rb" empty_directory "app/criers" migration_template "create_towncries_table.rb", "db/migrate/create_towncries_table.rb" end |