Sha256: eb173ae6704247f2720b605af26c469e3f00a0d948411f8e90298ff016400c71

Contents?: true

Size: 701 Bytes

Versions: 57

Compression:

Stored size: 701 Bytes

Contents

module Appsignal
  class Marker
    attr_reader :marker_data, :config
    ACTION = 'markers'

    def initialize(marker_data, config)
      @marker_data = marker_data
      @config = config
    end

    def transmit
      transmitter = Transmitter.new(ACTION, config)
      puts "Notifying Appsignal of deploy with: revision: #{marker_data[:revision]}, user: #{marker_data[:user]}"
      result = transmitter.transmit(marker_data)
      if result == '200'
        puts 'Appsignal has been notified of this deploy!'
      else
        raise "#{result} at #{transmitter.uri}"
      end
    rescue Exception => e
      puts "Something went wrong while trying to notify Appsignal: #{e}"
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
appsignal-1.3.6.beta.1 lib/appsignal/marker.rb
appsignal-1.3.5 lib/appsignal/marker.rb
appsignal-1.3.5.beta.1 lib/appsignal/marker.rb
appsignal-1.3.4 lib/appsignal/marker.rb
appsignal-1.3.3 lib/appsignal/marker.rb
appsignal-1.4.0.alpha.2 lib/appsignal/marker.rb
appsignal-1.4.0.alpha.1 lib/appsignal/marker.rb
appsignal-1.3.2 lib/appsignal/marker.rb
appsignal-1.3.1 lib/appsignal/marker.rb
appsignal-1.3.0 lib/appsignal/marker.rb
appsignal-1.3.0.beta.3 lib/appsignal/marker.rb
appsignal-1.3.0.beta.2 lib/appsignal/marker.rb
appsignal-1.3.0.beta.1 lib/appsignal/marker.rb
appsignal-1.2.5 lib/appsignal/marker.rb
appsignal-1.2.4 lib/appsignal/marker.rb
appsignal-1.2.4.beta.4 lib/appsignal/marker.rb
appsignal-1.2.4.beta.3 lib/appsignal/marker.rb
appsignal-1.2.4.beta.2 lib/appsignal/marker.rb
appsignal-1.2.4.beta.1 lib/appsignal/marker.rb
appsignal-1.2.3 lib/appsignal/marker.rb