Sha256: 1cbdbe691642f48cb14579b822784f00ea9c7048df96fc06bf67dd191d300ed9
Contents?: true
Size: 970 Bytes
Versions: 7
Compression:
Stored size: 970 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 ||= "airbrakeapp.com" 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
7 entries across 7 versions & 1 rubygems