Sha256: 94394722eb61ad38ed6a81d982ec9cca81dd27b31397e13891b5a97fa1124c15

Contents?: true

Size: 988 Bytes

Versions: 54

Compression:

Stored size: 988 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 'honeybadger'
require 'rails/init'

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

host = ARGV[1]
host ||= "api.honeybadger.io"

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

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

Honeybadger.configure do |config|
  config.secure  = secure
  config.host    = host
  config.api_key = ARGV.first
end
puts "Configuration:"
Honeybadger.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}"
Honeybadger.notify(exception)

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
honeybadger-1.16.7 script/integration_test.rb
honeybadger-1.16.6 script/integration_test.rb
honeybadger-1.16.5 script/integration_test.rb
honeybadger-1.16.4 script/integration_test.rb
honeybadger-1.16.3 script/integration_test.rb
honeybadger-1.16.2 script/integration_test.rb
honeybadger-1.16.1 script/integration_test.rb
honeybadger-1.16.0 script/integration_test.rb
honeybadger-1.15.3 script/integration_test.rb
honeybadger-1.15.2 script/integration_test.rb
honeybadger-1.15.1 script/integration_test.rb
honeybadger-1.15.0 script/integration_test.rb
honeybadger-1.14.0 script/integration_test.rb
honeybadger-1.13.2 script/integration_test.rb
honeybadger-1.13.1 script/integration_test.rb
honeybadger-1.13.0 script/integration_test.rb
honeybadger-1.12.0.beta3 script/integration_test.rb
honeybadger-1.12.0.beta2 script/integration_test.rb
honeybadger-1.11.2 script/integration_test.rb
honeybadger-1.11.1 script/integration_test.rb