我想为 Ruby 编写一个包并将其作为 gem 提供。
有哪些工具、步骤和陷阱?
有没有好的教程、截屏视频等可以帮助您学习如何做到这一点?
Rubygems.org 指南 http://guides.rubygems.org/是编写自己的 gem 的最佳资源之一。
如果您正在使用Bundler http://gembundler.com/在您的应用程序中,您可能需要查看 Ryan Bigg 的指南使用 Bundler 开发 RubyGem https://github.com/radar/guides/blob/master/gem-development.md和Railscast 使用 Bundler 创建 gem http://railscasts.com/episodes/245-new-gem-with-bundler.
如果您对帮助您编写 gem 的工具感兴趣:
-
Jeweler https://github.com/technicalpickles/jeweler- 用于创建和管理 Rubygem 项目的自有工具。还有一个宝石切割者和珠宝商 Railscast http://railscasts.com/episodes/183-gemcutter-jeweler.
-
Hoe https://github.com/seattlerb/hoe- 来自 Seatlrb 的人。
-
gem-this http://github.com/lazyatom/gem-this添加了一堆有用的 rake 任务。
一些教程/指南:
- 创造你的第一颗宝石 http://rubysource.com/creating-your-first-gem/
-
使用bundler和rvm构建rubygem http://rails-bestpractices.com/blog/posts/8-using-bundler-and-rvm-to-build-a-rubygem- 使用bundler和rvm创建gem
- 宝石包装:最佳实践 http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices
-
红宝石配方 http://royw.wordpress.com/2010/06/07/ruby-gem-recipe/- 使用捆绑器和珠宝商创建宝石的介绍指南
-
如何构建 ruby gem 并将其托管在 gemcutter 上 http://buzaz.com/index.php/2010/01/03/how-to-build-a-ruby-gem/- 使用 echoe 和 gemcutter 的教程
-
Gemspec 的真相 http://blog.101ideas.cz/post/353002256/the-truth-about-gemspecs- 回顾宝石规格和处理它们的技巧
-
使用 RubyGems 进行打包 http://www.owengriffin.com/?p=63- 珠宝商快速入门指南
-
宝石——詹姆斯·亚当 http://effectif.com/ruby/manor/gem-this- 评论有助于构建宝石的工具(hoe、newgem、echoe、gemhub、jeweler、gem this)
- 从命令行使用 Gemcutter 的 Api http://tagaholic.me/2010/02/03/using-gemcutters-api-from-the-commandline.html
-
带 Bundler 的新 Gem – 示例 Rakefile http://pablocantero.com/blog/2011/01/02/new-gem-with-bundler-sample-rakefile/- 用于部署和发布 gem 的有用 rakefile
- 让我们写一个宝石 http://rakeroutes.com/blog/lets-write-a-gem-part-one/
- 如何使用 Bundler、测试驱动开发、Travis CI 和 Coveralls 构建 Ruby Gem,天哪! http://coding.smashingmagazine.com/2014/04/08/how-to-build-ruby-gem-with-bundler-travis-ci-coveralls/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)