Sha256: 604d3aa6b334dd43247add56f6e3626aaa94d46981ad8a3491e85d375b31f448

Contents?: true

Size: 752 Bytes

Versions: 91

Compression:

Stored size: 752 Bytes

Contents

require 'yaml'

begin
  require 'appsignal_extension'
  Appsignal.extension_loaded = true
rescue LoadError => err
  Appsignal.logger.error(
    "Failed to load extension (#{err}), please check the install.log file in " \
    "the ext directory of the gem and e-mail us at support@appsignal.com"
  )
  Appsignal.extension_loaded = false
end

module Appsignal
  class Extension
    class << self
      def agent_config
        @agent_config ||= YAML.load(
          File.read(File.join(File.dirname(__FILE__), '../../ext/agent.yml'))
        )
      end

      def agent_version
        agent_config['version']
      end

      def method_missing(m, *args, &block)
        # Do nothing if the extension methods are not loaded
      end
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

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