appsignal 1.2.1.beta.1 → 1.2.1.beta.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 350007064e166fbb91f0ac4dd1a84d4ef0830c71
4
- data.tar.gz: cac950f88072c96359cad08e06c348b73ea36d77
3
+ metadata.gz: a3adbe0e670d7699320eaa00fb6fd5241b5633be
4
+ data.tar.gz: 133762d96801cb15b8c31afa794a98dd1085dd03
5
5
  SHA512:
6
- metadata.gz: 320de9094dddc0782864706cbf8886e30d5e1a5e44a5a828645f19c16b7a18d78becb98c93b582c2d3d8e8678dfef19451ad331fb05664ab7d995f4ebf7ee8e1
7
- data.tar.gz: e1354c1a4966f439a8220a0147d5d7545654fbaf8acd060ef1b40efc42255f6c80691653b82d92eb4cb7ff1626db1e657809e2f95a967175ada8021e15139d3a
6
+ metadata.gz: c0615b6e08b91f9717dc3f2eb3309c17e0caafdf10111e47e8f319a862f422ba84fa5e9554d4316e8ab80ce79a6b6d99b8bc7c9230ef960af8c0c94a38c4ca89
7
+ data.tar.gz: f6692ce6ad5da7d216d77fb71df603ec45afbf725f5322efe628ad10e6a099ea3f7dd85f00c9ec0a1123d0fee657c263f3e9dfcfd07690ab9779175b58a97b3b
@@ -2,6 +2,7 @@
2
2
  * Use Dir.pwd in CLI install wizard
3
3
  * Support bignums when setting queue length
4
4
  * Support for Sequel 4.35
5
+ * Add env option to skip errors in Sinatra
5
6
 
6
7
  # 1.2.0
7
8
  * Restart background thread when FD's are closed
@@ -39,7 +39,9 @@ module Appsignal
39
39
  ensure
40
40
  # If raise_error is off versions of Sinatra don't raise errors, but store
41
41
  # them in the sinatra.error env var.
42
- transaction.set_error(env['sinatra.error']) if !@raise_errors_on && env['sinatra.error']
42
+ if !@raise_errors_on && env['sinatra.error'] && !env['sinatra.skip_appsignal_error']
43
+ transaction.set_error(env['sinatra.error'])
44
+ end
43
45
  transaction.set_action(env['sinatra.route'])
44
46
  transaction.set_metadata('path', request.path)
45
47
  transaction.set_metadata('method', request.request_method)
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
2
 
3
3
  module Appsignal
4
- VERSION = '1.2.1.beta.1'
4
+ VERSION = '1.2.1.beta.2'
5
5
  end
@@ -88,6 +88,14 @@ if defined?(::Sinatra)
88
88
  Appsignal::Transaction.any_instance.should_not_receive(:set_error)
89
89
  end
90
90
  end
91
+
92
+ context "if sinatra.skip_appsignal_error is set" do
93
+ let(:env) { {'sinatra.error' => error, 'sinatra.skip_appsignal_error' => true} }
94
+
95
+ it "should not set the error" do
96
+ Appsignal::Transaction.any_instance.should_not_receive(:set_error)
97
+ end
98
+ end
91
99
  end
92
100
 
93
101
  it "should set the action" do
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: 1.2.1.beta.1
4
+ version: 1.2.1.beta.2
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: 2016-06-22 00:00:00.000000000 Z
12
+ date: 2016-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack