honeybadger 2.1.5 → 2.1.6.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7b2d535331bbfc5d0dc71e32947651dae160086
4
- data.tar.gz: 64307ae927ce9a40c1e618d7ee7dbc2becec582f
3
+ metadata.gz: ccc3bab5e4c60bb208ba2d4ac42085a432e16ca7
4
+ data.tar.gz: a6bf3ed352018d1aeecbfdf1237cc2f67f3df8f1
5
5
  SHA512:
6
- metadata.gz: 4e56cece28fd6f41badc3ec3fb39e630020f3d23b7886748facde85500de56813a0e90de4cd06a379cba4a53d62cae3c9fe460895cf9645ae8abed8826d3d00c
7
- data.tar.gz: 58e9f5187c077c1c9b9a4c083627b98f4255f673d00cb087673916c356fa7fc0174c60643570081275e54b5d7ede6d1376ddbf01cd5d1a5ea3c00285dfe24c84
6
+ metadata.gz: 108bdcdf83b509a84a5f3474f567633188e9e5f59c731dbcbab99b07e78b195d0a369a7d04aa727d5df1bc35a6084c716f0c35ff0710e5116db868e7bffc3555
7
+ data.tar.gz: e3a2eda55dda11ca79a02edc73326e20f7f0e71aa4e7f6875744ae718f64787dc176fa3234d7b132de2eb1661575590a379a8f7509a71c16aa4487ba5551bd1a
@@ -4,6 +4,13 @@ CHANGELOG](http://keepachangelog.com/) for how to update this file. This project
4
4
  adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased][unreleased]
7
+
8
+ ## [2.1.6][unreleased]
9
+ ## Fixed
10
+ - Always refresh capistrano revision during deploy notification.
11
+ - Support capistrano-chruby. -Kyle Rippey
12
+
13
+ ## [2.1.5] - 2015-09-23
7
14
  ## Fixed
8
15
  - Apply parameter filters to local variables.
9
16
 
data/README.md CHANGED
@@ -11,17 +11,13 @@ When an uncaught exception occurs, Honeybadger will POST the relevant data to th
11
11
 
12
12
  ## Supported Ruby versions
13
13
 
14
- Honeybadger officially supports the following Ruby versions and implementations:
14
+ | Ruby Interpreter | Supported Version |
15
+ | ---- | ---- |
16
+ | MRI | >= 1.9.3 |
17
+ | JRuby | >= 1.7 (1.9 mode) |
18
+ | Rubinius | >= 2.0 |
15
19
 
16
- | Ruby | Version |
17
- | ------------- | ------------------|
18
- | MRI | >= 1.9.3 |
19
- | JRuby | >= 1.7 (1.9 mode) |
20
- | Rubinius | >= 2.0 |
21
-
22
- ## Supported frameworks
23
-
24
- The following frameworks are supported:
20
+ ## Supported web frameworks
25
21
 
26
22
  | Framework | Version | Native? |
27
23
  | ------------- | ------------- |------------|
@@ -31,12 +27,446 @@ The following frameworks are supported:
31
27
 
