Class: GitTree::ReplicateCommand
- Inherits:
-
AbstractCommand
- Object
- AbstractCommand
- GitTree::ReplicateCommand
- Defined in:
- lib/commands/git_replicate.rb
Constant Summary
Constants included from Logging
Logging::DEBUG, Logging::NORMAL, Logging::QUIET, Logging::VERBOSE
Instance Method Summary collapse
-
#initialize(args = ARGV, options: {}) ⇒ ReplicateCommand
constructor
A new instance of ReplicateCommand.
- #run ⇒ nil
Methods inherited from AbstractCommand
Methods included from Logging
#log, #log_stdout, verbosity, verbosity=
Constructor Details
#initialize(args = ARGV, options: {}) ⇒ ReplicateCommand
Returns a new instance of ReplicateCommand.
9 10 11 12 |
# File 'lib/commands/git_replicate.rb', line 9 def initialize(args = ARGV, options: {}) $PROGRAM_NAME = 'git-replicate' super end |
Instance Method Details
#run ⇒ nil
15 16 17 18 19 20 21 |
# File 'lib/commands/git_replicate.rb', line 15 def run setup result = [] walker = GitTreeWalker.new(@args, options: @options) walker.find_and_process_repos { |dir, root_arg| result << replicate_one(dir, root_arg) } log_stdout result.join("\n") unless result.empty? end |