Skip to content

add_dependency alias is only partially documented #7790

@jeromedalbert

Description

@jeromedalbert

Describe the problem as clearly as you can

The add_dependency alias is documented in the rubydoc documentation, but not in the specification reference.

The specification reference is more visible in search engine results, for example if you Google "rubygems add_dependency" the first result is the specification reference, whereas the rubydoc documentation only appears on the second page of results. This means that add_dependency has poor visibility and it is harder to get to the official documentation for this method.

add_dependency seems to be more prominent, as it is mentioned in the Bundler guide as the way to add a non-development dependency, and bundle gem generates a gemspec that also mentions it:

# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"

Since the specification is generated from the Gem::Specification class, similarly to rubydoc, I think the specification should mention add_dependency as an alias.

Additional information

Reference: #4034
Potential fix: rubygems/guides#370

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions