raygun4ruby 1.1.11 → 1.1.12
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/.travis.yml +2 -2
- data/README.md +14 -1
- data/lib/raygun/client.rb +12 -6
- data/lib/raygun/version.rb +1 -1
- data/raygun4ruby.gemspec +1 -1
- data/test/unit/client_test.rb +27 -0
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d4305c691bbd89f3d54ba89ba86700fe30cc9b6
|
4
|
+
data.tar.gz: cc9292411c93c1f5515daa8beafe5258a2ac6127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0db0e82e960a9e65ebbcf22aa95ef25582772db257e0a11058902703178d2636b2d5f7c3bb84e2cd1b41ba88a62b28139f74d5de5d147ab26b949470e89dc8d
|
7
|
+
data.tar.gz: 9b352669522765bad9a218bcdc41cd291fcd8ffe2220978d0f1373a2b4de025cd88e07d62019da44fc9b8b6eaba6bd37ac26b3730c30ba1e512de0692d3651f0
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -115,7 +115,20 @@ Raygun.setup do |config|
|
|
115
115
|
end
|
116
116
|
```
|
117
117
|
|
118
|
-
|
118
|
+
The following exceptions are ignored by default:
|
119
|
+
|
120
|
+
```
|
121
|
+
ActiveRecord::RecordNotFound
|
122
|
+
ActionController::RoutingError
|
123
|
+
ActionController::InvalidAuthenticityToken
|
124
|
+
ActionDispatch::ParamsParser::ParseError
|
125
|
+
CGI::Session::CookieStore::TamperedWithCookie
|
126
|
+
ActionController::UnknownAction
|
127
|
+
AbstractController::ActionNotFound
|
128
|
+
Mongoid::Errors::DocumentNotFound
|
129
|
+
```
|
130
|
+
|
131
|
+
[You can see this here](https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun/configuration.rb#L51) and unignore them if needed by doing the following:
|
119
132
|
|
120
133
|
```ruby
|
121
134
|
Raygun.setup do |config|
|
data/lib/raygun/client.rb
CHANGED
@@ -82,8 +82,8 @@ module Raygun
|
|
82
82
|
ENV["RACK_ENV"]
|
83
83
|
end
|
84
84
|
|
85
|
-
def
|
86
|
-
|
85
|
+
def rails_env
|
86
|
+
ENV["RAILS_ENV"]
|
87
87
|
end
|
88
88
|
|
89
89
|
def request_information(env)
|
@@ -135,11 +135,17 @@ module Raygun
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
+
def filter_custom_data(env)
|
139
|
+
params = env.delete(:custom_data) || {}
|
140
|
+
filter_params(params, env["action_dispatch.parameter_filter"])
|
141
|
+
end
|
142
|
+
|
138
143
|
# see http://raygun.io/raygun-providers/rest-json-api?v=1
|
139
144
|
def build_payload_hash(exception_instance, env = {})
|
140
|
-
custom_data = env
|
145
|
+
custom_data = filter_custom_data(env) || {}
|
141
146
|
tags = env.delete(:tags) || []
|
142
|
-
|
147
|
+
|
148
|
+
tags << rails_env || rack_env
|
143
149
|
|
144
150
|
grouping_key = env.delete(:grouping_key)
|
145
151
|
|
@@ -149,7 +155,7 @@ module Raygun
|
|
149
155
|
client: client_details,
|
150
156
|
error: error_details(exception_instance),
|
151
157
|
userCustomData: Raygun.configuration.custom_data.merge(custom_data),
|
152
|
-
tags: Raygun.configuration.tags.concat(tags).uniq,
|
158
|
+
tags: Raygun.configuration.tags.concat(tags).compact.uniq,
|
153
159
|
request: request_information(env)
|
154
160
|
}
|
155
161
|
|
@@ -187,7 +193,7 @@ module Raygun
|
|
187
193
|
when Hash
|
188
194
|
filter_params_with_array(v, filter_keys)
|
189
195
|
else
|
190
|
-
filter_keys.
|
196
|
+
filter_keys.any? { |fk| /#{fk}/i === k.to_s } ? "[FILTERED]" : v
|
191
197
|
end
|
192
198
|
result
|
193
199
|
end
|
data/lib/raygun/version.rb
CHANGED
data/raygun4ruby.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = []
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_runtime_dependency "httparty", "
|
22
|
+
spec.add_runtime_dependency "httparty", "> 0.13.7"
|
23
23
|
spec.add_runtime_dependency "json"
|
24
24
|
spec.add_runtime_dependency "rack"
|
25
25
|
|
data/test/unit/client_test.rb
CHANGED
@@ -290,6 +290,33 @@ class ClientTest < Raygun::UnitTest
|
|
290
290
|
Raygun.configuration.filter_parameters = nil
|
291
291
|
end
|
292
292
|
|
293
|
+
def test_filter_parameters_using_array
|
294
|
+
filter_params_as_from_rails = [:password]
|
295
|
+
Raygun.configuration.filter_parameters = filter_params_as_from_rails
|
296
|
+
|
297
|
+
parameters = {
|
298
|
+
"something_normal" => "hello",
|
299
|
+
"password" => "wouldntyouliketoknow",
|
300
|
+
"password_confirmation" => "wouldntyouliketoknow",
|
301
|
+
"PasswORD_weird_case" => "anythingatall"
|
302
|
+
}
|
303
|
+
|
304
|
+
expected_form_hash = {
|
305
|
+
"something_normal" => "hello",
|
306
|
+
"password" => "[FILTERED]",
|
307
|
+
"password_confirmation" => "[FILTERED]",
|
308
|
+
"PasswORD_weird_case" => "[FILTERED]"
|
309
|
+
}
|
310
|
+
|
311
|
+
post_body_env_hash = sample_env_hash.merge(
|
312
|
+
"rack.input" => StringIO.new(URI.encode_www_form(parameters))
|
313
|
+
)
|
314
|
+
|
315
|
+
assert_equal expected_form_hash, @client.send(:request_information, post_body_env_hash)[:form]
|
316
|
+
ensure
|
317
|
+
Raygun.configuration.filter_parameters = nil
|
318
|
+
end
|
319
|
+
|
293
320
|
def test_ip_address_from_action_dispatch
|
294
321
|
sample_env_hash = {
|
295
322
|
"HTTP_VERSION"=>"HTTP/1.1",
|
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: 1.1.
|
4
|
+
version: 1.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindscape
|
@@ -9,20 +9,20 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 0.13.7
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 0.13.7
|
28
28
|
- !ruby/object:Gem::Dependency
|
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
240
|
version: '0'
|
241
241
|
requirements: []
|
242
242
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.
|
243
|
+
rubygems_version: 2.2.2
|
244
244
|
signing_key:
|
245
245
|
specification_version: 4
|
246
246
|
summary: This gem provides support for Ruby and Ruby on Rails for the Raygun.io error
|
@@ -253,4 +253,3 @@ test_files:
|
|
253
253
|
- test/unit/rails_insert_affected_user_test.rb
|
254
254
|
- test/unit/resque_failure_test.rb
|
255
255
|
- test/unit/sidekiq_failure_test.rb
|
256
|
-
has_rdoc:
|