Maven Archetypes 的 Ruby on Rails 等效项
Maven 原型是快速启动和运行项目的便捷方法。 Rails 本身有点像一个原型。然而,我很想知道 Maven Archetypes 是否有任何 Rails 等价物。
例如,我想创建一个已经通过 Authlogic 内置了完整身份验证的原型。使用 Maven Archetypes,我需要构建一个已经准备就绪的项目,创建我的原型并开始对应该参数化的东西进行参数化。然后任何人都可以通过在原型生成命令和繁荣过程中填写一些问题来设置 Authlogic 来创建 Rails 项目!功能齐全的 Rails 应用程序,内置 Authlogic。
是否有等效的 Rails 应用程序? Generators 会这样做吗?这不是 Rails-y 吗?
Maven Archetypes are handy ways to get a project up and going in no time flat. Rails is kinda like an archetype in and of itself. However, I'm curious to know if there are any Rails equivalents for Maven Archetypes.
For example, I want to create an Archetype with full authentication already built in via Authlogic. With Maven Archetypes I would need to build a project with it already ready to go, create my archetype and start working back parameterizing things that should be parameterized. Then anyone can make a Rails project with Authlogic set up by filling out a few questions during the archetype generate command and boom! Fully functional Rails app with Authlogic built in.
Is there a Rails Equivalent? Are Generators expected to do this? Is this just not Rails-y?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 Rails 应用程序模板与 Maven Archetypes 最相似。 http://railscasts.com/episodes/148-app-templates -in-rails-2-3 是获得有关它们的意见的一个很好的起点。
I think that rails app templates are the most similar thing to Maven Archetypes. http://railscasts.com/episodes/148-app-templates-in-rails-2-3 is a good starting point to get an opinion about them.
也许您正在寻找模块和混合?
我不确定,但 railscasts 可能还有其他需要添加的内容。
Perhaps you are looking for Modules and Mixins?
I'm not sure but rails casts might have something else to add.