Sha256: 0e9a74b9212845f9ccaa2ce59bfaeb28a9cd5ec3784c5dd2ec334ce1454ce955
Contents?: true
Size: 726 Bytes
Versions: 24
Compression:
Stored size: 726 Bytes
Contents
#!/usr/bin/env ruby require 'json' require 'yaml' if ENV['HACKING'] require_relative '../lib/cloudstrap' else require 'cloudstrap' end config = Cloudstrap::Config.new configurables = config .public_methods(false) .reject { |m| m.to_s.start_with? '__contracts_ruby_original' } .reject { |m| %i(Contract functype).include? m } settings = configurables .map { |key| [key.to_s, config.send(key)] } .sort_by(&:first) .to_h case ARGV.first when nil, /^--?y(a?ml)?$/i puts YAML.dump settings when /^--?j(son)?$/i puts JSON.pretty_generate settings else STDERR.puts "Usage: #{File.basename $PROGRAM_NAME} (--yaml|--json)" end
Version data entries
24 entries across 24 versions & 1 rubygems