Sha256: 976571e92d267d831640b3cf43191047b1b552b04f6665dd499afa659d95e559

Contents?: true

Size: 799 Bytes

Versions: 8

Compression:

Stored size: 799 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"
        system("git clone #{config_repo_url} #{@at_path+'/configruation-files'}")
        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

8 entries across 8 versions & 1 rubygems

Version Path
yk_command-0.6.2 lib/yk_command/config/yk_config.rb
yk_command-0.6.1 lib/yk_command/config/yk_config.rb
yk_command-0.6.0 lib/yk_command/config/yk_config.rb
yk_command-0.5.91 lib/yk_command/config/yk_config.rb
yk_command-0.5.9 lib/yk_command/config/yk_config.rb
yk_command-0.5.8 lib/yk_command/config/yk_config.rb
yk_command-0.5.7 lib/yk_command/config/yk_config.rb
yk_command-0.5.6 lib/yk_command/config/yk_config.rb