raygun4ruby 3.0.0 → 3.2.3.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rspec +1 -0
- data/.travis.yml +11 -5
- data/CHANGELOG.md +26 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +3 -3
- data/Rakefile +9 -2
- data/examples/sinatras_raygun.rb +0 -0
- data/lib/generators/raygun/install_generator.rb +0 -0
- data/lib/raygun.rb +4 -5
- data/lib/raygun/affected_user.rb +0 -0
- data/lib/raygun/breadcrumbs.rb +0 -0
- data/lib/raygun/breadcrumbs/breadcrumb.rb +4 -0
- data/lib/raygun/breadcrumbs/store.rb +10 -0
- data/lib/raygun/client.rb +4 -1
- data/lib/raygun/configuration.rb +6 -0
- data/lib/raygun/error.rb +0 -0
- data/lib/raygun/javascript_tracker.rb +42 -0
- data/lib/raygun/middleware/breadcrumbs_store_initializer.rb +0 -0
- data/lib/raygun/middleware/javascript_exception_tracking.rb +32 -0
- data/lib/raygun/middleware/rack_exception_interceptor.rb +0 -0
- data/lib/raygun/middleware/rails_insert_affected_user.rb +0 -0
- data/lib/raygun/railtie.rb +2 -1
- data/lib/raygun/services/apply_whitelist_filter_to_payload.rb +0 -0
- data/lib/raygun/sidekiq.rb +3 -0
- data/lib/raygun/testable.rb +0 -0
- data/lib/raygun/version.rb +1 -1
- data/lib/raygun4ruby.rb +0 -0
- data/lib/resque/failure/raygun.rb +0 -0
- data/lib/tasks/raygun.tasks +0 -0
- data/raygun4ruby.gemspec +9 -2
- data/spec/dummy/.gitignore +17 -0
- data/spec/dummy/Gemfile +47 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +3 -0
- data/spec/dummy/app/views/home/index.json.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +9 -0
- data/spec/dummy/bin/rake +9 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/bin/spring +17 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +3 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/lib/tasks/.keep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/test/controllers/.keep +0 -0
- data/spec/dummy/test/fixtures/.keep +0 -0
- data/spec/dummy/test/helpers/.keep +0 -0
- data/spec/dummy/test/integration/.keep +0 -0
- data/spec/dummy/test/mailers/.keep +0 -0
- data/spec/dummy/test/models/.keep +0 -0
- data/spec/dummy/test/test_helper.rb +10 -0
- data/spec/dummy/vendor/assets/javascripts/.keep +0 -0
- data/spec/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/spec/features/javascript_spec.rb +48 -0
- data/spec/rails_helper.rb +4 -0
- data/{specs → spec}/raygun/breadcrumbs/breadcrumb_spec.rb +56 -19
- data/{specs → spec}/raygun/breadcrumbs/store_spec.rb +45 -23
- data/{specs → spec}/raygun/raygun_spec.rb +5 -8
- data/{specs → spec}/services/apply_whitelist_filter_to_payload_spec.rb +9 -9
- data/spec/spec_helper.rb +24 -0
- data/spec/support/fake_logger.rb +17 -0
- data/test/integration/client_test.rb +0 -0
- data/test/test_helper.rb +2 -1
- data/test/unit/affected_user_test.rb +0 -0
- data/test/unit/client_test.rb +3 -1
- data/test/unit/configuration_test.rb +12 -0
- data/test/unit/raygun_test.rb +0 -0
- data/test/unit/resque_failure_test.rb +0 -0
- data/test/unit/sidekiq_failure_test.rb +0 -0
- metadata +168 -17
- data/specs/spec_helper.rb +0 -29
File without changes
|
data/test/test_helper.rb
CHANGED
File without changes
|
data/test/unit/client_test.rb
CHANGED
@@ -198,6 +198,7 @@ class ClientTest < Raygun::UnitTest
|
|
198
198
|
Timecop.freeze do
|
199
199
|
Raygun.configuration.version = 123
|
200
200
|
grouping_key = "my custom group"
|
201
|
+
correlation_id = "my correlation id"
|
201
202
|
|
202
203
|
expected_hash = {
|
203
204
|
occurredOn: Time.now.utc.iso8601,
|
@@ -214,13 +215,14 @@ class ClientTest < Raygun::UnitTest
|
|
214
215
|
tags: ["test"],
|
215
216
|
request: {},
|
216
217
|
groupingKey: grouping_key,
|
218
|
+
correlationId: correlation_id,
|
217
219
|
environment: {
|
218
220
|
utcOffset: 13
|
219
221
|
}
|
220
222
|
}
|
221
223
|
}
|
222
224
|
|
223
|
-
assert_equal expected_hash, @client.send(:build_payload_hash, test_exception, { grouping_key: grouping_key })
|
225
|
+
assert_equal expected_hash, @client.send(:build_payload_hash, test_exception, { grouping_key: grouping_key, correlation_id: correlation_id })
|
224
226
|
end
|
225
227
|
end
|
226
228
|
|
@@ -25,6 +25,18 @@ class ConfigurationTest < Raygun::UnitTest
|
|
25
25
|
assert_equal 9.9, Raygun.configuration[:version]
|
26
26
|
end
|
27
27
|
|
28
|
+
def test_set_js_api_key
|
29
|
+
Raygun.configuration.js_api_key = "a test js api key"
|
30
|
+
|
31
|
+
assert_equal "a test js api key", Raygun.configuration.js_api_key
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_set_js_api_version
|
35
|
+
Raygun.configuration.js_api_version = "a test js api version"
|
36
|
+
|
37
|
+
assert_equal "a test js api version", Raygun.configuration.js_api_version
|
38
|
+
end
|
39
|
+
|
28
40
|
def test_enable_reporting
|
29
41
|
Raygun.configuration.enable_reporting = false
|
30
42
|
|
data/test/unit/raygun_test.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
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: 3.
|
4
|
+
version: 3.2.3.pre
|
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:
|
12
|
+
date: 2020-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -85,16 +85,16 @@ dependencies:
|
|
85
85
|
name: rake
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - "
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 12.3.3
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: 12.3.3
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: timecop
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,14 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '5.11'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '5.11'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: redis-namespace
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,6 +213,90 @@ dependencies:
|
|
213
213
|
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
|
+
- !ruby/object:Gem::Dependency
|
217
|
+
name: rails
|
218
|
+
requirement: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - '='
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 4.2.11
|
223
|
+
type: :development
|
224
|
+
prerelease: false
|
225
|
+
version_requirements: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - '='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 4.2.11
|
230
|
+
- !ruby/object:Gem::Dependency
|
231
|
+
name: sqlite3
|
232
|
+
requirement: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 1.3.6
|
237
|
+
type: :development
|
238
|
+
prerelease: false
|
239
|
+
version_requirements: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - "~>"
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: 1.3.6
|
244
|
+
- !ruby/object:Gem::Dependency
|
245
|
+
name: capybara
|
246
|
+
requirement: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
type: :development
|
252
|
+
prerelease: false
|
253
|
+
version_requirements: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
258
|
+
- !ruby/object:Gem::Dependency
|
259
|
+
name: rspec-rails
|
260
|
+
requirement: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - "~>"
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '3.9'
|
265
|
+
type: :development
|
266
|
+
prerelease: false
|
267
|
+
version_requirements: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '3.9'
|
272
|
+
- !ruby/object:Gem::Dependency
|
273
|
+
name: launchy
|
274
|
+
requirement: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
279
|
+
type: :development
|
280
|
+
prerelease: false
|
281
|
+
version_requirements: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
- !ruby/object:Gem::Dependency
|
287
|
+
name: simplecov
|
288
|
+
requirement: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
type: :development
|
294
|
+
prerelease: false
|
295
|
+
version_requirements: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: '0'
|
216
300
|
description: Ruby Adapter for Raygun.io
|
217
301
|
email:
|
218
302
|
- hello@raygun.io
|
@@ -221,6 +305,7 @@ extensions: []
|
|
221
305
|
extra_rdoc_files: []
|
222
306
|
files:
|
223
307
|
- ".gitignore"
|
308
|
+
- ".rspec"
|
224
309
|
- ".travis.yml"
|
225
310
|
- CHANGELOG.md
|
226
311
|
- Gemfile
|
@@ -237,7 +322,9 @@ files:
|
|
237
322
|
- lib/raygun/client.rb
|
238
323
|
- lib/raygun/configuration.rb
|
239
324
|
- lib/raygun/error.rb
|
325
|
+
- lib/raygun/javascript_tracker.rb
|
240
326
|
- lib/raygun/middleware/breadcrumbs_store_initializer.rb
|
327
|
+
- lib/raygun/middleware/javascript_exception_tracking.rb
|
241
328
|
- lib/raygun/middleware/rack_exception_interceptor.rb
|
242
329
|
- lib/raygun/middleware/rails_insert_affected_user.rb
|
243
330
|
- lib/raygun/railtie.rb
|
@@ -249,11 +336,76 @@ files:
|
|
249
336
|
- lib/resque/failure/raygun.rb
|
250
337
|
- lib/tasks/raygun.tasks
|
251
338
|
- raygun4ruby.gemspec
|
252
|
-
-
|
253
|
-
-
|
254
|
-
-
|
255
|
-
-
|
256
|
-
-
|
339
|
+
- spec/dummy/.gitignore
|
340
|
+
- spec/dummy/Gemfile
|
341
|
+
- spec/dummy/README.rdoc
|
342
|
+
- spec/dummy/Rakefile
|
343
|
+
- spec/dummy/app/assets/config/manifest.js
|
344
|
+
- spec/dummy/app/assets/images/.keep
|
345
|
+
- spec/dummy/app/assets/javascripts/application.js
|
346
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
347
|
+
- spec/dummy/app/controllers/application_controller.rb
|
348
|
+
- spec/dummy/app/controllers/concerns/.keep
|
349
|
+
- spec/dummy/app/controllers/home_controller.rb
|
350
|
+
- spec/dummy/app/helpers/application_helper.rb
|
351
|
+
- spec/dummy/app/mailers/.keep
|
352
|
+
- spec/dummy/app/models/.keep
|
353
|
+
- spec/dummy/app/models/concerns/.keep
|
354
|
+
- spec/dummy/app/views/home/index.html.erb
|
355
|
+
- spec/dummy/app/views/home/index.json.erb
|
356
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
357
|
+
- spec/dummy/bin/bundle
|
358
|
+
- spec/dummy/bin/rails
|
359
|
+
- spec/dummy/bin/rake
|
360
|
+
- spec/dummy/bin/setup
|
361
|
+
- spec/dummy/bin/spring
|
362
|
+
- spec/dummy/config.ru
|
363
|
+
- spec/dummy/config/application.rb
|
364
|
+
- spec/dummy/config/boot.rb
|
365
|
+
- spec/dummy/config/database.yml
|
366
|
+
- spec/dummy/config/environment.rb
|
367
|
+
- spec/dummy/config/environments/development.rb
|
368
|
+
- spec/dummy/config/environments/production.rb
|
369
|
+
- spec/dummy/config/environments/test.rb
|
370
|
+
- spec/dummy/config/initializers/assets.rb
|
371
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
372
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
373
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
374
|
+
- spec/dummy/config/initializers/inflections.rb
|
375
|
+
- spec/dummy/config/initializers/mime_types.rb
|
376
|
+
- spec/dummy/config/initializers/session_store.rb
|
377
|
+
- spec/dummy/config/initializers/to_time_preserves_timezone.rb
|
378
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
379
|
+
- spec/dummy/config/locales/en.yml
|
380
|
+
- spec/dummy/config/routes.rb
|
381
|
+
- spec/dummy/config/secrets.yml
|
382
|
+
- spec/dummy/db/seeds.rb
|
383
|
+
- spec/dummy/db/test.sqlite3
|
384
|
+
- spec/dummy/lib/assets/.keep
|
385
|
+
- spec/dummy/lib/tasks/.keep
|
386
|
+
- spec/dummy/log/.keep
|
387
|
+
- spec/dummy/public/404.html
|
388
|
+
- spec/dummy/public/422.html
|
389
|
+
- spec/dummy/public/500.html
|
390
|
+
- spec/dummy/public/favicon.ico
|
391
|
+
- spec/dummy/public/robots.txt
|
392
|
+
- spec/dummy/test/controllers/.keep
|
393
|
+
- spec/dummy/test/fixtures/.keep
|
394
|
+
- spec/dummy/test/helpers/.keep
|
395
|
+
- spec/dummy/test/integration/.keep
|
396
|
+
- spec/dummy/test/mailers/.keep
|
397
|
+
- spec/dummy/test/models/.keep
|
398
|
+
- spec/dummy/test/test_helper.rb
|
399
|
+
- spec/dummy/vendor/assets/javascripts/.keep
|
400
|
+
- spec/dummy/vendor/assets/stylesheets/.keep
|
401
|
+
- spec/features/javascript_spec.rb
|
402
|
+
- spec/rails_helper.rb
|
403
|
+
- spec/raygun/breadcrumbs/breadcrumb_spec.rb
|
404
|
+
- spec/raygun/breadcrumbs/store_spec.rb
|
405
|
+
- spec/raygun/raygun_spec.rb
|
406
|
+
- spec/services/apply_whitelist_filter_to_payload_spec.rb
|
407
|
+
- spec/spec_helper.rb
|
408
|
+
- spec/support/fake_logger.rb
|
257
409
|
- test/integration/client_test.rb
|
258
410
|
- test/test_helper.rb
|
259
411
|
- test/unit/affected_user_test.rb
|
@@ -277,12 +429,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
277
429
|
version: '2.0'
|
278
430
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
279
431
|
requirements:
|
280
|
-
- - "
|
432
|
+
- - ">"
|
281
433
|
- !ruby/object:Gem::Version
|
282
|
-
version:
|
434
|
+
version: 1.3.1
|
283
435
|
requirements: []
|
284
|
-
|
285
|
-
rubygems_version: 2.6.8
|
436
|
+
rubygems_version: 3.0.3
|
286
437
|
signing_key:
|
287
438
|
specification_version: 4
|
288
439
|
summary: This gem provides support for Ruby and Ruby on Rails for the Raygun.io error
|
data/specs/spec_helper.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
ENV['RACK_ENV'] = 'test'
|
2
|
-
require_relative "../lib/raygun.rb"
|
3
|
-
require "minitest/autorun"
|
4
|
-
require "minitest/pride"
|
5
|
-
require "timecop"
|
6
|
-
require "mocha/mini_test"
|
7
|
-
require "webmock/minitest"
|
8
|
-
require 'stringio'
|
9
|
-
|
10
|
-
alias :context :describe
|
11
|
-
|
12
|
-
class FakeLogger
|
13
|
-
def initialize
|
14
|
-
@logger = StringIO.new
|
15
|
-
end
|
16
|
-
|
17
|
-
def info(message)
|
18
|
-
@logger.write(message)
|
19
|
-
end
|
20
|
-
|
21
|
-
def reset
|
22
|
-
@logger.string = ""
|
23
|
-
end
|
24
|
-
|
25
|
-
def get
|
26
|
-
@logger.string
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|