airbrake 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake/rack/user.rb +2 -1
- data/lib/airbrake/version.rb +1 -1
- data/spec/unit/rack/user_spec.rb +10 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ab3ca0f2da53158314a06cff1221b306b8f6d5c
|
4
|
+
data.tar.gz: 5708b6bddf8050ef43cd9152fca9220e5144024f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b242299e02ae341fc6bf2fe622137dcb8dacac181cc5a23c401b15a2eff3541822c03fe5aa19d5bdf0529463025f0da819f8367a5476009c2307a75003012c
|
7
|
+
data.tar.gz: dfd32fb172a73531fa96c63f150dedb2bc643b49b10820545a14d56d67648414586abe02ce386a01598faefa4f0fed4b78266c6b479b9e90f7fb925f567a5f43
|
data/lib/airbrake/rack/user.rb
CHANGED
@@ -11,7 +11,8 @@ module Airbrake
|
|
11
11
|
# @return [Airbrake::Rack::User, nil]
|
12
12
|
def self.extract(rack_env)
|
13
13
|
return unless (warden = rack_env['warden'])
|
14
|
-
|
14
|
+
return unless (warden_user = warden.user(run_callbacks: false))
|
15
|
+
new(warden_user)
|
15
16
|
end
|
16
17
|
|
17
18
|
##
|
data/lib/airbrake/version.rb
CHANGED
data/spec/unit/rack/user_spec.rb
CHANGED
@@ -36,6 +36,16 @@ RSpec.describe Airbrake::Rack::User do
|
|
36
36
|
retval = described_class.extract(env_for('/', 'warden' => warden))
|
37
37
|
expect(retval).to be_a(described_class)
|
38
38
|
end
|
39
|
+
|
40
|
+
context "and the warden user is nil" do
|
41
|
+
it "returns nil" do
|
42
|
+
warden = instance_double('Warden::Proxy')
|
43
|
+
allow(warden).to receive(:user) { nil }
|
44
|
+
|
45
|
+
retval = described_class.extract(env_for('/', 'warden' => warden))
|
46
|
+
expect(retval).to be_nil
|
47
|
+
end
|
48
|
+
end
|
39
49
|
end
|
40
50
|
|
41
51
|
context "when the Warden authentication framework is absent" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airbrake-ruby
|
@@ -251,3 +251,4 @@ test_files:
|
|
251
251
|
- spec/unit/rack/notice_builder_spec.rb
|
252
252
|
- spec/unit/sidekiq/error_handler_spec.rb
|
253
253
|
- spec/unit/rake/tasks_spec.rb
|
254
|
+
has_rdoc:
|