class Bundler::Plugin::Index

def save_index

to be only String key value pairs)
instance variables in YAML format. (The instance variables are supposed
Should be called when any of the instance variables change. Stores the
def save_index
  index = {
    "commands"     => @commands,
    "hooks"        => @hooks,
    "load_paths"   => @load_paths,
    "plugin_paths" => @plugin_paths,
    "sources"      => @sources,
  }
  require "bundler/yaml_serializer"
  SharedHelpers.filesystem_access(index_file) do |index_f|
    FileUtils.mkdir_p(index_f.dirname)
    File.open(index_f, "w") {|f| f.puts YAMLSerializer.dump(index) }
  end
end