Sha256: cdba1cc05bf4a226e1c2bc42203fb5e3ec4499ed613cf13a67593027e5646ec1
Contents?: true
Size: 1.04 KB
Versions: 5
Compression:
Stored size: 1.04 KB
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 'errornot_notifier' require 'rails/init' fail "Please supply an API Key as the first argument" if ARGV.empty? host = ARGV[1] raise ArgumentError.new('You need define your Errornot URL like params') unless host secure = (ARGV[2] == "secure") exception = begin raise "Testing errornot notifier with secure = #{secure}. If you can see this, it works." rescue => foo foo end ErrornotNotifier.configure do |config| config.secure = secure config.host = host config.api_key = ARGV.first end puts "Configuration:" ErrornotNotifier.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}" ErrornotNotifier.notify(exception)
Version data entries
5 entries across 5 versions & 1 rubygems