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

Version Path
cloudstrap-0.51.1.pre bin/cloudstrap-cache
cloudstrap-0.50.1.pre bin/cloudstrap-cache
cloudstrap-0.49.12.pre bin/cloudstrap-cache
cloudstrap-0.49.11.pre bin/cloudstrap-cache
cloudstrap-0.49.10.pre bin/cloudstrap-cache
cloudstrap-0.49.8.pre bin/cloudstrap-cache
cloudstrap-0.49.4.pre bin/cloudstrap-cache
cloudstrap-0.49.2.pre bin/cloudstrap-cache
cloudstrap-0.49.1.pre bin/cloudstrap-cache
cloudstrap-0.49.0.pre bin/cloudstrap-cache
cloudstrap-0.48.15.pre bin/cloudstrap-cache
cloudstrap-0.48.2.pre bin/cloudstrap-cache
cloudstrap-0.48.0.pre bin/cloudstrap-cache