Sha256: f1c252a0947b5712073dd2bf81c5319c99febfbd27db16c177d104488a151ecf
Contents?: true
Size: 641 Bytes
Versions: 94
Compression:
Stored size: 641 Bytes
Contents
require 'rails/generators' class BugsnagGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) argument :api_key, required: true, :desc => "required" gem "bugsnag" desc "Configures the bugsnag notifier with your API key" def create_initializer_file unless /^[a-f0-9]{32}$/ =~ api_key raise Thor::Error, "Invalid bugsnag notifier api key #{api_key.inspect}\nYou can find the api key on the Settings tab of https://bugsnag.com/" end initializer "bugsnag.rb" do <<-EOF Bugsnag.configure do |config| config.api_key = #{api_key.inspect} end EOF end end end
Version data entries
94 entries across 94 versions & 2 rubygems