Uses the typhoeus
π to make parallel requests to the public
RubyGems API.
$ gem install gem_lookup
The idea behind gem_lookup
is that you'll call the it using the gems
executable command. It
should be used when you are doing maintenance and project upgrades. It will be able to answer
questions the RubyGems website can.
gems
This will be made available when the gem is installed.
Pass -h
or --help
to get help.
$ gems --help
Pass -v
or --version
to get the installed version.
$ gems --version
Since it sends requests in parallel, the order you pass gems in may not be the order in which you see the results.
The list of gems are lowercased, and then de-duped. So don't worry if you pass in any capitalization or duplicate gems; It's got you covered. π
By default, there will be many emojis to identify info, and a small variety of colors depending on whether certain criteria are met for the line. It also looks even better with font ligatures enabled, so if your font and/or terminal support them, it is recommended that they be enabled.
Just pass it a gem name.
$ gems pry
=> π Looking up: pry
=> π pry is at 0.14.1
==> π
April 12, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/pry
==> π http://pry.github.io
==> π https://github.com/pry/pry
==> π https://github.com/pry/pry/blob/master/CHANGELOG.md
Use the -w
or --wordy
flags for emoji-less output.
$ gems --wordy pry
=> Looking up: pry
=> Gem: pry is at 0.14.1
==> Updated: April 12, 2021
==> License: MIT
==> Location: https://rubygems.org/gems/pry
==> Homepage: http://pry.github.io
==> Source Code: https://github.com/pry/pry
==> Changelog: https://github.com/pry/pry/blob/master/CHANGELOG.md
==> Mailing List: Unavailable
Use the -j
or --json
flags for JSON-based output. Two entries are added to each gem queried:
exists
is whether or not the gem was found.timeout
is whether or not the request to the server for the gem timed out.
$ gems --json pry
{
"gems": [
{
"name": "pry",
"downloads": 212107466,
"version": "0.14.1",
"version_created_at": "2021-04-12T10:37:24.934Z",
"version_downloads": 1719287,
"platform": "ruby",
"authors": "John Mair (banisterfiend), Conrad Irwin, Ryan Fitzgerald, Kyrylo Silin",
"info": "Pry is a runtime developer console and IRB alternative with powerful\nintrospection capabilities. Pry aims to be more than an IRB replacement. It is\nan attempt to bring REPL driven programming to the Ruby language.\n",
"licenses": [
"MIT"
],
"metadata": {
"changelog_uri": "https://github.com/pry/pry/blob/master/CHANGELOG.md",
"bug_tracker_uri": "https://github.com/pry/pry/issues",
"source_code_uri": "https://github.com/pry/pry"
},
"yanked": false,
"sha": "99b6df0665875dd5a39d85e0150aa5a12e2bb4fef401b6c4f64d32ee502f8454",
"project_uri": "https://rubygems.org/gems/pry",
"gem_uri": "https://rubygems.org/gemspry-0.14.1.gem",
"homepage_uri": "http://pry.github.io",
"wiki_uri": null,
"documentation_uri": null,
"mailing_list_uri": null,
"source_code_uri": "https://github.com/pry/pry",
"bug_tracker_uri": "https://github.com/pry/pry/issues",
"changelog_uri": "https://github.com/pry/pry/blob/master/CHANGELOG.md",
"funding_uri": null,
"dependencies": {
"development": [
],
"runtime": [
{
"name": "coderay",
"requirements": "~> 1.1"
},
{
"name": "method_source",
"requirements": "~> 1.0"
}
]
},
"exists": true,
"timeout": false
}
]
}
Since there is a rate limit, passing less gems than that will cause it to run in
Standard
mode:
$ gems pry rspec sentry-ruby rails
=> π€ 4 gems
=> π pry, rspec, sentry-ruby, rails
=> π pry is at 0.14.1
==> π
April 12, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/pry
==> π http://pry.github.io
==> π https://github.com/pry/pry
==> π https://github.com/pry/pry/blob/master/CHANGELOG.md
==> π Unavailable
=> π rspec is at 3.10.0
==> π
October 30, 2020
==> πΌ MIT
==> π§ https://rubygems.org/gems/rspec
==> π http://github.com/rspec
==> π https://github.com/rspec/rspec
==> π Unavailable
==> π https://groups.google.com/forum/#!forum/rspec
=> π sentry-ruby is at 4.6.1
==> π
July 8, 2021
==> πΌ Apache-2.0
==> π§ https://rubygems.org/gems/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
==> π Unavailable
=> π rails is at 6.1.4
==> π
June 24, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/rails
==> π https://rubyonrails.org
==> π https://github.com/rails/rails/tree/v6.1.4
==> π https://github.com/rails/rails/releases/tag/v6.1.4
==> π https://discuss.rubyonrails.org/c/rubyonrails-talk
When more gems are passed in than the rate limit supports, the script will enter
Batch
mode. In this mode, the output is slightly different, and there is a one second pause
between batches, so as to respect the rate limit.
$ gems byebug pinglish rspec rubocop rubocop-rspec rubocop-rails sentry-ruby sentry-rails pry byebug typhoeus faraday Faraday rails pagy clowne discard aasm logidze GLOBALIZE lockbox factory_BOT faker site_prism nokogiri simplecov
=> π€ 24 gems
=> π§Ί 1 of 3
=> π byebug, pinglish, rspec, rubocop, rubocop-rspec, rubocop-rails, sentry-ruby, sentry-rails, pry, typhoeus
=> π rspec is at 3.10.0
==> π
October 30, 2020
==> πΌ MIT
==> π§ https://rubygems.org/gems/rspec
==> π http://github.com/rspec
==> π https://github.com/rspec/rspec
==> π Unavailable
==> π https://groups.google.com/forum/#!forum/rspec
=> π rubocop-rspec is at 2.4.0
==> π
June 9, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/rubocop-rspec
==> π https://github.com/rubocop/rubocop-rspec
==> π Unavailable
==> π https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md
==> π Unavailable
=> π rubocop is at 1.18.3
==> π
July 6, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/rubocop
==> π https://rubocop.org/
==> π https://github.com/rubocop/rubocop/
==> π https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
==> π Unavailable
=> π sentry-rails is at 4.6.1
==> π
July 8, 2021
==> πΌ Apache-2.0
==> π§ https://rubygems.org/gems/sentry-rails
==> π https://github.com/getsentry/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
==> π Unavailable
=> π byebug is at 11.1.3
==> π
April 23, 2020
==> πΌ BSD-2-Clause
==> π§ https://rubygems.org/gems/byebug
==> π https://github.com/deivid-rodriguez/byebug
==> π https://github.com/deivid-rodriguez/byebug
==> π Unavailable
==> π Unavailable
=> π pinglish is at 0.2.1
==> π
November 13, 2014
==> πΌ None
==> π§ https://rubygems.org/gems/pinglish
==> π https://github.com/jbarnette/pinglish
==> π Unavailable
==> π Unavailable
==> π Unavailable
=> π sentry-ruby is at 4.6.1
==> π
July 8, 2021
==> πΌ Apache-2.0
==> π§ https://rubygems.org/gems/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby
==> π https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md
==> π Unavailable
=> π rubocop-rails is at 2.11.3
==> π
July 11, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/rubocop-rails
==> π https://docs.rubocop.org/rubocop-rails/
==> π https://github.com/rubocop/rubocop-rails/
==> π https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md
==> π Unavailable
=> π pry is at 0.14.1
==> π
April 12, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/pry
==> π http://pry.github.io
==> π https://github.com/pry/pry
==> π https://github.com/pry/pry/blob/master/CHANGELOG.md
==> π Unavailable
=> π typhoeus is at 1.4.0
==> π
May 8, 2020
==> πΌ MIT
==> π§ https://rubygems.org/gems/typhoeus
==> π https://github.com/typhoeus/typhoeus
==> π https://github.com/typhoeus/typhoeus
==> π Unavailable
==> π http://groups.google.com/group/typhoeus
=> π§Ί 2 of 3
=> π faraday, rails, pagy, clowne, discard, aasm, logidze, globalize, lockbox, factory_bot
=> π discard is at 1.2.0
==> π
February 17, 2020
==> πΌ MIT
==> π§ https://rubygems.org/gems/discard
==> π https://github.com/jhawthorn/discard
==> π Unavailable
==> π Unavailable
==> π Unavailable
=> π rails is at 6.1.4
==> π
June 24, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/rails
==> π https://rubyonrails.org
==> π https://github.com/rails/rails/tree/v6.1.4
==> π https://github.com/rails/rails/releases/tag/v6.1.4
==> π https://discuss.rubyonrails.org/c/rubyonrails-talk
=> π pagy is at 4.10.1
==> π
June 24, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/pagy
==> π https://github.com/ddnexus/pagy
==> π Unavailable
==> π Unavailable
==> π Unavailable
=> π clowne is at 1.3.0
==> π
May 12, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/clowne
==> π https://clowne.evilmartians.io/
==> π http://github.com/clowne-rb/clowne
==> π https://github.com/clowne-rb/clowne/blob/master/CHANGELOG.md
==> π Unavailable
=> π logidze is at 1.2.0
==> π
June 11, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/logidze
==> π http://github.com/palkan/logidze
==> π http://github.com/palkan/logidze
==> π https://github.com/palkan/logidze/blob/master/CHANGELOG.md
==> π Unavailable
=> π aasm is at 5.2.0
==> π
May 1, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/aasm
==> π https://github.com/aasm/aasm
==> π https://github.com/aasm/aasm
==> π Unavailable
==> π Unavailable
=> π lockbox is at 0.6.5
==> π
July 7, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/lockbox
==> π https://github.com/ankane/lockbox
==> π Unavailable
==> π Unavailable
==> π Unavailable
=> π factory_bot is at 6.2.0
==> π
May 7, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/factory_bot
==> π https://github.com/thoughtbot/factory_bot
==> π Unavailable
==> π Unavailable
==> π Unavailable
=> π globalize is at 6.0.1
==> π
June 23, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/globalize
==> π http://github.com/globalize/globalize
==> π Unavailable
==> π Unavailable
==> π Unavailable
=> π faraday is at 1.5.1
==> π
July 11, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/faraday
==> π https://lostisland.github.io/faraday
==> π https://github.com/lostisland/faraday
==> π https://github.com/lostisland/faraday/releases/tag/v1.5.1
==> π Unavailable
=> π§Ί 3 of 3
=> π faker, site_prism, nokogiri, simplecov
=> π site_prism is at 3.7.1
==> π
February 19, 2021
==> πΌ BSD-3-Clause
==> π§ https://rubygems.org/gems/site_prism
==> π https://github.com/site-prism/site_prism
==> π https://github.com/site-prism/site_prism
==> π https://github.com/site-prism/site_prism/blob/main/CHANGELOG.md
==> π Unavailable
=> π simplecov is at 0.21.2
==> π
January 9, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/simplecov
==> π https://github.com/simplecov-ruby/simplecov
==> π https://github.com/simplecov-ruby/simplecov/tree/v0.21.2
==> π https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md
==> π https://groups.google.com/forum/#!forum/simplecov
=> π faker is at 2.18.0
==> π
May 15, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/faker
==> π https://github.com/faker-ruby/faker
==> π https://github.com/faker-ruby/faker
==> π https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md
==> π Unavailable
=> π nokogiri is at 1.11.7
==> π
June 3, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/nokogiri
==> π https://nokogiri.org
==> π https://github.com/sparklemotion/nokogiri
==> π https://nokogiri.org/CHANGELOG.html
==> π Unavailable
If a gem isn't found, the output will be a little bit different: that particular line will be red. It's also important to know that not finding a gem doesn't block other gems from being looked up.
$ gems non-existent rails
=> π€ 2 gems
=> π non-existent, rails
=> π non-existent not found
=> π rails is at 6.1.4
==> π
June 24, 2021
==> πΌ MIT
==> π§ https://rubygems.org/gems/rails
==> π https://rubyonrails.org
==> π https://github.com/rails/rails/tree/v6.1.4
==> π https://github.com/rails/rails/releases/tag/v6.1.4
==> π https://discuss.rubyonrails.org/c/rubyonrails-talk
If a gem lookup times out, the output will let you know.
$ gems rails
=> π Looking up: rails
=> π rails lookup timed out
Please be aware there is a rate limit to be mindful of.
As of June 10th, 2021: API and website: 10 requests per second
.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run
the tests. You can also run bin/console
for an interactive prompt that will allow you to
experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new
version, update the version number in version.rb
, and then run bundle exec rake release
, which
will create a git tag for the version, push git commits and the created tag, and push the
gem_lookup.gem_spec
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the GemLookup project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.