Class: RakeDocker::Authentication::ECR
- Inherits:
-
Object
- Object
- RakeDocker::Authentication::ECR
- Defined in:
- lib/rake_docker/authentication/ecr.rb
Instance Method Summary collapse
- #arity ⇒ Object
- #call ⇒ Object
-
#initialize(&block) ⇒ ECR
constructor
A new instance of ECR.
Constructor Details
#initialize(&block) ⇒ ECR
Returns a new instance of ECR.
8 9 10 11 12 13 14 15 |
# File 'lib/rake_docker/authentication/ecr.rb', line 8 def initialize(&block) @config = Struct.new(:region, :registry_id) .new(nil, nil) block.call(@config) @ecr_client = Aws::ECR::Client.new(region: @config.region) end |
Instance Method Details
#arity ⇒ Object
17 18 19 |
# File 'lib/rake_docker/authentication/ecr.rb', line 17 def arity 0 end |
#call ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/rake_docker/authentication/ecr.rb', line 21 def call email = 'none' registry_id = resolve_registry_id token = (registry_id) proxy_endpoint = extract_proxy_endpoint(token) username, password = extract_credentials(token) make_credentials_hash(email, password, username, proxy_endpoint) end |