Sha256: 6e322afd04ad4dbf87c9d280fc297812d5efb8a2b2b0fcde9a16272ae352ed4a

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

##
# This class hold all configurations related to Bugflux. Our aim is to make this
# a generalized class that collects metrics for all the apps like: bugflux,
# perflux etc based on the host application configuration.
#
# Also, it would be better to extract the notice sending logic to its own gem.
# This is because all hook applications might not be on the same address.
module AppfluxRuby
  class BugfluxConfig
    ##
    # @return [ID] Identify the application where to send the notification.
    # This value *must* be set.
    attr_accessor :app_id, :ignored_environments

    ##
    # @return [Logger] the default logger used for debug output
    # attr_accessor :logger

    ##
    # @return [String] the host, which provides the API endpoint to which
    #   exceptions should be sent
    attr_reader :host

    def initialize config = Hash.new
      @host = host_name
    end

    ##
    # @return [Boolean], Whether we are using secure connection or not.
    def use_ssl
      false
    end

    private

      # This is the URL to API that accepts notifications generated by this gem.
      # Should be something like: /applications/<app_id>/notifications [POST]
      def host_name
        'http://appflux.io/exceptions'
      end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appflux_ruby-0.1.2 lib/appflux_ruby/bugflux_config.rb