Developer-Dashboard
view release on metacpan or search on metacpan
lib/Developer/Dashboard/CLI/Progress.pm view on Meta::CPAN
return sub {
my ($event) = @_;
$self->update($event);
};
}
# update($event)
# Applies one lifecycle progress event to the tracked task board.
# Input: hash reference with task_id, status, and optional label.
# Output: true value.
sub update {
my ( $self, $event ) = @_;
return 1 if !$event || ref($event) ne 'HASH';
my $id = $event->{task_id} || return 1;
my $task = $self->{tasks}{$id} || return 1;
$task->{status} = $event->{status} if defined $event->{status} && $event->{status} ne '';
$task->{label} = $event->{label} if defined $event->{label} && $event->{label} ne '';
$self->render;
return 1;
}
lib/Developer/Dashboard/SkillManager.pm view on Meta::CPAN
success => 1,
repo_name => $repo_name,
message => "Skill '$repo_name' uninstalled successfully",
};
}
# update($repo_name)
# Pulls latest changes from the skill's Git repository.
# Input: skill repo name.
# Output: hash ref with success status.
sub update {
my ( $self, $repo_name ) = @_;
return { error => 'Missing repo name' } if !$repo_name;
my $skill_path = $self->get_skill_path( $repo_name, include_disabled => 1 );
return { error => "Skill '$repo_name' not found" } if !defined $skill_path || !-d $skill_path;
my ( $stdout, $stderr, $exit ) = capture {
system( 'git', '-C', $skill_path, 'pull', '--ff-only' );
};
lib/Developer/Dashboard/UpdateManager.pm view on Meta::CPAN
files => $files,
paths => $paths,
runner => $runner,
}, $class;
}
# updates_dir()
# Returns the directory containing updater scripts.
# Input: none.
# Output: directory path string.
sub updates_dir {
my ($self) = @_;
return File::Spec->catdir( cwd(), 'updates' );
}
# run()
# Executes update scripts in order while stopping and restarting managed collectors.
# Input: none.
# Output: array reference of update step result hashes.
sub run {
my ($self) = @_;
( run in 0.434 second using v1.01-cache-2.11-cpan-39bf76dae61 )