def dependency_tree(args = {}, &bl)
      local_args        = Hash[args]
      recursive         = local_args[:recursive]
      retrieve_dev_deps = local_args[:dev_deps]
      matching          = local_args[:matching]
      dependencies      = local_args[:dependencies] || {}
      return dependencies if dependencies.key?(name) && dependencies[name].key?(version)

      dependencies[name]          ||= {}
      dependencies[name][version]   = deps + dev_deps
      args[:dependencies]           = dependencies

      resolved_deps = resolve_tree_deps(args.merge({:deps => deps}),     &bl)
      resolved_dev  = retrieve_dev_deps ? resolve_tree_deps(args.merge({:deps => dev_deps}), &bl) : []

      (resolved_deps + resolved_dev).each { |dep|
        dependencies.merge! dep.dependency_tree(args, &bl)
        args[:dependencies] = dependencies
      } if recursive

      return dependencies
    end
def dependency_tree(args = {}, &bl)
      local_args        = Hash[args]
      recursive         = local_args[:recursive]
      retrieve_dev_deps = local_args[:dev_deps]
      matching          = local_args[:matching]
      dependencies      = local_args[:dependencies] || {}
      return dependencies if dependencies.key?(name) && dependencies[name].key?(version)

      dependencies[name]          ||= {}
      dependencies[name][version]   = deps + dev_deps
      args[:dependencies]           = dependencies

      resolved_deps = resolve_tree_deps(args.merge({:deps => deps}),     &bl)
      resolved_dev  = retrieve_dev_deps ? resolve_tree_deps(args.merge({:deps => dev_deps}), &bl) : []

      (resolved_deps + resolved_dev).each { |dep|
        dependencies.merge! dep.dependency_tree(args, &bl)
        args[:dependencies] = dependencies
      } if recursive

      return dependencies
    end
Retrieve map of gems to dependencies (optionally recursively)