Sha256: 95b0be36e28dfb0101d79fba4ba7daafb5d45f4e53872f57a282d5b71a6ddf85

Contents?: true

Size: 508 Bytes

Versions: 3

Compression:

Stored size: 508 Bytes

Contents

#!/usr/bin/ruby

class Hash
  alias hkeys keys

  def keys
    hkeys.sort {|a,b| a.to_s <=> b.to_s }
  end

  def each
    keys.each { |k| yield k, self[k] }
  end
end

require 'rubygems'
require 'bundler/setup'
require 'json'
require 'yaml'

node = JSON.load(File.read(ARGV[0]).gsub("json_class","json_klass")).to_hash

node.delete "all_resources"
node.delete "updated_resources"
node.delete "elapsed_time"
node.delete "start_time"
node.delete "end_time"
node["node"].delete "automatic"


puts node.to_yaml

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tvdinner-0.0.6 libexec/sanitize-node.rb
tvdinner-0.0.5 libexec/sanitize-node.rb
tvdinner-0.0.4 libexec/sanitize-node.rb