appsignal 2.11.0.beta.4-java → 2.11.0.beta.5-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.semaphore/semaphore.yml +57 -1
  3. data/CHANGELOG.md +12 -0
  4. data/README.md +4 -4
  5. data/Rakefile +16 -4
  6. data/appsignal.gemspec +1 -1
  7. data/build_matrix.yml +2 -2
  8. data/ext/Rakefile +2 -0
  9. data/ext/agent.yml +19 -19
  10. data/ext/base.rb +7 -0
  11. data/ext/extconf.rb +2 -0
  12. data/lib/appsignal.rb +1 -0
  13. data/lib/appsignal/auth_check.rb +4 -2
  14. data/lib/appsignal/cli/diagnose.rb +1 -1
  15. data/lib/appsignal/config.rb +35 -2
  16. data/lib/appsignal/extension.rb +6 -5
  17. data/lib/appsignal/extension/jruby.rb +6 -5
  18. data/lib/appsignal/hooks.rb +23 -0
  19. data/lib/appsignal/hooks/active_job.rb +32 -9
  20. data/lib/appsignal/hooks/puma.rb +0 -1
  21. data/lib/appsignal/hooks/sidekiq.rb +0 -1
  22. data/lib/appsignal/probes.rb +7 -0
  23. data/lib/appsignal/probes/puma.rb +1 -1
  24. data/lib/appsignal/probes/sidekiq.rb +3 -1
  25. data/lib/appsignal/utils/deprecation_message.rb +1 -1
  26. data/lib/appsignal/version.rb +1 -1
  27. data/spec/lib/appsignal/auth_check_spec.rb +23 -0
  28. data/spec/lib/appsignal/capistrano2_spec.rb +1 -1
  29. data/spec/lib/appsignal/capistrano3_spec.rb +1 -1
  30. data/spec/lib/appsignal/cli/diagnose_spec.rb +42 -0
  31. data/spec/lib/appsignal/config_spec.rb +21 -0
  32. data/spec/lib/appsignal/extension/jruby_spec.rb +31 -28
  33. data/spec/lib/appsignal/extension_install_failure_spec.rb +23 -0
  34. data/spec/lib/appsignal/hooks/activejob_spec.rb +44 -1
  35. data/spec/lib/appsignal/hooks_spec.rb +57 -0
  36. data/spec/lib/appsignal/marker_spec.rb +1 -1
  37. data/spec/spec_helper.rb +5 -0
  38. data/spec/support/helpers/config_helpers.rb +3 -2
  39. data/spec/support/helpers/transaction_helpers.rb +1 -1
  40. data/spec/support/testing.rb +19 -19
  41. metadata +6 -3
@@ -5,12 +5,13 @@ module ConfigHelpers
5
5
  )
6
6
  end
7
7
 
8
- def project_fixture_config(env = "production", initial_config = {}, logger = Appsignal.logger)
8
+ def project_fixture_config(env = "production", initial_config = {}, logger = Appsignal.logger, config_file = nil)
9
9
  Appsignal::Config.new(
10
10
  project_fixture_path,
11
11
  env,
12
12
  initial_config,
13
- logger
13
+ logger,
14
+ config_file
14
15
  )
15
16
  end
16
17
 
@@ -46,7 +46,7 @@ module TransactionHelpers
46
46
 
47
47
  # Set current transaction manually.
48
48
  # Cleared by {clear_current_transaction!}
49
- def set_current_transaction(transaction) # rubocop:disable Style/AccessorMethodName
49
+ def set_current_transaction(transaction) # rubocop:disable Naming/AccessorMethodName
50
50
  Thread.current[:appsignal_transaction] = transaction
51
51
  end
52
52
 
@@ -38,25 +38,9 @@ module Appsignal
38
38
  end
39
39
  end
40
40
 
41
- class Transaction
42
- class << self
43
- alias original_new new
44
-
45
- # Override the {Appsignal::Transaction.new} method so we can track which
46
- # transactions are created on the {Appsignal::Testing.transactions} list.
47
- #
48
- # @see TransactionHelpers#last_transaction
49
- def new(*args)
50
- transaction = original_new(*args)
51
- Appsignal::Testing.transactions << transaction
52
- transaction
53
- end
54
- end
55
- end
56
-
57
41
  class Extension
