Sha256: 2d17b0c0cc7b31a3418338f850d918415afffc4e657c9780ae3872d3c220d3fd

Contents?: true

Size: 966 Bytes

Versions: 5

Compression:

Stored size: 966 Bytes

Contents

#!/usr/bin/env ruby

require 'logger'
require 'fileutils'

RAILS_ENV = "production"
RAILS_ROOT = FileUtils.pwd
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)

$: << File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'airbrake'
require 'rails/init'

fail "Please supply an API Key as the first argument" if ARGV.empty?

host = ARGV[1]
host ||= "airbrake.io"

secure = (ARGV[2] == "secure")

exception = begin
              raise "Testing airbrake notifier with secure = #{secure}. If you can see this, it works."
            rescue => foo
              foo
            end

Airbrake.configure do |config|
  config.secure  = secure
  config.host    = host
  config.api_key = ARGV.first
end
puts "Configuration:"
Airbrake.configuration.to_hash.each do |key, value|
  puts sprintf("%25s: %s", key.to_s, value.inspect.slice(0, 55))
end
puts "Sending #{secure ? "" : "in"}secure notification to project with key #{ARGV.first}"
Airbrake.notify(exception)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
airbrake-3.0.9 script/integration_test.rb
airbrake-3.0.8 script/integration_test.rb
airbrake-3.0.7 script/integration_test.rb
airbrake-3.0.6 script/integration_test.rb
airbrake-3.0.5 script/integration_test.rb