module Hoe::Gemcutter
Gemcutter
plugin for hoe.
Extra Configuration Options:¶ ↑
- otp_command
-
Shell command to run to populate GEM_HOST_OTP_CODE.
Public Instance Methods
define_gemcutter_tasks()
click to toggle source
Define release_to_gemcutter and attach it to the release task.
# File lib/hoe/gemcutter.rb, line 33 def define_gemcutter_tasks desc "Push gem to gemcutter." task :release_to_gemcutter => [:clean, :package, :release_sanity] do pkg = "pkg/#{spec.name}-#{spec.version}" gems = Dir["#{pkg}*.gem"] gem_push gems end task :release_to => :release_to_gemcutter end
gem_push(gems)
click to toggle source
Push gems to server.
# File lib/hoe/gemcutter.rb, line 18 def gem_push gems with_config do |config, _| otp_command = config["otp_command"] ENV["GEM_HOST_OTP_CODE"] = `#{otp_command}`.chomp if otp_command end gems.each do |g| sh Gem.ruby, "-S", "gem", "push", g end end