我正在编写一个小的Ruby程序,用于备份一些文件夹并发送到s3,
e.g。
backup.rb --folder /folder1 --folder /folder1 ...-c config.ini
在我从头开始编写这个程序之前,我想知道是否有一些我可以参考的现有好的样本项目布局?
e.g。如何布局tests, libraries, classes, configs, doc
等
我对允许我共享库的布局特别感兴趣,以便稍后我可以轻松地在其他项目中重复使用。,甚至提交给ruby gems
如果有人能从现有的OSS向我发送一些好的例子,那将会很有帮助。
答案 0 :(得分:2)
这是一个非常标准的结构。摘自RubyGem Tutorial
.
bin/ # Executables here
data/ # Assets here
doc/ # RDOC for the lib directory
lib/ # Code for the project
project_module.rb # Contains project module
project_module/ # Classes for project module
# Either
spec/ # RSpec Tests
test/ # Test::Unit Tests