Uses the typhoeus
๐ to make parallel requests to the public
RubyGems API.
Installation
$ gem install gem_lookup
Design
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.
Flags
Help
Pass -h
or --help
to get help.
$ gems --help
Version
Pass -v
or --version
to get the installed version.
$ gems --version
Pass It Some Gems
Since it sends requests in parallel, the order you pass gems in may not be the order in which you see the results.
Formatting
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. ๐
Output
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.
The Basics
Default Output
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
Wordy Output
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
JSON Output
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
}
]
}
Standard Mode
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
Batch Mode
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
Non-Existent Gems
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
Timing Out
If a gem lookup times out, the output will let you know.
$ gems rails
=> ๐ Looking up: rails
=> ๐ rails lookup timed out
Rate Limit
Please be aware there is a rate limit to be mindful of.
As of June 10th, 2021: API and website: 10 requests per second
.
Development
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.
Contributing
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.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the GemLookup project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.