Skip to content

Commit

Permalink
Auto-corrects rubocop findings
Browse files Browse the repository at this point in the history
  • Loading branch information
mscottford committed Jun 5, 2024
1 parent bda093e commit 88d7138
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions lib/corgibytes/freshli/commons/grpc_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,22 @@ def detect_manifests(project_path)
client = grpc_agent_client_on(@captured_port)
response = client.detect_manifests(::Com::Corgibytes::Freshli::Agent::ProjectLocation.new(path: project_path))

result = []
response.each do |location|
result << location.path
end
result
response.map(&:path)
end

# rubocop:disable Naming/AccessorMethodName
def get_validating_packages
client = grpc_agent_client_on(@port)
response = client.get_validating_packages(::Google::Protobuf::Empty.new)

result = []
response.each do |package|
result << package.purl
end
result
response.map(&:purl)
end

def get_validating_repositories
client = grpc_agent_client_on(@port)
response = client.get_validating_repositories(::Google::Protobuf::Empty.new)

result = []
response.each do |repository|
result << repository.url
end
result
response.map(&:url)
end
# rubocop:enable Naming/AccessorMethodName

Expand All @@ -75,14 +63,12 @@ def process_manifest(manifest_path, moment_in_time)
def retrieve_release_history(package_url)
client = grpc_agent_client_on(@port)
response = client.retrieve_release_history(::Com::Corgibytes::Freshli::Agent::Package.new(purl: package_url))
result = []
response.each do |release|
result << {
response.map do |release|
{
version: release.version,
released_at: release.released_at.to_time.to_datetime.new_offset('0:00')
}
end
result
end

def health_check
Expand Down

0 comments on commit 88d7138

Please sign in to comment.