Ruby:如何写宝石? [英] Ruby : How to write a gem?
问题描述
我想为Ruby编写一个包,并将它作为一个宝石提供。
什么是工具,步骤和陷阱?
是否有很好的教程,屏幕录像等,帮助您学习如何做到这一点?
Rubygems.org's指南是编写自己的宝石的最佳资源之一。
如果您使用 Bundler 在你的应用中,你可能想看Ryan Bigg的使用Bundler开发RubyGem 和 Railscast与Bundler创建宝石。
如果您有兴趣使用工具来帮助您编写宝石:
- 珠宝商 - 用于创建和管理Rubygem项目的意见工具。还有一个 Gemcutter和Jeweler Railscast 。
- Hoe - 来自seattlrb的家伙。 gem-this 增加了一些有用的rake任务。
一些教程/指南:
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 is one of the best resources for writing your own gem.
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.
If you're interested in tools to help you write gems:
- 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.
Some tutorials/guides:
- 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:如何写宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!