class XCJobs::Distribute::DeployGate

Attributes

disable_notify[RW]
distribution_key[RW]
file[RW]
message[RW]
owner_name[RW]
release_note[RW]
token[RW]
visibility[RW]

Public Class Methods

new() { |self| ... } click to toggle source
# File lib/xcjobs/distribute.rb, line 92
def initialize()
  yield self if block_given?
  define
end

Private Instance Methods

define() click to toggle source
# File lib/xcjobs/distribute.rb, line 99
def define
  namespace :distribute do
    desc 'upload IPA to DeployGate'
    task :deploygate do
      upload("https://deploygate.com/api/users/#{owner_name}/apps", form_data)
    end
  end
end
form_data() click to toggle source
# File lib/xcjobs/distribute.rb, line 108
def form_data
  {}.tap do |fields|
    fields[:token] = token if token
    fields[:file] = "@#{file}" if file
    fields[:message] = message if message
    fields[:distribution_key] = distribution_key if distribution_key
    fields[:release_note] = release_note if release_note
    fields[:disable_notify] = 'yes' if disable_notify
    fields[:visibility] = visibility if visibility
  end
end