Class: Glossarist::CLI::UpgradeCommand
- Inherits:
-
Object
- Object
- Glossarist::CLI::UpgradeCommand
- Defined in:
- lib/glossarist/cli/upgrade_command.rb
Instance Method Summary collapse
-
#initialize(source_dir, options) ⇒ UpgradeCommand
constructor
A new instance of UpgradeCommand.
- #run ⇒ Object
Constructor Details
#initialize(source_dir, options) ⇒ UpgradeCommand
6 7 8 9 |
# File 'lib/glossarist/cli/upgrade_command.rb', line 6 def initialize(source_dir, ) @source_dir = source_dir = end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/glossarist/cli/upgrade_command.rb', line 11 def run result = SchemaMigration.upgrade_directory( @source_dir, output: [:output], target_version: [:target_version], cross_references: [:cross_references], dry_run: [:dry_run], ) report(result) rescue ArgumentError => e warn "Error: #{e.message}" exit 1 end |