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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51b24fc23f60ff30f254c76f4a514c3a2ed3f0b638e3d0523d970a89b465c413
4
- data.tar.gz: cfe2eb2033e9697135bd613ad5964a6b2d64af02f8b76ee15831e04c59bcd4e8
3
+ metadata.gz: 86c279d8b2c6219f3c4958c56e7efce8ecaa5f59dfbca44bb11cc353395fb941
4
+ data.tar.gz: fa5dace806be56bab6f047708fdf5bb7b22d0d833a06ce8aab8471d87410910b
5
5
  SHA512:
6
- metadata.gz: c394e5d6e87076a95ca221ffbe11229ed370a9259c41e7bc20d40c25e92aea8871a804b9bffe03b0c99bff2a7f3bb30d7f1b52c218860ed527e00fd02b3c766f
7
- data.tar.gz: 036fdc1dd45fbd26fd40ad2900fc6620951881332d63fed82423c063df1aa04281348ca8d4f584dc9cac860960a76a0e5184673b4889fa54ec704aa18ec5025a
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
- result = []
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
- result = []
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
- result = []
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
- result = []
79
- response.each do |release|
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
- $stdout.print "Cloning #{repository_url} ..."
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
- puts 'done.'
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
@@ -3,7 +3,7 @@
3
3
  module Corgibytes
4
4
  module Freshli
5
5
  module Commons
6
- VERSION = '0.6.10'
6
+ VERSION = '0.6.12'
7
7
  end
8
8
  end
9
9
  end
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.10
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: 2023-09-07 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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.4.10
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