This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeployGate | |
def self.invite user_name, api_fragment, app_id, token | |
invite_api_url = "https://deploygate.com/api/users/#{account_name}/#{api_fragment}/#{app_id}/members" | |
%x(curl '#{invite_api_url}' -F 'users=[#{user_name}]' -F 'token=#{token}' -F role=2) | |
end | |
def self.upload file_path, token | |
%x(curl 'https://deploygate.com/api/users/#{account_name}/apps' -F 'file=@#{file_path}' -F 'token=#{token}') | |
end | |
end |