class Raketeer::GitHubPkgTask
@author Jonathan Bradley Whited @since 0.2.8
Attributes
deps[RW]
description[RW]
name[RW]
username[RW]
Public Class Methods
new(name=:github_pkg) { |self| ... }
click to toggle source
Calls superclass method
# File lib/raketeer/github_pkg_task.rb, line 28 def initialize(name=:github_pkg) super() @deps = [:build] @description = "Publish this project's gem(s) to GitHub Packages" @name = name @username = nil yield self if block_given? @username = Util.find_github_username if @username.nil? raise "#{self.class.name}.username is nil" if @username.nil? define end
Public Instance Methods
define()
click to toggle source
# File lib/raketeer/github_pkg_task.rb, line 45 def define desc @description task @name => Array(@deps) do |task,args| sh_cmd = ['gem'] sh_cmd.push('push') sh_cmd.push('--key','github') sh_cmd.push('--host',"https://rubygems.pkg.github.com/#{username}") sh_cmd.push(*Dir.glob(File.join('pkg','*.gem'))) # Is this okay for multiple gems? sh(*sh_cmd) end end