58
42
  class Transaction
59
- alias original_finish finish
43
+ alias original_finish finish if method_defined? :finish
60
44
 
61
45
  # Override default {Extension::Transaction#finish} behavior to always
62
46
  # return true, which tells the transaction to add its sample data (unless
@@ -72,7 +56,7 @@ module Appsignal
72
56
  return_value
73
57
  end
74
58
 
75
- alias original_complete complete
59
+ alias original_complete complete if method_defined? :complete
76
60
 
77
61
  # Override default {Extension::Transaction#complete} behavior to
78
62
  # store the transaction JSON before the transaction is completed
@@ -94,7 +78,7 @@ module Appsignal
94
78
  @completed || false
95
79
  end
96
80
 
97
- alias original_to_json to_json
81
+ alias original_to_json to_json if method_defined? :to_json
98
82
 
99
83
  # Override default {Extension::Transaction#to_json} behavior to
100
84
  # return the stored the transaction JSON when the transaction was
@@ -111,3 +95,19 @@ module Appsignal
111
95
  end
112
96
  end
113
97
  end
98
+
99
+ module AppsignalTest
100
+ module Transaction
101
+ # Override the {Appsignal::Transaction.new} method so we can track which
102
+ # transactions are created on the {Appsignal::Testing.transactions} list.
103
+ #
104
+ # @see TransactionHelpers#last_transaction
105
+ def new(*_args)
106
+ transaction = super
107
+ Appsignal::Testing.transactions << transaction
108
+ transaction
109
+ end
110
+ end
111
+ end
112
+
113
+ Appsignal::Transaction.extend(AppsignalTest::Transaction)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0.beta.4
4
+ version: 2.11.0.beta.5
5
5
  platform: java
6
6
  authors:
7
7
  - Robert Beekman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-07-13 00:00:00.000000000 Z
13
+ date: 2020-07-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -258,6 +258,7 @@ files:
258
258
  - lib/appsignal/logger.rb
259
259
  - lib/appsignal/marker.rb
260
260
  - lib/appsignal/minutely.rb
261
+ - lib/appsignal/probes.rb
261
262
  - lib/appsignal/probes/puma.rb
262
263
  - lib/appsignal/probes/sidekiq.rb
263
264
  - lib/appsignal/rack/generic_instrumentation.rb
@@ -304,6 +305,7 @@ files:
304
305
  - spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb
305
306
  - spec/lib/appsignal/event_formatter_spec.rb
306
307
  - spec/lib/appsignal/extension/jruby_spec.rb
308
+ - spec/lib/appsignal/extension_install_failure_spec.rb
307
309
  - spec/lib/appsignal/extension_spec.rb
308
310
  - spec/lib/appsignal/garbage_collection_profiler_spec.rb
309
311
  - spec/lib/appsignal/hooks/action_cable_spec.rb
@@ -402,7 +404,7 @@ licenses:
402
404
  - MIT
403
405
  metadata:
404
406
  bug_tracker_uri: https://github.com/appsignal/appsignal-ruby/issues
405
- changelog_uri: https://github.com/appsignal/appsignal-ruby/blob/master/CHANGELOG.md
407
+ changelog_uri: https://github.com/appsignal/appsignal-ruby/blob/main/CHANGELOG.md
406
408
  documentation_uri: https://docs.appsignal.com/ruby/
407
409
  homepage_uri: https://docs.appsignal.com/ruby/
408
410
  source_code_uri: https://github.com/appsignal/appsignal-ruby
@@ -451,6 +453,7 @@ test_files:
451
453
  - spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb
452
454
  - spec/lib/appsignal/event_formatter_spec.rb
453
455
  - spec/lib/appsignal/extension/jruby_spec.rb
456
+ - spec/lib/appsignal/extension_install_failure_spec.rb
454
457
  - spec/lib/appsignal/extension_spec.rb
455
458
  - spec/lib/appsignal/garbage_collection_profiler_spec.rb
456
459
  - spec/lib/appsignal/hooks/action_cable_spec.rb