freshli-commons 0.6.10 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/corgibytes/freshli/commons/grpc_client.rb +5 -19
- data/lib/corgibytes/freshli/commons/step_definitions/git.rb +2 -2
- data/lib/corgibytes/freshli/commons/step_definitions/grpc/freshli_agent_pb.rb +1 -23
- data/lib/corgibytes/freshli/commons/step_definitions/grpc/health_pb.rb +1 -22
- data/lib/corgibytes/freshli/commons/version.rb +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c279d8b2c6219f3c4958c56e7efce8ecaa5f59dfbca44bb11cc353395fb941
|
4
|
+
data.tar.gz: fa5dace806be56bab6f047708fdf5bb7b22d0d833a06ce8aab8471d87410910b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19809a55b28360ba1a8fc2e3e6e56d8e8f7f14d1501ac4d684ad682a7d78813a5e630d89cc907795ae294f2cb4a2304b5ead15f3efd28c1233b9e67ecd1da385
|
7
|
+
data.tar.gz: ded055eda380f321fa076ba49cfc9eb26442d3b6997d07d82ed0d19c3d0ea1fbbc5256730f86c9c77a122498e7625a9a7bd89a9bcab119f70cc137d32a833969
|
@@ -30,11 +30,7 @@ module Corgibytes
|
|
30
30
|
client = grpc_agent_client_on(@captured_port)
|
31
31
|
response = client.detect_manifests(::Com::Corgibytes::Freshli::Agent::ProjectLocation.new(path: project_path))
|
32
32
|
|
33
|
-
|
34
|
-
response.each do |location|
|
35
|
-
result << location.path
|
36
|
-
end
|
37
|
-
result
|
33
|
+
response.map(&:path)
|
38
34
|
end
|
39
35
|
|
40
36
|
# rubocop:disable Naming/AccessorMethodName
|
@@ -42,22 +38,14 @@ module Corgibytes
|
|
42
38
|
client = grpc_agent_client_on(@port)
|
43
39
|
response = client.get_validating_packages(::Google::Protobuf::Empty.new)
|
44
40
|
|
45
|
-
|
46
|
-
response.each do |package|
|
47
|
-
result << package.purl
|
48
|
-
end
|
49
|
-
result
|
41
|
+
response.map(&:purl)
|
50
42
|
end
|
51
43
|
|
52
44
|
def get_validating_repositories
|
53
45
|
client = grpc_agent_client_on(@port)
|
54
46
|
response = client.get_validating_repositories(::Google::Protobuf::Empty.new)
|
55
47
|
|
56
|
-
|
57
|
-
response.each do |repository|
|
58
|
-
result << repository.url
|
59
|
-
end
|
60
|
-
result
|
48
|
+
response.map(&:url)
|
61
49
|
end
|
62
50
|
# rubocop:enable Naming/AccessorMethodName
|
63
51
|
|
@@ -75,14 +63,12 @@ module Corgibytes
|
|
75
63
|
def retrieve_release_history(package_url)
|
76
64
|
client = grpc_agent_client_on(@port)
|
77
65
|
response = client.retrieve_release_history(::Com::Corgibytes::Freshli::Agent::Package.new(purl: package_url))
|
78
|
-
|
79
|
-
|
80
|
-
result << {
|
66
|
+
response.map do |release|
|
67
|
+
{
|
81
68
|
version: release.version,
|
82
69
|
released_at: release.released_at.to_time.to_datetime.new_offset('0:00')
|
83
70
|
}
|
84
71
|
end
|
85
|
-
result
|
86
72
|
end
|
87
73
|
|
88
74
|
def health_check
|
@@ -12,7 +12,7 @@ Given('I clone the git repository {string} with the sha {string}') do |repositor
|
|
12
12
|
FileUtils.mkdir_p(repositories_dir)
|
13
13
|
|
14
14
|
unless Dir.exist?(cloned_dir)
|
15
|
-
|
15
|
+
log "Cloning `#{repository_url}`..."
|
16
16
|
unless system(
|
17
17
|
"git clone #{repository_url}",
|
18
18
|
chdir: repositories_dir,
|
@@ -22,7 +22,7 @@ Given('I clone the git repository {string} with the sha {string}') do |repositor
|
|
22
22
|
raise "Failed to clone #{repository_url}"
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
log 'done.'
|
26
26
|
end
|
27
27
|
unless system(
|
28
28
|
"git checkout #{sha}",
|
@@ -11,29 +11,7 @@ require 'google/protobuf/timestamp_pb'
|
|
11
11
|
descriptor_data = "\n\x13\x66reshli_agent.proto\x12\x1c\x63om.corgibytes.freshli.agent\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x1f\n\x0fProjectLocation\x12\x0c\n\x04path\x18\x01 \x01(\t\" \n\x10ManifestLocation\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x81\x01\n\x11ProcessingRequest\x12@\n\x08manifest\x18\x01 \x01(\x0b\x32..com.corgibytes.freshli.agent.ManifestLocation\x12*\n\x06moment\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x1b\n\x0b\x42omLocation\x12\x0c\n\x04path\x18\x01 \x01(\t\"\x17\n\x07Package\x12\x0c\n\x04purl\x18\x01 \x01(\t\"R\n\x0ePackageRelease\x12\x0f\n\x07version\x18\x01 \x01(\t\x12/\n\x0breleased_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"!\n\x12RepositoryLocation\x12\x0b\n\x03url\x18\x01 \x01(\t2\xda\x04\n\x05\x41gent\x12r\n\x0f\x44\x65tectManifests\x12-.com.corgibytes.freshli.agent.ProjectLocation\x1a..com.corgibytes.freshli.agent.ManifestLocation0\x01\x12m\n\x0fProcessManifest\x12/.com.corgibytes.freshli.agent.ProcessingRequest\x1a).com.corgibytes.freshli.agent.BomLocation\x12o\n\x16RetrieveReleaseHistory\x12%.com.corgibytes.freshli.agent.Package\x1a,.com.corgibytes.freshli.agent.PackageRelease0\x01\x12X\n\x15GetValidatingPackages\x12\x16.google.protobuf.Empty\x1a%.com.corgibytes.freshli.agent.Package0\x01\x12g\n\x19GetValidatingRepositories\x12\x16.google.protobuf.Empty\x1a\x30.com.corgibytes.freshli.agent.RepositoryLocation0\x01\x12:\n\x08Shutdown\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Emptyb\x06proto3"
|
12
12
|
|
13
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
-
|
15
|
-
begin
|
16
|
-
pool.add_serialized_file(descriptor_data)
|
17
|
-
rescue TypeError => e
|
18
|
-
# Compatibility code: will be removed in the next major version.
|
19
|
-
require 'google/protobuf/descriptor_pb'
|
20
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
-
parsed.clear_dependency
|
22
|
-
serialized = parsed.class.encode(parsed)
|
23
|
-
file = pool.add_serialized_file(serialized)
|
24
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
-
imports = [
|
26
|
-
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
27
|
-
]
|
28
|
-
imports.each do |type_name, expected_filename|
|
29
|
-
import_file = pool.lookup(type_name).file_descriptor
|
30
|
-
if import_file.name != expected_filename
|
31
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
32
|
-
end
|
33
|
-
end
|
34
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
35
|
-
warn "This will become an error in the next major version."
|
36
|
-
end
|
14
|
+
pool.add_serialized_file(descriptor_data)
|
37
15
|
|
38
16
|
module Com
|
39
17
|
module Corgibytes
|
@@ -8,28 +8,7 @@ require 'google/protobuf'
|
|
8
8
|
descriptor_data = "\n\x0chealth.proto\x12\x0egrpc.health.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\xa9\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus\"O\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x12\x13\n\x0fSERVICE_UNKNOWN\x10\x03\x32\xae\x01\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse\x12R\n\x05Watch\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse0\x01\x42\x61\n\x11io.grpc.health.v1B\x0bHealthProtoP\x01Z,google.golang.org/grpc/health/grpc_health_v1\xaa\x02\x0eGrpc.Health.V1b\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
-
|
12
|
-
begin
|
13
|
-
pool.add_serialized_file(descriptor_data)
|
14
|
-
rescue TypeError => e
|
15
|
-
# Compatibility code: will be removed in the next major version.
|
16
|
-
require 'google/protobuf/descriptor_pb'
|
17
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
-
parsed.clear_dependency
|
19
|
-
serialized = parsed.class.encode(parsed)
|
20
|
-
file = pool.add_serialized_file(serialized)
|
21
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
-
imports = [
|
23
|
-
]
|
24
|
-
imports.each do |type_name, expected_filename|
|
25
|
-
import_file = pool.lookup(type_name).file_descriptor
|
26
|
-
if import_file.name != expected_filename
|
27
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
-
warn "This will become an error in the next major version."
|
32
|
-
end
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
33
12
|
|
34
13
|
module Grpc
|
35
14
|
module Health
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freshli-commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Scott Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|
@@ -28,58 +28,58 @@ dependencies:
|
|
28
28
|
name: grpc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.64.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.64.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: grpc-tools
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.64.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.64.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-expectations
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.12.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 3.12.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.6.6
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.6.6
|
83
83
|
description:
|
84
84
|
email:
|
85
85
|
- scott@corgibytes.com
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
139
|
+
rubygems_version: 3.5.9
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Common build and testing code that is shared amongst the Freshli repositories
|