Class: Kuby::Docker::RemoteTags
- Inherits:
-
Object
- Object
- Kuby::Docker::RemoteTags
- Defined in:
- lib/kuby/docker/remote_tags.rb
Instance Attribute Summary collapse
-
#image_url ⇒ Object
readonly
T::Sig::WithoutRuntime.sig { returns(String) }.
-
#remote_client ⇒ Object
readonly
T::Sig::WithoutRuntime.sig { returns(::Docker::Remote::Client) }.
Instance Method Summary collapse
-
#initialize(remote_client, image_url) ⇒ RemoteTags
constructor
T::Sig::WithoutRuntime.sig { params( remote_client: ::Docker::Remote::Client, image_url: String ) .void }.
-
#latest_tags ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T::Array) }.
-
#tags ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T::Array) }.
-
#timestamp_tags ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T::Array) }.
Constructor Details
#initialize(remote_client, image_url) ⇒ RemoteTags
T::Sig::WithoutRuntime.sig
params(
remote_client: ::Docker::Remote::Client,
image_url: String
)
.void
23 24 25 26 |
# File 'lib/kuby/docker/remote_tags.rb', line 23 def initialize(remote_client, image_url) @remote_client = remote_client @image_url = image_url end |
Instance Attribute Details
#image_url ⇒ Object (readonly)
T::Sig::WithoutRuntime.sig { returns(String) }
14 15 16 |
# File 'lib/kuby/docker/remote_tags.rb', line 14 def image_url @image_url end |
#remote_client ⇒ Object (readonly)
T::Sig::WithoutRuntime.sig { returns(::Docker::Remote::Client) }
11 12 13 |
# File 'lib/kuby/docker/remote_tags.rb', line 11 def remote_client @remote_client end |
Instance Method Details
#latest_tags ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T::Array) }
37 38 39 40 |
# File 'lib/kuby/docker/remote_tags.rb', line 37 def # not available for remote repos [] end |
#tags ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T::Array) }
29 30 31 32 33 34 |
# File 'lib/kuby/docker/remote_tags.rb', line 29 def remote_client. || [] rescue ::Docker::Remote::UnknownRepoError, ::Docker::Remote::UnauthorizedError, ::Docker::Remote::TooManyRetriesError # these can happen if we've never pushed to the repo before [] end |
#timestamp_tags ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T::Array) }
43 44 45 |
# File 'lib/kuby/docker/remote_tags.rb', line 43 def .map { |t| TimestampTag.try_parse(t) }.compact end |