问题描述
我想为 Ruby 编写一个包并将其作为 gem 提供.
有哪些工具、步骤和陷阱?
是否有任何好的教程、截屏视频等可以帮助您学习如何做到这一点?
I'd like to write a package for Ruby and make it available as a gem.
What are the tools, steps and pitfalls ?
Are there any good tutorials, screencasts, etc., which helped you learning how to do it ?
推荐答案
Rubygems.org's Guides 是其中之一编写自己的 gem 的最佳资源.
Rubygems.org's Guides is one of the best resources for writing your own gem.
如果您在应用中使用 Bundler,您可能需要查看 Ryan Bigg 的 和 Railscast 关于使用 Bundler 创建 gems.
If you're using Bundler in your app, you might want to look at Ryan Bigg's guide to Developing a RubyGem using Bundler and the Railscast on creating gems with Bundler.
如果您对帮助您编写 gem 的工具感兴趣:
If you're interested in tools to help you write gems:
- Jeweler - 用于创建和管理 Rubygem 项目的自以为是的工具.还有一个Gemcutter and Jeweler Railscast.
- 锄头 - 来自 seattlrb 的人.
- gem-this 添加了一堆有用的 rake 任务.
- Jeweler - Opinionated tool for creating and managing Rubygem projects. There's also a Gemcutter and Jeweler Railscast.
- Hoe - From the guys at seattlrb.
- gem-this adds a bunch of helpful rake tasks.
一些教程/指南:
- 创建您的第一颗宝石
- 使用捆绑器和 rvm构建一个 rubygem - 使用 bundler 和 rvm 创建一个 gem
- Gem 包装:最佳实践
- Ruby Gem 配方 - 创建一个介绍指南使用捆绑器和珠宝商的宝石
- 如何构建 rubygem 并将其托管在 gemcutter 上 - 使用 echoe 和 gemcutter 的教程
- 关于 Gemspecs 的真相 - 了解 gemspecs 和提示与他们打交道
- 使用 RubyGems 打包 - 珠宝商快速入门指南
- gem that - James Adam - 评论有助于构建 gems 的工具(hoe、newgem, echoe, gemhub, 珠宝商, gem this)
- 从命令行使用 Gemcutter 的 API一个>
- 使用 Bundler 的新 Gem – 示例 Rakefile - 用于部署和发布 gem 的有用 rakefile
- 让我们写一个 Gem
- 如何使用 Bundler、测试驱动开发、Travis CI 和工作服构建 Ruby Gem,哦,天哪!
- Creating Your First Gem
- Using bundler and rvm to build a rubygem - Using bundler and rvm to create a gem
- Gem Packaging: Best Practices
- Ruby Gem Recipe - Intro guide to creating a gem using bundler and jeweler
- How to build a ruby gem and host it on gemcutter - tutorial using echoe and gemcutter
- The Truth About Gemspecs - goes over gemspecs and tips for dealing with them
- Packaging with RubyGems - a quickstart guide for Jeweler
- gem that - James Adam - reviews tools that help build gems (hoe, newgem, echoe, gemhub, jeweler, gem this)
- Using Gemcutter's Api from the Commandline
- New Gem with Bundler – Sample Rakefile - Useful rakefile for deploying and publishing a gem
- Let's Write a Gem
- How To Build A Ruby Gem With Bundler, Test-Driven Development, Travis CI And Coveralls, Oh My!
这篇关于Ruby:如何写一个 gem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!