Sha256: ddf7ff955484b4bcbd2350988caa24c5b4ee9465a5271d52b29c36f2d9af1ce4

Contents?: true

Size: 963 Bytes

Versions: 1

Compression:

Stored size: 963 Bytes

Contents

require "octogate/version"

require "active_support/core_ext/hash"
require "active_support/core_ext/object"
require "active_support/core_ext/string"
require "oj"
require "hashie"
require "awesome_print"

require "octogate/configuration"

module Octogate
  class << self
    REC_LIMIT = 100

    def config
      @config ||= Configuration.instance
    end

    def find_target(key)
      @config.targets.fetch(key)
    end

    def sent
      @sent ||= []
    end

    def received
      @received ||= []
    end

    def add_sent(target)
      sent.pop if sent.length > REC_LIMIT
      sent.unshift target
    end

    def add_received(event)
      received.pop if received.length > REC_LIMIT
      received.unshift event
    end
  end
end

require "octogate/model"
require "octogate/client"
require "octogate/config_loader"
require "octogate/target"
require "octogate/target_builder"
require "octogate/events"
require "octogate/sent_event"
require "octogate/gh"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octogate-0.3.0 lib/octogate.rb