def wagonfile_update(specs)
      wagonfile_edit(specs) do |spec, content|
        declaration = "gem '#{spec.name}'"
        declaration += ", '#{spec.version}'" if include_version_in_wagonfile
        unless content.sub!(gem_declaration_regexp(spec.name), declaration)
          content += "\n#{declaration}"
        end
        content
      end
    end
def wagonfile_update(specs)
      wagonfile_edit(specs) do |spec, content|
        declaration = "gem '#{spec.name}'"
        declaration += ", '#{spec.version}'" if include_version_in_wagonfile
        unless content.sub!(gem_declaration_regexp(spec.name), declaration)
          content += "\n#{declaration}"
        end
        content
      end
    end
Update the Wagonfile with the given gem specifications.