raygun4ruby 2.7.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/raygun/client.rb +0 -2
- data/lib/raygun/version.rb +1 -1
- data/test/unit/client_test.rb +38 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61736f6afdee2839d8085205074cc3e36a0d1ab2
|
4
|
+
data.tar.gz: 91f356594710741eec38c69f2e1122eb7bfdf3e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c5a29513ec9b6603e798381c89005802a87ac470bcfdb6e77f2287523d880f4db7dc0fe6122254e8f8722aa5e54fb5f418b72702fa1b4a2cb5defc69626556b
|
7
|
+
data.tar.gz: b44748b701d56a4359644c679abe517ef9540049c9a8acd960babbe2614d68d27457ec2563298d625ed4485f6f2d6705ffc512bba0e6e4f36b3ed193b2cf0919
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 3.0.0 (18/12/2018):
|
2
|
+
Breaking changes:
|
3
|
+
Parameter filters are now applied if you are using the `filter_payload_with_whitelist` functionality. Previously if this was set to true the parameter filtering was bailed out of ([#136](https://github.com/MindscapeHQ/raygun4ruby/pull/136/files))
|
4
|
+
|
1
5
|
## 2.7.1 (11/06/2018)
|
2
6
|
This is a patch release to update the required ruby version to correctly be 2.0 or greater
|
3
7
|
|
data/README.md
CHANGED
@@ -70,14 +70,14 @@ end
|
|
70
70
|
|
71
71
|
begin
|
72
72
|
# your lovely code here
|
73
|
-
rescue
|
73
|
+
rescue => e
|
74
74
|
Raygun.track_exception(e)
|
75
75
|
end
|
76
76
|
|
77
77
|
# You may also pass a user object as the third argument to allow affected user tracking, like so
|
78
78
|
begin
|
79
79
|
# your lovely code here
|
80
|
-
rescue
|
80
|
+
rescue => e
|
81
81
|
# The second argument is the request environment variables
|
82
82
|
Raygun.track_exception(e, {}, user)
|
83
83
|
end
|
data/lib/raygun/client.rb
CHANGED
@@ -253,8 +253,6 @@ module Raygun
|
|
253
253
|
end
|
254
254
|
|
255
255
|
def filter_params_with_blacklist(params_hash = {}, extra_filter_keys = nil)
|
256
|
-
return params_hash if Raygun.configuration.filter_payload_with_whitelist
|
257
|
-
|
258
256
|
filter_parameters = Raygun.configuration.filter_parameters
|
259
257
|
|
260
258
|
if filter_parameters.is_a? Proc
|
data/lib/raygun/version.rb
CHANGED
data/test/unit/client_test.rb
CHANGED
@@ -656,6 +656,44 @@ class ClientTest < Raygun::UnitTest
|
|
656
656
|
assert_equal expected_hash, details[:request]
|
657
657
|
end
|
658
658
|
|
659
|
+
|
660
|
+
def test_filter_payload_with_whitelist_and_filter_parameters_applies_both
|
661
|
+
Raygun.configuration.filter_parameters = [:password]
|
662
|
+
Raygun.configuration.filter_payload_with_whitelist = true
|
663
|
+
Raygun.configuration.whitelist_payload_shape = proc do |payload|
|
664
|
+
payload[:request][:headers]["Cookie"] = "[FILTERED]"
|
665
|
+
payload
|
666
|
+
end
|
667
|
+
|
668
|
+
parameters = {
|
669
|
+
"something_normal" => "hello",
|
670
|
+
"password" => "wouldntyouliketoknow"
|
671
|
+
}
|
672
|
+
|
673
|
+
post_body_env_hash = sample_env_hash.merge(
|
674
|
+
"REQUEST_METHOD" => "POST",
|
675
|
+
"rack.input" => StringIO.new(URI.encode_www_form(parameters))
|
676
|
+
)
|
677
|
+
|
678
|
+
payload = @client.send(:build_payload_hash, test_exception, post_body_env_hash)
|
679
|
+
request_payload = payload[:details][:request]
|
680
|
+
|
681
|
+
expected_form = {
|
682
|
+
"something_normal" => "hello",
|
683
|
+
"password" => "[FILTERED]"
|
684
|
+
}
|
685
|
+
|
686
|
+
assert_equal expected_form, request_payload[:form]
|
687
|
+
|
688
|
+
expected_headers = {
|
689
|
+
"Version" => "HTTP/1.1",
|
690
|
+
"Host" => "localhost:3000",
|
691
|
+
"Cookie" => "[FILTERED]"
|
692
|
+
}
|
693
|
+
|
694
|
+
assert_equal expected_headers, request_payload[:headers]
|
695
|
+
end
|
696
|
+
|
659
697
|
def test_build_payload_hash_adds_affected_user_details_when_supplied_with_user
|
660
698
|
user = OpenStruct.new(id: '123', email: 'test@email.com', first_name: 'Taylor')
|
661
699
|
expected_details = {
|
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:
|
4
|
+
version: 3.0.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: 2018-
|
12
|
+
date: 2018-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
284
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.
|
285
|
+
rubygems_version: 2.6.8
|
286
286
|
signing_key:
|
287
287
|
specification_version: 4
|
288
288
|
summary: This gem provides support for Ruby and Ruby on Rails for the Raygun.io error
|