Sha256: f0d3860744eb6b0498e40bf1dbb30fe03ed6677bc7ac10137362f0f188cd738c
Contents?: true
Size: 717 Bytes
Versions: 13
Compression:
Stored size: 717 Bytes
Contents
#!/usr/bin/env ruby require 'tty-table' require 'pastel' if ENV['HACKING'] require_relative '../lib/cloudstrap/cache' require_relative '../lib/cloudstrap/config' else require 'cloudstrap/cache' require 'cloudstrap/config' end PROGRAM_NAME = File.basename $PROGRAM_NAME config = Cloudstrap::Config.new cache = Cloudstrap::Cache.new KEYS = Dir .entries(config.cache_path) .reject { |entry| %w(. .. .keys).include? entry } .map { |key| key.gsub(/^(%[0-9A-F]{2,2})+/, '') } .map(&:to_sym) .sort table = TTY::Table.new(headers: %w(key value)) do |table| KEYS.each { |key| table << [key, cache.get(key)] } end puts table.render(STDOUT.tty? ? :unicode : :basic)
Version data entries
13 entries across 13 versions & 1 rubygems