32
28
  Rails and Sinatra are supported natively (install/configure the gem and you're done). For vanilla Rack apps, we provide a collection of middleware that must be installed manually.
33
29
 
30
+ To use Rails 2.x, you'll need to use an earlier version of the Honeybadger gem. [Go to version 1.x of the gem docs](https://github.com/honeybadger-io/honeybadger-ruby/blob/1.16-stable/docs/index.md).
31
+
34
32
  Integrating with other libraries/frameworks is simple! [See the documentation](http://rubydoc.info/gems/honeybadger/) to learn about our public API, and see [Contributing](#contributing) to suggest a patch.
35
33
 
36
- ## Documentation
34
+ ## Supported job queues
35
+
36
+ | Framework | Version | Native? |
37
+ | ------------- | ------------- |------------|
38
+ | Sidekiq | any | yes |
39
+ | Resque | any | yes |
40
+ | Delayed Job | any | yes |
41
+
42
+ You can integrate honeybadger into any Ruby script by using manual exception notification, which is detailed below.
43
+
44
+ ## Getting Started
45
+
46
+ Honeybadger works out of the box with all popular Ruby frameworks. Installation is just a matter of including the gem and setting your API key. In this section, we'll cover the basics. More advanced installations are covered later.
47
+
48
+ ### 1. Install the gem
49
+
50
+
51
+ The first step is to add the honeybadger gem to your Gemfile:
52
+
53
+ ```ruby
54
+ gem 'honeybadger'
55
+ ```
56
+
57
+ Tell bundler to install:
58
+
59
+ ```bash
60
+ $ bundle install
61
+ ```
62
+
63
+ ### 2. Set your API key
64
+
65
+ Next, you'll set the API key for this project.
66
+
67
+ ```bash
68
+ $ bundle exec honeybadger install [YOUR API KEY HERE]
69
+ ```
70
+
71
+ This will generate a `config/honeybadger.yml` file. If you don't like config files, you can place your API key in the `$HONEYBADGER_API_KEY` environment variable.
72
+
73
+ #### Heroku installation
74
+
75
+ If your app is deployed to heroku, you can configure Honeybadger on your dynos like so:
76
+
77
+ ```bash
78
+ $ bundle exec honeybadger heroku install [YOUR API KEY HERE]
79
+ ```
80
+
81
+ This will automatically add a `HONEYBADGER_API_KEY` environment variable to your
82
+ remote Heroku config and configure deploy notifications.
83
+
84
+ This step isn't necessary if you're using our [Heroku add-on](https://elements.heroku.com/addons/honeybadger).
85
+
86
+ ### 3. Set up your code
87
+
88
+ #### Rails
89
+
90
+ You're done! Any rake tasks and job queues that load the Rails environment are also covered.
91
+
92
+ #### Sinatra
93
+
94
+ All you need to do is to include the honeybadger gem:
95
+
96
+ ```ruby
97
+ # Always require Sinatra first.
98
+ require 'sinatra'
99
+ # Then require honeybadger.
100
+ require 'honeybadger'
101
+ # Define your application code *after* Sinatra *and* honeybadger:
102
+ get '/' do
103
+ raise "Sinatra has left the building"
104
+ end
105
+ ```
106
+
107
+ #### Rack
108
+
109
+ With rack, you have to do things manually, but it's still just a few lines of code:
110
+
111
+ ```ruby
112
+ require 'rack'
113
+
114
+ # Load the gem
115
+ require 'honeybadger'
116
+
117
+ # Write your app
118
+ app = Rack::Builder.app do
119
+ run lambda { |env| raise "Rack down" }
120
+ end
121
+
122
+ # Configure and start Honeybadger
123
+ honeybadger_config = Honeybadger::Config.new(env: ENV['RACK_ENV'])
124
+ Honeybadger.start(honeybadger_config)
125
+
126
+ # And use Honeybadger's rack middleware
127
+ use Honeybadger::Rack::ErrorNotifier, honeybadger_config
128
+ use Honeybadger::Rack::MetricsReporter, honeybadger_config
129
+
130
+ run app
131
+ ```
132
+
133
+
134
+
135
+
136
+ ## Advanced Configuration
137
+
138
+ There are a few ways to configure the Honeybadger gem. You can use a YAML config file. You can use environment variables. Or you can use a combination of the two.
139
+
140
+
141
+ ### YAML Configuration File
142
+
143
+ By default, Honeybadger looks for a `honeybadger.yml` configuration file in the root of your project, and then `config/honeybadger.yml` (in that order).
144
+
145
+ Here's what the simplest config file looks like:
146
+
147
+ ```yaml
148
+ ---
149
+ api_key: "my_api_key"
150
+ ```
151
+
152
+ #### Nested Options
153
+
154
+ Some configuration options are written in YAML as nested hashes. For example, here's what the `logging.path` and `request.filter_keys` options look like in YAML:
155
+
156
+ ```yaml
157
+ ---
158
+ logging:
159
+ path: "/path/to/honeybadger.log"
160
+ request:
161
+ filter-keys:
162
+ - "credit_card"
163
+ ```
164
+
165
+ #### Environments
166
+
167
+ Environment-specific options can be set by name-spacing the options beneath the environment name. For example:
168
+
169
+ ```yaml
170
+ ---
171
+ api_key: "my_api_key"
172
+ production:
173
+ logging:
174
+ path: "/path/to/honeybadger.log"
175
+ level: "WARN"
176
+ ```
177
+
178
+ #### ERB and Regex
179
+
180
+ The configuration file is rendered using ERB. That means you can set configuration options programmatically. You can also include regular expressions. Here's what that looks like:
181
+
182
+ ```yaml
183
+ ---
184
+ api_key: "<%= MyApplication.config.api_key %>"
185
+ request:
186
+ filter_keys:
187
+ - !ruby/regexp '/credit_card/i'
188
+ ```
189
+
190
+ ### Configuring with Environment Variables (12-factor style)
191
+
192
+ All configuration options can also be read from environment variables (ENV). To do this, uppercase the option name, replace all non-alphanumeric characters with underscores, and prefix with `HONEYBADGER_`. For example, `logging.path` becomes `HONEYBADGER_LOGGING_PATH`:
193
+
194
+ ```
195
+ export HONEYBADGER_LOGGING_PATH=/path/to/honeybadger.log
196
+ ```
197
+
198
+ ENV options override other options read from framework or `honeybadger.yml` sources, so both can be used together.
199
+
200
+ ## Configuration Options
201
+
202
+ You can use any of the options below in your config file, or in the environment.
203
+
204
+
205
+
206
+ |Option | Type | Description |
207
+ |-------------------------------- | ------- | ----------- |
208
+ |`api_key` | String | The API key for your Honeybadger project.<br/>_Default: `nil`_|
209
+ |`env` | String | The environment the app is running in. In Rails this defaults to `Rails.env`.<br/>_Default: `nil`_|
210
+ |`report_data` | Boolean | Enable/disable reporting of data. Defaults to false for "test", "development", and "cucumber" environments. <br>_Default: `true`_|
211
+ |`root` | String | The project's absolute root path.<br/>_Default: `Dir.pwd`_|
212
+ |`hostname` | String | The hostname of the current box.<br/>_Default: `Socket.gethostname`_|
213
+ |`backend` | String | An alternate backend to use for reporting data.<br/>_Default: `nil`_|
214
+ |`debug` | Boolean | Forces metrics and traces to be reported every 10 seconds rather than 60, and enables verbose debug logging.<br/>_Default: `false`_|
215
+ |`disabled` | Boolean | Prevents Honeybadger from starting entirely.<br/>_Default: `false`_|
216
+ | `config_path` | String | The path of the honeybadger config file. Can only be set via the `$HONEYBADGER_CONFIG_PATH` environment variable |
217
+ |`development_environments` | Array | Environments which will not report data by default (use report_data to enable/disable explicitly).<br/>_Default: `["development", "test", "cucumber"]`_|
218
+ |`plugins` | Array | An optional list of plugins to load. Default is to load all plugins.<br/>_Default: `[]`_|
219
+ |`plugins.skip` | Array | An optional list of plugins to skip.<br/>_Default: `[]`_|
220
+ |&nbsp; | ||
221
+ |__LOGGING__ | ||
222
+ |`logging.path` | String | The path (absolute, or relative from config.root) to the log file. Defaults to the rails logger or STDOUT. To log to standard out, use 'STDOUT'.<br/>_Default: `nil`_|
223
+ |`logging.level` | String | The log level. Does nothing unless `logging.path` is also set.<br/>_Default: `INFO`_|
224
+ |&nbsp; | ||
225
+ |__HTTP CONNECTION__ | ||
226
+ |`connection.secure` | Boolean | Use SSL when sending data.<br/>_Default: `true`_|
227
+ |`connection.host` | String | The host to use when sending data.<br/>_Default: `api.honeybadger.io`_|
228
+ |`connection.port` | Integer | The port to use when sending data.<br/>_Default: `443`_|
229
+ |`connection.http_open_timeout` | Integer | The HTTP open timeout when connecting to the server.<br/>_Default: `2`_|
230
+ |`connection.http_read_timeout` | Integer | The HTTP read timeout when connecting to the server.<br/>_Default: `5`_|
231
+ |`connection.proxy_host` | String | The proxy host to use when sending data.<br/>_Default: `nil`_|
232
+ |`connection.proxy_port` | Integer | The proxy port to use when sending data.<br/>_Default: `nil`_|
233
+ |`connection.proxy_user` | String | The proxy user to use when sending data.<br/>_Default: `nil`_|
234
+ |`connection.proxy_pass` | String | The proxy password to use when sending data.<br/>_Default: `nil`_|
235
+ |&nbsp; | ||
236
+ |__REQUEST DATA FILTERING__ | ||
237
+ |`request.filter_keys` | Array |  A list of keys to filter when sending request data. In Rails, this also includes existing params filters.<br/>*Default: `['password', 'password_confirmation']`*|
238
+ |`request.disable_session` | Boolean | Prevent session from being sent with request data.<br/>_Default: `false`_|
239
+ |`request.disable_params` | Boolean | Prevent params from being sent with request data.<br/>_Default: `false`_|
240
+ |`request.disable_environment` | Boolean | Prevent Rack environment from being sent with request data.<br/>_Default: `false`_|
241
+ |`request.disable_url` | Boolean | Prevent url from being sent with request data (Rack environment may still contain it in some cases).<br/>_Default: `false`_|
242
+ |&nbsp; | ||
243
+ |__USER INFORMER__ | ||
244
+ |`user_informer.enabled` | Boolean | Enable the UserInformer middleware. The user informer displays information about a Honeybadger error to your end-users when you display a 500 error page. This typically includes the error id which can be used to reference the error inside your Honeybadger account.  [Learn More](http://docs.honeybadger.io/article/48-show-users-a-unique-id-when-they-encounter-an-error)<br/>_Default: `true`_|
245
+ |`user_informer.info` | String | Replacement string for HTML comment in templates.<br/>*Default: `'Honeybadger Error {{error_id}}'`*|
246
+ |&nbsp; | ||
247
+ |__USER FEEDBACK__ | ||
248
+ |`feedback.enabled` | Boolean | Enable the UserFeedback middleware. Feedback displays a comment form to your-end user when they encounter an error. When the user creates a comment, it is added to the error in Honeybadger, and a notification is sent.  [Learn More](http://docs.honeybadger.io/article/166-how-to-implement-a-custom-feedback-form)<br/>_Default: `true`_|
249
+ |&nbsp; | ||
250
+ |__EXCEPTION REPORTING__ | ||
251
+ |`exceptions.enabled` | Boolean | Enable automatic reporting of exceptions.<br/>_Default: `true`_|
252
+ |`exceptions.ignore` | Array | A list of exception class names to ignore (appends to defaults).<br/>_Default: `['ActiveRecord::RecordNotFound', 'ActionController::RoutingError', 'ActionController::InvalidAuthenticityToken', 'CGI::Session::CookieStore::TamperedWithCookie', 'ActionController::UnknownAction', 'AbstractController::ActionNotFound', 'Mongoid::Errors::DocumentNotFound Sinatra::NotFound']`_|
253
+ |`exceptions.ignore_only` | Array | A list of exception class names to ignore (overrides defaults).<br/>_Default: `[]`_|
254
+ |`exceptions.` `ignored_user_agents` | Array | A list of user agents to ignore.<br/>_Default: `[]`_|
255
+ |`exceptions.rescue_rake` | Boolean | Enable rescuing exceptions in rake tasks.<br/>_Default: `true`_|
256
+ |`exceptions.source_radius` | Integer | The number of lines before and after the source when reporting snippets.<br/>_Default: `2`_|
257
+ |`exceptions.local_variables` | Boolean | Enable sending local variables. Requires the [binding_of_caller gem](https://rubygems.org/gems/binding_of_caller).<br/>_Default: `false`_|
258
+ |&nbsp; | ||
259
+ |__METRIC REPORTING__ | ||
260
+ |`metrics.enabled` | Boolean | Enable sending metrics, such as requests per minute.<br/>_Default: `true`_|
261
+ |`metrics.gc_profiler` | Boolean | Enable sending GC metrics (GC::Profiler must be enabled)<br/>_Default: `false`_|
262
+ |&nbsp; | ||
263
+ |__TRACE REPORTING__ | ||
264
+ |`traces.enabled` | Boolean | Enable sending performance traces for slow actions.<br/>_Default: `true`_|
265
+ |`traces.threshold` | Integer | The threshold in seconds to send traces.<br/>_Default: `2000`_|
266
+
267
+
268
+ ## Public Methods
269
+
270
+ > What follows is a summary of the gem's most commonly-used public methods. For a more authoritative list, read the [full API documentation](http://www.rubydoc.info/gems/honeybadger/Honeybadger).
271
+
272
+
273
+ ### `Honeybadger.context()`: Set metadata to be sent if an exception occurs
274
+
275
+ Sometimes, default exception data just isn't enough. If you have extra data that will help you in debugging, send it as part of an error's context. [View full method documentation](http://www.rubydoc.info/gems/honeybadger/Honeybadger%3Acontext)
276
+
277
+ #### Use this method if:
278
+
279
+ * You want to record the current user's id at the time of an exception
280
+ * You need to send raw POST data for use in debugging
281
+ * You have any other metadata you'd like to send with an exception
282
+
283
+
284
+ #### Examples:
285
+
286
+ ```ruby
287
+ Honeybadger.context({my_data: 'my value'})
288
+
289
+ # Inside a Rails controller:
290
+ before_action do
291
+ Honeybadger.context({user_id: current_user.id})
292
+ end
293
+
294
+ # Clearing global context:
295
+ Honeybadger.context.clear!
296
+ ```
297
+ ---
298
+
299
+
300
+ ### `Honeybadger.notify()`: Send an exception to Honeybadger.
301
+
302
+ You normally won't have to use this method. Honeybadger detects and reports errors automatically in Rails and other popular frameworks. But there may be times when you need to manually control exception reporting. [View full method documentation](http://www.rubydoc.info/gems/honeybadger/Honeybadger%3Anotify)
303
+
304
+ #### Use this method if:
305
+
306
+ * You've rescued an exception, but still want to report it
307
+ * You need to report an exception outside of a supported framework.
308
+ * You want complete control over what exception data is sent to us.
309
+
310
+
311
+ #### Examples:
312
+
313
+ ```ruby
314
+ # Sending an exception that you've already rescued
315
+ begin
316
+ fail 'oops'
317
+ rescue => exception
318
+ Honeybadger.notify(exception)
319
+ end
320
+ ```
321
+
322
+ ---
323
+
324
+ ### `Honeybadger.exception_filter()`: Programmatically ignore exceptions
325
+
326
+ This method lets you add a callback that will be run every time an exception is about to be reported to Honeybadger. If your callback returns a falsey value, the exception won't be reported. [View full method documentation](http://www.rubydoc.info/gems/honeybadger/Honeybadger%3Aexception_filter)
327
+
328
+ #### Use this method if:
329
+
330
+ * You need to ignore exceptions that meet complex criteria
331
+ * The built-in configuration options for filtering based on exception class and user agent aren't enough
332
+
333
+ #### Examples:
334
+
335
+ ```ruby
336
+ # Here's how you might ignore exceptions based on their error message:
337
+ Honeybadger.exception_filter do |notice|
338
+ notice[:error_message] =~ /sensitive data/
339
+ end
340
+ ```
341
+
342
+ You can access any attribute on the `notice` argument by using the `[]` syntax. For a full list of attributes, see the [documentation for `Notice`](http://www.rubydoc.info/gems/honeybadger/Honeybadger/Notice#%5B%5D-instance_method) Here are a few examples to get you started:
343
+
344
+ ```ruby
345
+ Honeybadger.exception_filter do |notice|
346
+ notice[:exception].class < MyError &&
347
+ notice[:params][:name] =~ "bob" &&
348
+ notice[:context][:current_user_id] != 1
349
+ end
350
+ ```
351
+ __WARNING:__ While it is possible to use this callback to modify the data that is reported to Honeybadger, this is not officially supported and may not be allowed in future versions of the gem.
352
+
353
+
354
+ ## Deployment Tracking
355
+
356
+ Honeybadger has an API to keep track of project deployments. Whenever you deploy, all errors for that environment will be resolved automatically. You can choose to enable or disable the auto-resolve feature from your Honeybadger project settings page.
357
+
358
+ ### Capistrano Deployment Tracking
359
+
360
+ In order to track deployments using Capistrano, simply require Honeybadger's Capistrano task in your `Capfile`&nbsp;file:
361
+
362
+ ```
363
+ require "capistrano/honeybadger"
364
+ ```
365
+
366
+ If you ran the `honeybadger install` command in a project that was previously configured with Capistrano, we already added this for you.
367
+
368
+ Adding options to your&nbsp; _config/deploy.rb_&nbsp;file allows you to&nbsp;customize how the deploy task is executed. The syntax for setting them looks like this:
369
+
370
+ ```
371
+ set :honeybadger_env, "preprod"
372
+ ```
373
+
374
+ You can use any of the following options when configuring capistrano.
375
+
376
+ | Option | |
377
+ |-------------------------- | ---- |
378
+ |`honeybadger_user` | Honeybadger will report the name of the local user who is deploying (using `whoami` or equivalent). Use this option to to report a different user.|
379
+ |`honeybadger_env` | Honeybadger reports the environment supplied by capistrano by default. Use this option to change the reported environment.|
380
+ |`honeybadger_api_key` | Honeybadger uses your configured API key by default. Use this option to override.|
381
+ |`honeybadger_async_notify` | Run deploy notification task asynchronously using `nohup`. True or False. Defaults to false.|
382
+ |`honeybadger_server` | The api endpoint that receives the deployment notification.|
383
+ |`honeybadger` | The name of the honeybadger executable. Default: "honeybadger"|
384
+
385
+
386
+ ### Heroku Deployment Tracking
387
+
388
+ Deploy tracking via Heroku is implemented using Heroku's free [deploy hooks](https://devcenter.heroku.com/articles/deploy-hooks) addon. To install the addon and configure it for Honeybadger, run the following CLI command from your project root:
389
+
390
+ ```
391
+ $ bundle exec honeybadger heroku install_deploy_notification
392
+ ```
393
+
394
+ If the honeybadger CLI command fails for whatever reason, you can&nbsp;add the deploy hook manually by running:
395
+
396
+ ```
397
+ $ heroku addons:add deployhooks:http --url="https://api.honeybadger.io/v1/deploys?deploy[environment]=production&deploy[local_username]={{user}}&deploy[revision]={{head}}&api_key=asdf" --app app-name
398
+ ```
399
+
400
+ You should replace the api key and app-name with your own values. You may also want to change the environment (set to production by default).
401
+
402
+
403
+ ### Deployment Tracking Via command line
404
+
405
+ We provide a CLI command to send deployment notifications manually:
406
+
407
+ ```
408
+ bundle exec honeybadger deploy --environment=production
409
+ ```
410
+
411
+ Run&nbsp; `bundle exec honeybadger help deploy` for all available options.
412
+
413
+
414
+
415
+ ## Custom Error Pages
416
+
417
+ The Honeybadger gem has a few special tags that it looks for whenever you render an error page. These can be used to display extra information about the error, or to ask the user for information about how they triggered the error.
418
+
419
+ ### Displaying Error ID
420
+
421
+ When an error is sent to Honeybadger, our API returns a unique UUID for the occurrence within your project. This UUID can be automatically displayed for reference on Rails error pages (e.g. `public/500.html`) or any rack output by including the `Honeybadger::UserInformer` middleware.
422
+
423
+ To include the error id, simply place this magic HTML comment on your error page:
424
+
425
+ ```html
426
+ <!-- HONEYBADGER ERROR -->
427
+ ```
428
+
429
+ By default, we will replace this tag with:
430
+
431
+ ```
432
+ Honeybadger Error {{error_id}}
433
+ ```
434
+
435
+ Where `{{error_id}}` is the UUID. You can customize this output by overriding the `user_informer.info` option in your honeybadger.yml file (you can also enabled/disable the middleware):
436
+
437
+ ```yaml
438
+ user_informer:
439
+ enabled: true
440
+ info: "Error ID: {{error_id}}"
441
+ ```
442
+
443
+ You can use that UUID to load the error at the site by going to&nbsp; [https://www.honeybadger.io/notice/UUID](https://www.honeybadger.io/notice/UUID).
444
+
445
+ ### Collecting User Feedback
446
+
447
+ When an error is sent to Honeybadger, an HTML form can be generated so users can fill out relevant information that led up to that error. Feedback responses are displayed inline in the comments section on the fault detail page.
448
+
449
+ To include a user feedback form on your error page, simply add this magic HTML comment:
450
+
451
+ ```html
452
+ <!-- HONEYBADGER FEEDBACK -->
453
+ ```
454
+ You can change the text displayed in the form via the Rails internationalization system. Here's an example:
37
455
 
38
- * [Basic usage](http://rubydoc.info/gems/honeybadger/)
39
- * [Full documentation](http://docs.honeybadger.io/article/50-honeybadger-gem-documentation)
456
+ ```yaml
457
+ # config/locales/en.yml
458
+ en:
459
+ honeybadger:
460
+ feedback:
461
+ heading: "Care to help us fix this?"
462
+ explanation: "Any information you can provide will help us fix the problem."
463
+ submit: "Send"
464
+ thanks: "Thanks for the feedback!"
465
+ labels:
466
+ name: "Your name"
467
+ email: "Your email address"
468
+ comment: "Comment (required)"
469
+ ```
40
470
 
41
471
  ## Changelog
42
472
 
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # Public: The current String Honeybadger version.
3
- VERSION = '2.1.5'.freeze
3
+ VERSION = '2.1.6.beta.1'.freeze
4
4
  end
@@ -12,11 +12,8 @@ namespace :honeybadger do
12
12
 
13
13
  executable = fetch(:honeybadger, :honeybadger)
14
14
 
15
- revision = fetch(:current_revision) do
16
- within(repo_path) do
17
- capture("cd #{repo_path} && git rev-parse --short HEAD")
18
- end
19
- end
15
+ invoke "#{scm}:set_current_revision"
16
+ revision = fetch(:current_revision)
20
17
 
21
18
  options = [
22
19
  'deploy',
@@ -76,6 +73,7 @@ end
76
73
  namespace :load do
77
74
  task :defaults do
78
75
  set :bundle_bins, fetch(:bundle_bins, []).push('honeybadger')
76
+ set :chruby_map_bins, fetch(:chruby_map_bins, []).push('honeybadger')
79
77
  set :rbenv_map_bins, fetch(:rbenv_map_bins, []).push('honeybadger')
80
78
  set :rvm_map_bins, fetch(:rvm_map_bins, []).push('honeybadger')
81
79
  end
@@ -13,6 +13,7 @@ module Honeybadger
13
13
  - Run remotely so we use remote API keys, environment, etc.
14
14
  DESC
15
15
  task :deploy, :except => { :no_release => true } do
16
+ revision = capture("#{try_sudo} cat #{current_path}/REVISION", :except => { :no_release => true }).chomp
16
17
  rails_env = fetch(:rails_env, 'production')
17
18
  honeybadger_env = fetch(:honeybadger_env, fetch(:rails_env, 'production'))
18
19
  local_user = fetch(:honeybadger_user, ENV['USER'] || ENV['USERNAME'])
@@ -22,7 +23,7 @@ module Honeybadger
22
23
  notify_options = "cd #{directory};"
23
24
  notify_options << " RAILS_ENV=#{rails_env}"
24
25
  notify_options << ' nohup' if async_notify
25
- notify_options << " #{executable} deploy --environment=#{honeybadger_env} --revision=#{current_revision} --repository=#{repository} --user=#{local_user}"
26
+ notify_options << " #{executable} deploy --environment=#{honeybadger_env} --revision=#{revision} --repository=#{repository} --user=#{local_user}"
26
27
  notify_options << ' --dry-run' if dry_run
27
28
  notify_options << " --api-key=#{ENV['API_KEY']}" if ENV['API_KEY']
28
29
  notify_options << ' >> /dev/null 2>&1 &' if async_notify
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-23 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Make managing application errors a more pleasant experience.
14
14
  email:
@@ -134,9 +134,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  version: 1.9.3
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ">="
137
+ - - ">"
138
138
  - !ruby/object:Gem::Version
139
- version: '0'
139
+ version: 1.3.1
140
140
  requirements: []
141
141
  rubyforge_project:
142
142
  rubygems_version: 2.4.5