appsignal 2.1.0.beta.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +2 -1
  3. data/CHANGELOG.md +5 -0
  4. data/README.md +14 -15
  5. data/appsignal.gemspec +1 -1
  6. data/lib/appsignal.rb +1 -1
  7. data/lib/appsignal/auth_check.rb +5 -2
  8. data/lib/appsignal/cli/demo.rb +1 -1
  9. data/lib/appsignal/cli/diagnose.rb +1 -1
  10. data/lib/appsignal/cli/install.rb +1 -1
  11. data/lib/appsignal/transaction.rb +2 -1
  12. data/lib/appsignal/version.rb +1 -1
  13. data/spec/lib/appsignal/auth_check_spec.rb +9 -10
  14. data/spec/lib/appsignal/capistrano2_spec.rb +6 -6
  15. data/spec/lib/appsignal/capistrano3_spec.rb +6 -6
  16. data/spec/lib/appsignal/cli/demo_spec.rb +1 -1
  17. data/spec/lib/appsignal/cli/diagnose_spec.rb +1 -1
  18. data/spec/lib/appsignal/cli/helpers_spec.rb +2 -2
  19. data/spec/lib/appsignal/cli/install_spec.rb +2 -2
  20. data/spec/lib/appsignal/cli_spec.rb +2 -2
  21. data/spec/lib/appsignal/config_spec.rb +24 -24
  22. data/spec/lib/appsignal/demo_spec.rb +4 -2
  23. data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +11 -7
  24. data/spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb +2 -2
  25. data/spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb +2 -2
  26. data/spec/lib/appsignal/event_formatter/elastic_search/search_formatter_spec.rb +1 -1
  27. data/spec/lib/appsignal/event_formatter/faraday/request_formatter_spec.rb +2 -2
  28. data/spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb +9 -9
  29. data/spec/lib/appsignal/event_formatter_spec.rb +17 -17
  30. data/spec/lib/appsignal/extension_spec.rb +7 -7
  31. data/spec/lib/appsignal/garbage_collection_profiler_spec.rb +0 -3
  32. data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +11 -3
  33. data/spec/lib/appsignal/hooks/celluloid_spec.rb +12 -4
  34. data/spec/lib/appsignal/hooks/data_mapper_spec.rb +12 -4
  35. data/spec/lib/appsignal/hooks/delayed_job_spec.rb +21 -13
  36. data/spec/lib/appsignal/hooks/mongo_ruby_driver_spec.rb +14 -6
  37. data/spec/lib/appsignal/hooks/net_http_spec.rb +11 -3
  38. data/spec/lib/appsignal/hooks/passenger_spec.rb +14 -6
  39. data/spec/lib/appsignal/hooks/puma_spec.rb +18 -10
  40. data/spec/lib/appsignal/hooks/rake_spec.rb +2 -2
  41. data/spec/lib/appsignal/hooks/redis_spec.rb +40 -30
  42. data/spec/lib/appsignal/hooks/sequel_spec.rb +11 -3
  43. data/spec/lib/appsignal/hooks/shoryuken_spec.rb +15 -7
  44. data/spec/lib/appsignal/hooks/sidekiq_spec.rb +17 -9
  45. data/spec/lib/appsignal/hooks/unicorn_spec.rb +16 -8
  46. data/spec/lib/appsignal/hooks/webmachine_spec.rb +14 -4
  47. data/spec/lib/appsignal/hooks_spec.rb +28 -28
  48. data/spec/lib/appsignal/integrations/data_mapper_spec.rb +1 -1
  49. data/spec/lib/appsignal/integrations/grape_spec.rb +3 -3
  50. data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +14 -16
  51. data/spec/lib/appsignal/integrations/object_spec.rb +10 -10
  52. data/spec/lib/appsignal/integrations/padrino_spec.rb +14 -18
  53. data/spec/lib/appsignal/integrations/railtie_spec.rb +35 -19
  54. data/spec/lib/appsignal/integrations/resque_active_job_spec.rb +2 -2
  55. data/spec/lib/appsignal/integrations/resque_spec.rb +8 -8
  56. data/spec/lib/appsignal/integrations/sinatra_spec.rb +2 -2
  57. data/spec/lib/appsignal/integrations/webmachine_spec.rb +1 -1
  58. data/spec/lib/appsignal/js_exception_transaction_spec.rb +1 -1
  59. data/spec/lib/appsignal/minutely_spec.rb +3 -3
  60. data/spec/lib/appsignal/rack/generic_instrumentation_spec.rb +12 -12
  61. data/spec/lib/appsignal/rack/js_exception_catcher_spec.rb +2 -2
  62. data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +19 -15
  63. data/spec/lib/appsignal/rack/sinatra_instrumentation_spec.rb +21 -21
  64. data/spec/lib/appsignal/rack/streaming_listener_spec.rb +5 -5
  65. data/spec/lib/appsignal/system_spec.rb +5 -5
  66. data/spec/lib/appsignal/transaction_spec.rb +176 -155
  67. data/spec/lib/appsignal/transmitter_spec.rb +29 -23
  68. data/spec/lib/appsignal/utils/params_sanitizer_spec.rb +49 -35
  69. data/spec/lib/appsignal/utils_spec.rb +15 -8
  70. data/spec/lib/appsignal_spec.rb +134 -150
  71. data/spec/spec_helper.rb +5 -2
  72. metadata +6 -10
  73. data/spec/lib/tmp/config/appsignal.yml +0 -2
  74. data/spec/support/delegate_matcher.rb +0 -38
