Class: Textus::CLI::Migrate
Instance Attribute Summary
Attributes inherited from Verb
Class Method Summary collapse
-
.needs_store? ⇒ Boolean
Does not need a store — the target manifest may still be textus/1.
Instance Method Summary collapse
Methods inherited from Verb
#emit, inherited, #initialize, option, options, #parse
Constructor Details
This class inherits a constructor from Textus::CLI::Verb
Class Method Details
.needs_store? ⇒ Boolean
Does not need a store — the target manifest may still be textus/1.
5 |
# File 'lib/textus/cli/migrate.rb', line 5 def self.needs_store? = false |
Instance Method Details
#call(_store) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/textus/cli/migrate.rb', line 7 def call(_store) target = positional.shift or raise UsageError.new("migrate requires a target (e.g. 'v2')") raise UsageError.new("unknown migration target: #{target.inspect}; supported: v2") unless target == "v2" # Locate the .textus directory the same way Store.discover does. root = find_textus_root emit(Textus::MigrateV2.run(root)) end |