![]() gem-ctagsĪdds a gem ctags command to invoke the Exuberant Ctags indexer on already-installed gems, and then automatically invokes it on gems as they are installed. gem browse opens a gem’s homepage in your browserĪdds command gem empty to remove all gems from current GEM_HOME. ![]() gem open opens a gem by name in your editor.In gem lib dir create rubygems_executable_plugin.rb: If you know of plugins that we missed, feel free to update this page.Įxtends rubygems to support executables plugins. The following list of RubyGems plugins is probably not exhaustive. Like other RubyGems builtin commands ( gem help commands, We can then use it by executing gem graph, and it is also documented Super 'graph', 'Graph dependency relationships of installed gems' As anĮxample, the graph plugin listed below registers its own graphĬlass Gem::Commands::GraphCommand < Gem::Command Some plugins also add their own commands to the RubyGems CLI. Source code, or see the contributing guide. Need for your needs, please read CONTRIBUTING.rdoc in RubyGems If you find that the plugin system API lacks the extension point you When our hook returns false, it aborts with an explanation. Pre-install hook at /…/lib/rubygems_plugin.rb:3 failed for coderay-1.1.2Īs expected, RubyGems calls our hook before each gem installation, and `coderay' is not whitelisted, install? (y/n): n `hoe' is not whitelisted, install? (y/n): y % echo rake > ~/.gem/install_audit/whitelist That we can return false to abort the installation: ![]() That our hook will be called with a Gem::Installer instance, and Reading this method documentation, we learn Will leverage the pre_install hook, passing a block to Interactively before installing gems while supporting a whitelist. Let’s consider a simple example plugin that would ask confirmation ![]() For example, existing hooks allowĮxecuting code before a single gem is installed, after it’s built,Īfter it’s installed, after all gem are installed and many others (seeĬode and documentation for Gem as a reference). RubyGems provides various hooks we can use to add custom features andĮven modify how RubyGems behaves. Of course, our plugin would better be packaged as a gem, which isĭescribed in detail in the make your own gem This is aīasic help message containing pointers to more information. He's also taught college courses and spoken publicly on topics such as "MySQL and You" and "Making Money with Open Source Software." He lives in New Hampshire and his hobbies include basketball, yo-yos, and sleep.RubyGems is a sophisticated package manager for Ruby. David's journalism has been in print in over 65 countries, in magazines such as Linux Magazine, Dr Dobb's Journal, and PHP International Magazine. Additionally, he has worked on several other Ruby projects, including the engine powering CyberKnowHow's BirdFluBreakingNews search engine, and he also created the Slueshi text adventure game system, a multiplayer text game engine written in Ruby. His professional accomplishments include creating the Ruby on Rails engine for, a site that tracks the latest Ruby developments, and working with on the Rails engine that powers Sermo America's Top Doctor contest. Prior to this, he worked professionally with PHP, Perl, C++, and Visual Basic. He's used both Ruby and Ruby on Rails for several years, starting in 2003 when he became a Ruby advocate after he wrote about the language for Dr Dobb's Journal. David Berube is a Ruby developer, trainer, author, and speaker.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |