Sha256: f478ab2932000f9896bc1d85739c51d67459f3f7e724b015ce6f3bef9b30c727

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

# Copyright (c) 2013 by Tracelytics, Inc.
# All rights reserved.

begin
  # TRACEVIEW_URL env var is standard with the Heroku addon.  We
  # use it to determine if we are actually running in Heroku or not.
  if ENV.has_key?('TRACEVIEW_URL') and ENV['RAILS_GROUP'] != 'assets'
    begin
      require 'heroku_metal'
      require 'oboe_metal.so'
    rescue LoadError => e
      Oboe.loaded = false
      
      if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
        $stderr.puts "[oboe-heroku/error] Could not load all dependencies: #{e.message}"
        $stderr.puts e.backtrace.join("\n")
      end
    end

    require 'oboe-heroku/loading'
    require 'oboe-heroku/version'

    # Require the core oboe gem
    require 'oboe'

    ::OboeHeroku::Loading.configure if Oboe.loaded
  end
rescue Exception => e
  Oboe.loaded = false

  $stderr.puts "[oboe-heroku/error] Problem loading: #{e.message}"
  if ENV.has_key?('TRACEVIEW_DEBUG_LEVEL') and (ENV['TRACEVIEW_DEBUG_LEVEL'].to_i > 1)
    $stderr.puts e.backtrace.join("\n")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oboe-heroku-0.9.14.4 lib/oboe-heroku.rb
oboe-heroku-0.9.13.3 lib/oboe-heroku.rb
oboe-heroku-0.9.12.2 lib/oboe-heroku.rb
oboe-heroku-0.9.11.0 lib/oboe-heroku.rb
oboe-heroku-0.9.10.0 lib/oboe-heroku.rb