-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from MindscapeHQ/fix-affected-user-tracking
Use lowercase user identifier keys
- Loading branch information
Showing
5 changed files
with
26 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Raygun | ||
VERSION = "2.2.0" | ||
VERSION = "2.3.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ def test_inserting_user_object_with_email | |
begin | ||
@middleware.call("action_controller.instance" => @controller) | ||
rescue TestException | ||
user_hash = { :Identifier => 123, :Email => "[email protected]", :IsAnonymous => false } | ||
user_hash = { :identifier => 123, :email => "[email protected]", :isAnonymous => false } | ||
assert_equal user_hash, @app.env["raygun.affected_user"] | ||
end | ||
end | ||
|
@@ -77,7 +77,7 @@ def test_changing_method_mapping | |
begin | ||
@middleware.call("action_controller.instance" => @controller) | ||
rescue TestException | ||
user_hash = { :Identifier => "topsecret", :IsAnonymous => false } | ||
user_hash = { :identifier => "topsecret", :isAnonymous => false } | ||
assert_equal user_hash, @app.env["raygun.affected_user"] | ||
end | ||
end | ||
|
@@ -89,7 +89,7 @@ def test_inserting_user_as_plain_string | |
begin | ||
@middleware.call("action_controller.instance" => @controller) | ||
rescue TestException | ||
user_hash = { :Identifier => "some-string-identifier", :IsAnonymous => true } | ||
user_hash = { :identifier => "some-string-identifier", :isAnonymous => true } | ||
assert_equal user_hash, @app.env["raygun.affected_user"] | ||
end | ||
end | ||
|
@@ -101,7 +101,7 @@ def test_with_a_nil_user | |
begin | ||
@middleware.call("action_controller.instance" => @controller) | ||
rescue TestException | ||
user_hash = { :IsAnonymous => true } | ||
user_hash = { :isAnonymous => true } | ||
assert_equal user_hash, @app.env["raygun.affected_user"] | ||
end | ||
end | ||
|
@@ -113,7 +113,7 @@ def test_with_private_method | |
begin | ||
@middleware.call("action_controller.instance" => @controller) | ||
rescue TestException | ||
user_hash = {:IsAnonymous=>false, :Identifier=>123, :Email=>"[email protected]"} | ||
user_hash = {:isAnonymous=>false, :identifier=>123, :email=>"[email protected]"} | ||
assert_equal user_hash, @app.env["raygun.affected_user"] | ||
end | ||
end | ||
|
@@ -129,7 +129,7 @@ def test_with_proc_for_mapping | |
begin | ||
@middleware.call("action_controller.instance" => @controller) | ||
rescue TestException | ||
user_hash = {:IsAnonymous=>false, :Identifier=>123, :Email=>"[email protected]", :FullName => "Taylor Lodge", :FirstName => "Taylor"} | ||
user_hash = {:isAnonymous=>false, :identifier=>123, :email=>"[email protected]", :fullName => "Taylor Lodge", :firstName => "Taylor"} | ||
assert_equal user_hash, @app.env["raygun.affected_user"] | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -634,10 +634,10 @@ def test_filter_payload_with_whitelist_request_specific_keys | |
def test_build_payload_hash_adds_affected_user_details_when_supplied_with_user | ||
user = OpenStruct.new(id: '123', email: '[email protected]', first_name: 'Taylor') | ||
expected_details = { | ||
:IsAnonymous => false, | ||
:Identifier => '123', | ||
:Email => '[email protected]', | ||
:FirstName => 'Taylor', | ||
:isAnonymous => false, | ||
:identifier => '123', | ||
:email => '[email protected]', | ||
:firstName => 'Taylor', | ||
} | ||
|
||
user_details = @client.send(:build_payload_hash, test_exception, sample_env_hash, user)[:details][:user] | ||
|