Class: Kubes::Auth::Base
- Inherits:
-
Object
- Object
- Kubes::Auth::Base
- Includes:
- Logging
- Defined in:
- lib/kubes/auth/base.rb
Instance Method Summary collapse
- #docker_config ⇒ Object
- #ensure_dotdocker_exists ⇒ Object
-
#initialize(image) ⇒ Base
constructor
A new instance of Base.
Methods included from Logging
Constructor Details
#initialize(image) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/kubes/auth/base.rb', line 7 def initialize(image) @image = image @repo_domain = "#{image.split('/').first}" end |
Instance Method Details
#docker_config ⇒ Object
17 18 19 |
# File 'lib/kubes/auth/base.rb', line 17 def docker_config "#{ENV['HOME']}/.docker/config.json" end |
#ensure_dotdocker_exists ⇒ Object
12 13 14 15 |
# File 'lib/kubes/auth/base.rb', line 12 def ensure_dotdocker_exists dirname = File.dirname(docker_config) FileUtils.mkdir_p(dirname) unless File.exist?(dirname) end |