私は自分のリポジトリruby gem
に宝石を公開するためのレーキ タスクを作成したいと思います: .GemInABox
http://my-gem-repo.com
この目標を達成する最も簡単な方法は何ですか?
また、デフォルトで への公開を防止したいと考えていますRubygems.org
。
Information on hosting your own gem can be found at http://guides.rubygems.org/run-your-own-gem-server/
Setup the server according to that site and the README on https://github.com/cwninja/geminabox
To release your gem:
gem build my_ruby_gem.gemspec
#push all versions to the gem server
gem inabox
The first time you run gem inabox, you will configure the destination.
For rake tasks, you could put this Rakefile in your gem source:
#!/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]
The system calls are definitely hacks, but they are a simple way to make it work. Better rake tasks are requested in: https://github.com/cwninja/geminabox/issues/59