raygun4ruby 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -2
- data/lib/raygun/affected_user.rb +8 -8
- data/lib/raygun/version.rb +1 -1
- data/test/unit/affected_user_test.rb +6 -6
- data/test/unit/client_test.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff2e858a57edda6f5d225855e17ab54988203d8c
|
4
|
+
data.tar.gz: 30844792347a2415d14596d9c6a81fff79ea0b81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4874e0568ff22d99fa5caf329b7edd5d222c5e1bfec57c89210055633e5fbe07024915e147c1e24501603f1d1b4d29e0698632f4909ddd6e6fb677e06710c85d
|
7
|
+
data.tar.gz: f0006b1a6634515963ad336505f65741f13c4a078bd30849d5b101464395b5a1f55d653084e9441e85d2ef4deb0902d1331c26dc74bc4292e7134cbb7d30a3a4
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
## 2.
|
1
|
+
## 2.3.0 (09/05/2017)
|
2
|
+
|
3
|
+
Bugfixes
|
4
|
+
- Fix issue preventing affected users for a crash report from showing up in the affected users page ([#119](https://github.com/MindscapeHQ/raygun4ruby/pull/119))
|
5
|
+
|
6
|
+
## 2.2.0 (05/05/2017)
|
2
7
|
|
3
8
|
Features
|
4
9
|
- Opt in support for sending exceptions in a background thread to not block web request thread during IO ([#117](https://github.com/MindscapeHQ/raygun4ruby/pull/117))
|
@@ -6,7 +11,7 @@ Features
|
|
6
11
|
Bugfixes
|
7
12
|
- Don't attempt to read raw data during GET requests or if rack.input buffer is empty
|
8
13
|
|
9
|
-
## 2.1.0
|
14
|
+
## 2.1.0 (27/04/2017)
|
10
15
|
|
11
16
|
Features
|
12
17
|
- Ability to record breadcrumbs in your code that will be sent to Raygun along with a raised exception ([#113](https://github.com/MindscapeHQ/raygun4ruby/pull/113))
|
data/lib/raygun/affected_user.rb
CHANGED
@@ -10,11 +10,11 @@ module Raygun
|
|
10
10
|
}.freeze
|
11
11
|
SUPPORTED_ATTRIBUTES = DEFAULT_MAPPING.keys.freeze
|
12
12
|
NAME_TO_RAYGUN_NAME_MAPPING = {
|
13
|
-
identifier: :
|
14
|
-
email: :
|
15
|
-
full_name: :
|
16
|
-
first_name: :
|
17
|
-
uuid: :
|
13
|
+
identifier: :identifier,
|
14
|
+
email: :email,
|
15
|
+
full_name: :fullName,
|
16
|
+
first_name: :firstName,
|
17
|
+
uuid: :uuid
|
18
18
|
}.freeze
|
19
19
|
|
20
20
|
class << self
|
@@ -29,13 +29,13 @@ module Raygun
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def handle_anonymous_user(user_object)
|
32
|
-
result = {
|
33
|
-
result[:
|
32
|
+
result = { isAnonymous: true }
|
33
|
+
result[:identifier] = user_object unless user_object.nil?
|
34
34
|
result
|
35
35
|
end
|
36
36
|
|
37
37
|
def handle_known_user(user_object)
|
38
|
-
SUPPORTED_ATTRIBUTES.reduce({
|
38
|
+
SUPPORTED_ATTRIBUTES.reduce({ isAnonymous: false }) do |result, attribute|
|
39
39
|
mapping = Raygun.configuration.affected_user_mapping
|
40
40
|
method = mapping[attribute]
|
41
41
|
|
data/lib/raygun/version.rb
CHANGED
@@ -61,7 +61,7 @@ class AffectedUserTest < Raygun::UnitTest
|
|
61
61
|
begin
|
62
62
|
@middleware.call("action_controller.instance" => @controller)
|
63
63
|
rescue TestException
|
64
|
-
user_hash = { :
|
64
|
+
user_hash = { :identifier => 123, :email => "testemail@something.com", :isAnonymous => false }
|
65
65
|
assert_equal user_hash, @app.env["raygun.affected_user"]
|
66
66
|
end
|
67
67
|
end
|
@@ -77,7 +77,7 @@ class AffectedUserTest < Raygun::UnitTest
|
|
77
77
|
begin
|
78
78
|
@middleware.call("action_controller.instance" => @controller)
|
79
79
|
rescue TestException
|
80
|
-
user_hash = { :
|
80
|
+
user_hash = { :identifier => "topsecret", :isAnonymous => false }
|
81
81
|
assert_equal user_hash, @app.env["raygun.affected_user"]
|
82
82
|
end
|
83
83
|
end
|
@@ -89,7 +89,7 @@ class AffectedUserTest < Raygun::UnitTest
|
|
89
89
|
begin
|
90
90
|
@middleware.call("action_controller.instance" => @controller)
|
91
91
|
rescue TestException
|
92
|
-
user_hash = { :
|
92
|
+
user_hash = { :identifier => "some-string-identifier", :isAnonymous => true }
|
93
93
|
assert_equal user_hash, @app.env["raygun.affected_user"]
|
94
94
|
end
|
95
95
|
end
|
@@ -101,7 +101,7 @@ class AffectedUserTest < Raygun::UnitTest
|
|
101
101
|
begin
|
102
102
|
@middleware.call("action_controller.instance" => @controller)
|
103
103
|
rescue TestException
|
104
|
-
user_hash = { :
|
104
|
+
user_hash = { :isAnonymous => true }
|
105
105
|
assert_equal user_hash, @app.env["raygun.affected_user"]
|
106
106
|
end
|
107
107
|
end
|
@@ -113,7 +113,7 @@ class AffectedUserTest < Raygun::UnitTest
|
|
113
113
|
begin
|
114
114
|
@middleware.call("action_controller.instance" => @controller)
|
115
115
|
rescue TestException
|
116
|
-
user_hash = {:
|
116
|
+
user_hash = {:isAnonymous=>false, :identifier=>123, :email=>"testemail@something.com"}
|
117
117
|
assert_equal user_hash, @app.env["raygun.affected_user"]
|
118
118
|
end
|
119
119
|
end
|
@@ -129,7 +129,7 @@ class AffectedUserTest < Raygun::UnitTest
|
|
129
129
|
begin
|
130
130
|
@middleware.call("action_controller.instance" => @controller)
|
131
131
|
rescue TestException
|
132
|
-
user_hash = {:
|
132
|
+
user_hash = {:isAnonymous=>false, :identifier=>123, :email=>"testemail@something.com", :fullName => "Taylor Lodge", :firstName => "Taylor"}
|
133
133
|
assert_equal user_hash, @app.env["raygun.affected_user"]
|
134
134
|
end
|
135
135
|
end
|
data/test/unit/client_test.rb
CHANGED
@@ -634,10 +634,10 @@ class ClientTest < Raygun::UnitTest
|
|
634
634
|
def test_build_payload_hash_adds_affected_user_details_when_supplied_with_user
|
635
635
|
user = OpenStruct.new(id: '123', email: 'test@email.com', first_name: 'Taylor')
|
636
636
|
expected_details = {
|
637
|
-
:
|
638
|
-
:
|
639
|
-
:
|
640
|
-
:
|
637
|
+
:isAnonymous => false,
|
638
|
+
:identifier => '123',
|
639
|
+
:email => 'test@email.com',
|
640
|
+
:firstName => 'Taylor',
|
641
641
|
}
|
642
642
|
|
643
643
|
user_details = @client.send(:build_payload_hash, test_exception, sample_env_hash, user)[:details][:user]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun4ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindscape
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-05-
|
12
|
+
date: 2017-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|