Reverse dependencies with rubygems

on 2015-05-23

I need sometime to know reverse dependencies of a gem, like apt-cache rdepends in Debian APT.

There is a command in rubygems dependency where you can add option -R to have list of the gems.

gem dependency money -R

However, you can only request locally installed packages. With some shell and tools like jq you can have them with:

GEM_NAME=money
curl https://rubygems.org/api/v1/gems/${GEM_NAME}/reverse_dependencies.json | \
    jq 'sort|.[]'

If you are interested in this topic, I've worked on a pull request to expose on the rubygems.org this API.