Sha256: 14836051953ccb0ed14a9248bfb0aa502fe5ede70401ceae4195125b39085a1c
Contents?: true
Size: 1.62 KB
Versions: 6
Compression:
Stored size: 1.62 KB
Contents
require "yaml" begin if Appsignal::System.jruby? require "appsignal/extension/jruby" # {Appsignal.extension_loaded} is set in the jRuby extension file else require "appsignal_extension" Appsignal.extension_loaded = true end 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 email us at support@appsignal.com" ) Appsignal.extension_loaded = false end module Appsignal # @api private 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 # Do nothing if the extension methods are not loaded # # Disabled in testing so we can make sure that we don't miss a extension # function implementation. def method_missing(m, *args, &block) super if Appsignal.testing? end end if Appsignal::System.jruby? extend Appsignal::Extension::Jruby # Reassign Transaction class for jRuby extension usage. # # Makes sure the generated docs aren't always overwritten with the jRuby # version. Transaction = Jruby::Transaction # Reassign Data class for jRuby extension usage. # # Makes sure the generated docs aren't always overwritten with the jRuby # version. Data = Jruby::Data end class Data def inspect "#<#{self.class.name}:#{object_id} #{self}>" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems