Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile

sudo: false

Expand All @@ -39,3 +40,13 @@ matrix:
gemfile: gemfiles/rails32.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails32.gemfile
- rvm: 1.8.7
gemfile: gemfiles/rails5.gemfile
- rvm: ree
gemfile: gemfiles/rails5.gemfile
- rvm: 1.9.3
gemfile: gemfiles/rails5.gemfile
- rvm: 2.1.8
gemfile: gemfiles/rails5.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/rails5.gemfile
2 changes: 1 addition & 1 deletion gemfiles/rails42.gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "http://rubygems.org"

gem "rails", '4.2.0'
gem "rails", "~> 4.2.0"
gem "rspec"

gemspec :path => "../"
6 changes: 6 additions & 0 deletions gemfiles/rails5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "http://rubygems.org"

gem "rails", "5.0.0.beta2"
gem "rspec"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion lib/raven/integrations/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Raven
class Rails < ::Rails::Railtie
initializer "raven.use_rack_middleware" do |app|
app.config.middleware.insert 0, "Raven::Rack"
app.config.middleware.insert 0, Raven::Rack
end

initializer 'raven.action_controller' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ def self.included(base)
base.send(:alias_method_chain, :render_exception, :raven)
end

def render_exception_with_raven(env, exception)
def render_exception_with_raven(env_or_request, exception)
env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
Raven::Rack.capture_exception(exception, env)
ensure
render_exception_without_raven(env, exception)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't you be passing the original argument env_or_request instead of env?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

herrrrp thanks @senny

end
end
Expand Down