Sha256: 5109e459e4c6a4b18803ca2d5eb3c9729d9e79f0fa12bec1acd026e5d32e03f2
Contents?: true
Size: 864 Bytes
Versions: 2
Compression:
Stored size: 864 Bytes
Contents
module YkCommand class YkConfig < Thor include Thor::Actions no_commands do def initialize(config_path) @at_path = config_path FileUtils.remove_dir("#{@at_path + '/configruation-files'}", true) hostA = 'yeah' hostB = 'ka' config_repo_url = "http://gitlab.#{hostA}#{hostB}.com/App/iOS/YKComponents/com-manage-platform-resources/configruation-files.git" cmd = "git clone #{config_repo_url} #{@at_path + '/configruation-files'}" puts("execute command: #{cmd}") system(cmd) FileUtils.remove_dir("#{@at_path + '/configruation-files/.git'}", true) end def read_config(file_name) config_file_path = "#{@at_path + '/configruation-files/' + file_name}" File.exist?(config_file_path) ? YAML.load_file(config_file_path) : {} end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yk_command-0.6.5 | lib/yk_command/config/yk_config.rb |
yk_command-0.6.4 | lib/yk_command/config/yk_config.rb |