我应该将非 Ruby 文件放在 gem 中的什么位置?
我想将 Upstart 配置文件放入我的 Ruby gem 中。这是我目前的最佳猜测
Gem::Specification.new do |s|
# ...
s.files = %w(
lib/rt_watchdog.rb
lib/upstart/rt_watchdog.conf
bin/rt_watchdog
)
end
一般来说,配置文件和其他类型的脚本在 gem 中放在哪里?
更新:我将示例中的路径从 Upstart/rt_watchdog.conf
更改为 lib/upstart/rt_watchdog.conf
,因为这就是我的路径现在决定继续,但我仍然感觉不太好。
I want to put an Upstart config file in my Ruby gem. Here's my current best guess
Gem::Specification.new do |s|
# ...
s.files = %w(
lib/rt_watchdog.rb
lib/upstart/rt_watchdog.conf
bin/rt_watchdog
)
end
In general, where do configuration files and other types of scripts go in a gem?
Update: I changed the path in my example from Upstart/rt_watchdog.conf
to lib/upstart/rt_watchdog.conf
as that's what I've decided to go with for now, but I still don't feel great about it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Rails 在应用程序的根目录中使用一个 config 目录,并且 Rails 约定在整个 Ruby 社区中得到了很好的体现。
Rails uses a config directory in the root of the app and Rails conventions are pretty well represented throughout the Ruby community.