Module: Dapp::Dapp::Command::Common

Included in:
Dapp::Dapp
Defined in:
lib/dapp/dapp/command/common.rb

Instance Method Summary collapse

Instance Method Details

#dimg_registry(repo = option_repo) ⇒ Object



17
18
19
20
# File 'lib/dapp/dapp/command/common.rb', line 17

def dimg_registry(repo = option_repo)
  validate_repo_name!(repo)
  ::Dapp::Dimg::DockerRegistry.new(repo)
end

#option_repoObject



5
6
7
# File 'lib/dapp/dapp/command/common.rb', line 5

def option_repo
  shortcut_or_key(options[:repo])
end

#shortcut_or_key(key) ⇒ Object



9
10
11
# File 'lib/dapp/dapp/command/common.rb', line 9

def shortcut_or_key(key)
  shortcuts[key] || key
end

#shortcutsObject



13
14
15
# File 'lib/dapp/dapp/command/common.rb', line 13

def shortcuts
  { ':minikube' => "localhost:5000/#{name}" }
end