有关托管自己宝石的信息,请访问http://guides.rubygems.org/run-your-own-gem-server/
根据该站点和https://github.com/cwninja/geminabox上的README设置服务器
要释放你的宝石:
gem build my_ruby_gem.gemspec
#push all versions to the gem server
gem inabox
Run Code Online (Sandbox Code Playgroud)
第一次运行gem inabox时,您将配置目标.
对于rake任务,你可以将这个Rakefile放在你的gem源中:
#!/usr/bin/env rake
desc "build the gem"
task :build do
system("gem build *.gemspec")
end
desc "push the gem to the gem inabox server"
task :release do
system("gem inabox")
end
desc "build and release the gem"
task :build_and_release => [:build,:release]
Run Code Online (Sandbox Code Playgroud)
系统调用肯定是黑客攻击,但它们是使其工作的简单方法.需要更好的rake任务:https: //github.com/cwninja/geminabox/issues/59