@@ -15,6 +15,9 @@ require "webmock/rspec"
15
15
  Dir[File.join(APPSIGNAL_SPEC_DIR, "support/helpers", "*.rb")].each do |f|
16
16
  require f
17
17
  end
18
+ Dir[File.join(APPSIGNAL_SPEC_DIR, "support/mocks", "*.rb")].each do |f|
19
+ require f
20
+ end
18
21
  if DependencyHelper.rails_present?
19
22
  Dir[File.join(DirectoryHelper.support_dir, "rails", "*.rb")].each do |f|
20
23
  require f
@@ -47,7 +50,7 @@ RSpec.configure do |config|
47
50
  config.include SystemHelpers
48
51
  config.extend DependencyHelper
49
52
 
50
- config.before :all do
53
+ config.before :context do
51
54
  # Use modified SYSTEM_TMP_DIR
52
55
  Appsignal::Config.send :remove_const, :SYSTEM_TMP_DIR
53
56
  Appsignal::Config.send :const_set, :SYSTEM_TMP_DIR,
@@ -72,7 +75,7 @@ RSpec.configure do |config|
72
75
  Thread.current[:appsignal_transaction] = nil
73
76
  end
74
77
 
75
- config.after :all do
78
+ config.after :context do
76
79
  FileUtils.rm_f(File.join(project_fixture_path, "log/appsignal.log"))
77
80
  Appsignal.config = nil
78
81
  Appsignal.logger = nil
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.1.0.beta.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-11 00:00:00.000000000 Z
12
+ date: 2017-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 2.14.1
62
+ version: '3.5'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 2.14.1
69
+ version: '3.5'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: pry
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -297,9 +297,7 @@ files:
297
297
  - spec/lib/appsignal/utils/query_params_sanitizer_spec.rb
298
298
  - spec/lib/appsignal/utils_spec.rb
299
299
  - spec/lib/appsignal_spec.rb
300
- - spec/lib/tmp/config/appsignal.yml
301
300
  - spec/spec_helper.rb
302
- - spec/support/delegate_matcher.rb
303
301
  - spec/support/fixtures/containers/cgroups/docker
304
302
  - spec/support/fixtures/containers/cgroups/docker_systemd
305
303
  - spec/support/fixtures/containers/cgroups/lxc
@@ -344,9 +342,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
344
342
  version: '1.9'
345
343
  required_rubygems_version: !ruby/object:Gem::Requirement
346
344
  requirements:
347
- - - ">"
345
+ - - ">="
348
346
  - !ruby/object:Gem::Version
349
- version: 1.3.1
347
+ version: '0'
350
348
  requirements: []
351
349
  rubyforge_project:
352
350
  rubygems_version: 2.5.2
@@ -419,9 +417,7 @@ test_files:
419
417
  - spec/lib/appsignal/utils/query_params_sanitizer_spec.rb
420
418
  - spec/lib/appsignal/utils_spec.rb
421
419
  - spec/lib/appsignal_spec.rb
422
- - spec/lib/tmp/config/appsignal.yml
423
420
  - spec/spec_helper.rb
424
- - spec/support/delegate_matcher.rb
425
421
  - spec/support/fixtures/containers/cgroups/docker
426
422
  - spec/support/fixtures/containers/cgroups/docker_systemd
427
423
  - spec/support/fixtures/containers/cgroups/lxc
@@ -1,2 +0,0 @@
1
- production:
2
- api_key: 111
@@ -1,38 +0,0 @@
1
- # RSpec matcher to spec delegations.
2
- #
3
- # Usage:
4
- #
5
- # describe Post do
6
- # it { should delegate(:name).to(:author).with_prefix } # post.author_name
7
- # it { should delegate(:month).to(:created_at) }
8
- # it { should delegate(:year).to(:created_at) }
9
- # end
10
- RSpec::Matchers.define :delegate do |method|
11
- match do |delegator|
12
- @method = @prefix ? :"#{@to}_#{method}" : method
13
- @delegator = delegator
14
- begin
15
- @delegator.send(@to)
16
- rescue NoMethodError
17
- raise "#{@delegator} does not respond to #{@to}!"
18
- end
19
- @delegator.stub(@to => double("receiver"))
20
- @delegator.send(@to).stub(method => :called)
21
- @delegator.send(@method) == :called
22
- end
23
-
24
- description do
25
- "delegate :#{@method} to its #{@to}#{@prefix ? " with prefix" : ""}"
26
- end
27
-
28
- failure_message_for_should do |_text|
29
- "expected #{@delegator} to delegate :#{@method} to its #{@to}#{@prefix ? " with prefix" : ""}"
30
- end
31
-
32
- failure_message_for_should_not do |_text|
33
- "expected #{@delegator} not to delegate :#{@method} to its #{@to}#{@prefix ? " with prefix" : ""}"
34
- end
35
-
36
- chain(:to) { |receiver| @to = receiver }
37
- chain(:with_prefix) { @prefix = true }
38
- end