Commit 7863b42627eaf78ec8731c3dee7ec5110ca28562

Authored by Nathan B
2 parents d21fff05 e8dd3444
Exists in master and in 1 other branch production

Merge pull request #144 from deanperry/master

Renamed hoptoad to airbrake & fixed the problem which I caused in the previous pull request
Gemfile
... ... @@ -20,6 +20,8 @@ gem 'hoptoad_notifier', "~> 2.4"
20 20 gem 'actionmailer_inline_css', "~> 1.3.0"
21 21 gem 'kaminari'
22 22  
  23 +gem 'rack-ssl-enforcer', :group => :production
  24 +
23 25 platform :ruby do
24 26 gem 'mongo', '= 1.3.1'
25 27 gem 'bson', '= 1.3.1'
... ...
Gemfile.lock
... ... @@ -131,6 +131,7 @@ GEM
131 131 rack (1.2.4)
132 132 rack-mount (0.6.14)
133 133 rack (>= 1.0.0)
  134 + rack-ssl-enforcer (0.2.4)
134 135 rack-test (0.5.7)
135 136 rack (>= 1.0)
136 137 rails (3.0.10)
... ... @@ -230,6 +231,7 @@ DEPENDENCIES
230 231 octokit
231 232 oruen_redmine_client
232 233 pivotal-tracker
  234 + rack-ssl-enforcer
233 235 rails (= 3.0.10)
234 236 ri_cal
235 237 rspec (~> 2.6)
... ...
README.md
... ... @@ -205,7 +205,7 @@ If your Errbit instance has logged an error, we would appreciate a bug report on
205 205 You can post this manually at [https://github.com/errbit/errbit/issues](https://github.com/errbit/errbit/issues),
206 206 or you can set up the Github Issues tracker for your **Self.Errbit** app:
207 207  
208   - 1. Go to the **Self.Errbit** app's edit page. If that app does not exist yet, go to the apps page and click **Add a new App** to create it. (You can also create it by running `rake hoptoad:test`.)
  208 + 1. Go to the **Self.Errbit** app's edit page. If that app does not exist yet, go to the apps page and click **Add a new App** to create it. (You can also create it by running `rake airbrake:test`.)
209 209  
210 210 2. In the **Issue Tracker** section, click **Github Issues**.
211 211  
... ...
app/views/apps/_configuration_instructions.html.haml
1 1 %pre
2   - %code
3   - :preserve
  2 + %code
  3 + :preserve
  4 + # Require the hoptoad_notifier gem in your App.
  5 + # ---------------------------------------------
  6 + #
  7 + # Rails 3 - In your Gemfile
  8 + # gem 'airbrake'
  9 + #
  10 + # Rails 2 - In environment.rb
  11 + # config.gem 'airbrake'
  12 + #
  13 + # Then add the following to config/initializers/errbit.rb
  14 + # -------------------------------------------------------
4 15  
5   - # Require the hoptoad_notifier gem in your App.
6   - # ---------------------------------------------
7   - #
8   - # Rails 3 - In your Gemfile
9   - # gem 'hoptoad_notifier'
10   - #
11   - # Rails 2 - In environment.rb
12   - # config.gem 'hoptoad_notifier'
13   - #
14   - # Then add the following to config/initializers/errbit.rb
15   - # -------------------------------------------------------
  16 + Airbrake.configure do |config|
  17 + config.api_key = '#{app.api_key}'
  18 + config.host = '#{request.host}'
  19 + config.port = #{request.port}
  20 + config.secure = config.port == 443
  21 + end
16 22  
17   - HoptoadNotifier.configure do |config|
18   - config.api_key = '#{app.api_key}'
19   - config.host = '#{request.host}'
20   - config.port = #{request.port}
21   - config.secure = config.port == 443
22   - end
23   -
24   - # Set up Javascript notifications
25   - # -------------------------------
26   - #
27   - # To receive notifications for javascript errors,
28   - # you should add <%= hoptoad_javascript_notifier %> to the top of your layouts.
29   - #
30   - # Testing
31   - # -------
32   - #
33   - # Rails 2 - you'll need to vendor hoptoad_notifier to get the rake tasks
34   - # rake gems:unpack GEM=hoptoad_notifier
35   - #
36   - # Run:
37   - # rake hoptoad:test
38   - # refresh this page
  23 + # Set up Javascript notifications
  24 + # -------------------------------
  25 + #
  26 + # To receive notifications for javascript errors,
  27 + # you should add <%= airbrake_javascript_notifier %> to the top of your layouts.
  28 + #
  29 + # Testing
  30 + # -------
  31 + #
  32 + # Rails 2 - you'll need to vendor airbrake to get the rake tasks
  33 + # rake gems:unpack GEM=airbrake
  34 + #
  35 + # Run:
  36 + # rake airbrake:test
  37 + # refresh this page
39 38  
... ...
config/application.rb
... ... @@ -15,6 +15,9 @@ Bundler.require(:default, Rails.env) if defined?(Bundler)
15 15  
16 16 module Errbit
17 17 class Application < Rails::Application
  18 +
  19 + config.middleware.use Rack::SslEnforcer, :except => /^\/deploys/
  20 +
18 21 # Settings in config/environments/* take precedence over those specified here.
19 22 # Application configuration should go into files in config/initializers
20 23 # -- all .rb files in that directory are automatically loaded.
... ...