Sha256: 73b1f936b9f638ddba12cd63c0a7e3087b518ba8cde05614134a53c8eda3ad32
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
require 'json' require 'net/http' require_relative "worker/version" module AppVeyor::Worker def self.skip? !api end def self.message msg, details=nil x = api or return body = JSON.generate category: 'info', message: msg, details: details x.post '/api/build/messages', body, 'Content-Length'=>body.length.to_s, 'Content-Type'=>'application/json' end def self.test info x = api or return body = JSON.generate info x.post '/api/tests', body, 'Content-Length'=>body.length.to_s, 'Content-Type'=>'application/json' end def self.env envs x = api or return envs.each do |k, v| body = JSON.generate name: k, value: v x.post '/api/build/variables', body, 'Content-Length'=>body.length.to_s, 'Content-Type'=>'application/json' end end private def self.api return if false===@http return @http if @http unless z = ENV['APPVEYOR_API_URL'] @http = false return end z = URI z @http = x = Net::HTTP.start z.host, z.port x.use_ssl='https'==z.scheme x end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
appveyor-worker-0.1.1 | lib/appveyor/worker.rb |
appveyor-worker-0.1.0 | lib/appveyor/worker.rb |