必威betway-手机版唯一官网
做最好的网站

betway必威手机版

当前位置:必威betway > betway必威手机版 > 使用gem插件功能的例子是

使用gem插件功能的例子是

来源:http://www.jdxzx.net 作者:必威betway 时间:2019-12-26 16:21

图片 1

在上星期, Ruby的包管理工具RubyGems发布了最新版本1.3.2版. 该版不但修改很多bug, 例如,支持使用的url做为gem的源地址.更重要的还增加了一些新的功能,其中,最显著的功能就是, 支持插件. 这里的插件含义是说,可以添加命令到gem命令行工具. 使用示例如下:

gem install graphgem graph#此处plugin应用

此例中的graph包中,使用的命令是用来通过生成图的方式展示,系统中所有安装的gem包的依赖情况.详细例子点击这里生成图如下:另一个,使用gem插件功能的例子是: rubypan他通过执行

gem ferret

在查询并返回列表请使用

gem install --system#1.1 1.2版本更新不能这样用

更新gem附录: 1.3.2主要更新引用Select New Features: * RubyGems now loads plugins from rubygems_plugin.rb in installed gems. This can be used to add commands (See Gem::CommandManager) or add install/uninstall hooks (See Gem::Installer and Gem::Uninstaller). * Gem::Version now understands prerelease versions using letters. (eg. ‘1.2.1.b’) Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg. * RubyGems now includes a Rake task for creating gems which replaces rake’s Rake::GemPackageTask. See Gem::PackageTask. * Gem::find_files now returns paths in $LOAD_PATH. * Added Gem::promote_load_path for use with Gem::find_files * Added Gem::bin_path to make finding executables easier. Patch #24114 by James Tucker. * Various improvements to build arguments for installing gems. * `gem contents` added --all and --no-prefix. * Gem::Specification o #validate strips directories and errors on not-files. o #description no longer removes newlines. o #name must be a String. o FIXME and TODO are no longer allowed in various fields. o Added support for a license attribute. Feature #11041 (partial). o Removed Gem::Specification::list, too much process growth. Bug #23668 by Steve Purcell. * `gem generate_index` o Can now generate an RSS feed. o Modern indicies can now be updated incrementally. o Legacy indicies can be updated separately from modern.

本文由必威betway发布于betway必威手机版,转载请注明出处:使用gem插件功能的例子是

关键词: