谁能告诉我 Ruby 中 Gemspec 文件的用途是什么? [英] Can anyone tell me what the purpose of a Gemspec file in Ruby is?

查看:52
本文介绍了谁能告诉我 Ruby 中 Gemspec 文件的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在通过 Google 进行梳理后,我知道我的项目的 gemspec 文件中的内容,但我不知道为什么我们需要它,我想我是寻找实用的定义.

After combing through Google I know what goes in a gemspec file for my project, but I have no clue as to why we need it, I guess I'm looking for a practical definition.

(目前正在学习 Zed Shaw 的 Learn Ruby the Hard Way,这是学习问题之一)

(Currently working through Learn Ruby the Hard Way by Zed Shaw, this was one of the study questions)

推荐答案

根据官方RubyGems 网站:

gemspec 定义了 gem 中的内容、制作者以及版本宝石.它也是您访问 RubyGems.org 的界面.全部您在 gem 页面上看到的信息(例如 jekyll's)来自宝石规格.

The gemspec defines what’s in the gem, who made it, and the version of the gem. It’s also your interface to RubyGems.org. All of the information you see on a gem page (like jekyll’s) comes from the gemspec.

一旦您的 gemspec 文件被整理出来,您就可以构建它来组装您的 gem.

Once your gemspec file is sorted out you build it to assemble your gem.

这篇关于谁能告诉我 Ruby 中 Gemspec 文件的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