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

Version Path
cloudstrap-0.51.1.pre bin/cloudstrap-config
cloudstrap-0.50.1.pre bin/cloudstrap-config
cloudstrap-0.49.12.pre bin/cloudstrap-config
cloudstrap-0.49.11.pre bin/cloudstrap-config
cloudstrap-0.49.10.pre bin/cloudstrap-config
cloudstrap-0.49.8.pre bin/cloudstrap-config
cloudstrap-0.49.4.pre bin/cloudstrap-config
cloudstrap-0.49.2.pre bin/cloudstrap-config
cloudstrap-0.49.1.pre bin/cloudstrap-config
cloudstrap-0.49.0.pre bin/cloudstrap-config
cloudstrap-0.48.15.pre bin/cloudstrap-config
cloudstrap-0.48.2.pre bin/cloudstrap-config
cloudstrap-0.48.0.pre bin/cloudstrap-config
cloudstrap-0.47.8.pre bin/cloudstrap-config
cloudstrap-0.47.7.pre bin/cloudstrap-config
cloudstrap-0.47.2.pre bin/cloudstrap-config
cloudstrap-0.47.0.pre bin/cloudstrap-config
cloudstrap-0.46.7.pre bin/cloudstrap-config
cloudstrap-0.46.4.pre bin/cloudstrap-config
cloudstrap-0.46.3.pre bin/cloudstrap-config