Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This plugin turns Redmine (http://redmine.org) into a Hoptoad server, i.e. an API provider which can be used with the hoptoad_notifier which is available at: http://www.hoptoadapp.com/.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 lang
Octocat-spinner-32 test
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
README.rdoc

Hoptoad Server

This is a simple Redmine plugin that makes Redmine act like a Hoptoad server. All exceptions caught and sent by HoptoadNotifier will create or update an issue in Redmine.

Installation & Configuration

Just install the Plugin following the general Redmine plugin installation instructions at www.redmine.org/wiki/redmine/Plugins.

Option 1: System wide API key

Go to Administration -> Settings -> Incoming emails in your Redmine and generate an API key.

Option 2: Per project API key

  1. Go to Administration -> Custom Field and create a new Project Custom Field (text). Name it something like Hoptoad API Key.

  2. Go to Administration -> Plugins -> Redmine Hoptoad Server and select the custom field you created above.

  3. Go to Your Project -> Settings and enter any string you want into the API custom field. This will be the API key you use in the Hoptoad client (below).

Configuring the Hoptoad client

Now, download and install the HoptoadNotifier following the excellent instructions on their github page github.com/thoughtbot/hoptoad_notifier.

When it comes to creating your config/initializers/hoptoad.rb file, deviate from the standard and put in something like this:

HoptoadNotifier.configure do |config|
  config.api_key = {:project => 'my_redmine_project_identifier', # the identifier you specified for your project in Redmine
                    :tracker => 'Bug',                           # the name of your Tracker of choice in Redmine
                    :api_key => 'my_redmine_api_key',            # the key you generated before in Redmine (NOT YOUR HOPTOAD API KEY!)
                    :category => 'Development',                  # the name of a ticket category (optional.)
                    :assigned_to => 'admin',                     # the login of a user the ticket should get assigned to by default (optional.)
                    :priority => 5                               # the default priority (use a number, not a name. optional.)
                   }.to_yaml
  config.host = 'my_redmine_host.com'                            # the hostname your Redmine runs at
  config.port = 443                                              # the port your Redmine runs at
  config.secure = true                                           # sends data to your server via SSL (optional.)
end

You're done. You can start receiving your Exceptions in Redmine!

More Configuration (please read on!)

After you received your first exception in Redmine, you will notice two new custom fields in the project(s) you've received the exceptions for. Those are Backtrace filter and Repository root.

Backtrace filter

If you'd like to (and we really recommend you do!) filter the backtraces that Notifier reports, you can add comma separated strings to that field. Every line in a backtrace will be scanned against those strings and matching lines will be removed. I usually set my filter to “[GEM_ROOT]”, but if you're using plugins which tend to clutter up your backtraces, you might want to include those as well. Like this for example: “[GEM_ROOT],[RAILS_ROOT]/vendor/plugins/newrelic_rpm”.

Repository root

All Issues created will have a source link in their description which – provided that you have your source repository linked to your Redmine project – leads you directly to the file and line in your code that has caused the exception. Your repository structure most likely won't match the structure of your deployed code, so you can add an additional repository root. Just use “trunk” for a general SVN setup for instance.

License

MIT

Author

Jan Schulz-Hofen, ROCKET RENTALS (rocket-rentals.de)

Something went wrong with that request. Please try again.