appsignal 0.8.10 → 0.8.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0143518e3ed38672314841d554a6171695d94bdc
4
- data.tar.gz: ae7a93a1b61816ebd9160f539bb26e19b867b588
3
+ metadata.gz: 0ec48b20664d56b076ded5a3e0114f294a7c0623
4
+ data.tar.gz: 6ec31090947b82fd5542665407e55bc8008ff464
5
5
  SHA512:
6
- metadata.gz: cca49e04e47c95ba38c81fbc1def005d733173483920f0db3bdfaab7157d8cf74e418c17e794409bf966aeb261375f15e21ea5ec890b4bfd38be49fd0b5cde78
7
- data.tar.gz: 60c2e57c63987a89e70ed7736285555cc757effcbacd5f3e5889ae3ae895563d7accf1d31cb9b11760e1a11ac0cd9ab71d77de27856f4d863e73f2dd5bd04457
6
+ metadata.gz: 90e7b37d11a139d19c946e457b053e0f5f475c1b404f6b0f467b25899ceb826cc67680d4ad62ea52b1324ec1e66303a94021ca960187c77dacb917e493bae710
7
+ data.tar.gz: 13d1731f5513fc10d4cfc278969fbf57626b84b02a89a6c3b1e17dfa3b9cc5a0f7a3c8a35ee446fffd3b755c83311d2740c84fd0c611f78e1eda043615e6e8ac
@@ -3,19 +3,25 @@ language: ruby
3
3
  rvm:
4
4
  - "1.9.3"
5
5
  - "2.0.0"
6
+ - "2.1.1"
6
7
  - "jruby-19mode"
7
- - "rbx-2.1.1"
8
+ - "rbx"
8
9
 
9
10
  gemfile:
10
- - "gemfiles/rack.gemfile"
11
+ - "gemfiles/no_dependencies.gemfile"
11
12
  - "gemfiles/rails-3.0.gemfile"
12
13
  - "gemfiles/rails-3.1.gemfile"
13
14
  - "gemfiles/rails-3.2.gemfile"
14
15
  - "gemfiles/rails-4.0.gemfile"
15
16
  - "gemfiles/rails-4.1.gemfile"
17
+ - "gemfiles/sinatra.gemfile"
16
18
 
17
19
  matrix:
18
20
  allow_failures:
19
21
  - rvm: "jruby-19mode"
22
+ - rvm: "rbx"
20
23
 
21
- script: "RAILS_ENV=test bundle exec rspec spec"
24
+ env:
25
+ global: "RAILS_ENV=test"
26
+
27
+ script: "bundle exec rspec"
@@ -1,3 +1,6 @@
1
+ # 0.8.11
2
+ * Skip enqueue, send_exception and add_exception if not active
3
+
1
4
  # 0.8.10
2
5
  * Bugfix: Don't pause agent when it's not active
3
6
 
data/README.md CHANGED
@@ -5,6 +5,7 @@ This gem collects error and performance data from your Rails
5
5
  applications and sends it to [AppSignal](https://appsignal.com)
6
6
 
7
7
  [![Build Status](https://travis-ci.org/appsignal/appsignal.png?branch=develop)](https://travis-ci.org/appsignal/appsignal)
8
+ [![Gem Version](https://badge.fury.io/rb/appsignal.svg)](http://badge.fury.io/rb/appsignal)
8
9
  [![Code Climate](https://codeclimate.com/github/appsignal/appsignal.png)](https://codeclimate.com/github/appsignal/appsignal)
9
10
 
10
11
  ## Pull requests / issues
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
11
11
  ]
12
12
  gem.email = ['support@appsignal.com']
13
13
  gem.description = 'The official appsignal.com gem'
14
- gem.summary = 'Logs performance and exception data from your app to'\
14
+ gem.summary = 'Logs performance and exception data from your app to '\
15
15
  'appsignal.com'
16
16
  gem.homepage = 'https://github.com/appsignal/appsignal'
17
17
  gem.license = 'MIT'
@@ -52,6 +52,7 @@ module Appsignal
52
52
  #
53
53
  # @since 0.5.0
54
54
  def enqueue(transaction)
55
+ return unless active?
55
56
  agent.enqueue(transaction)
56
57
  end
57
58
 
@@ -63,7 +64,7 @@ module Appsignal
63
64
  end
64
65
 
65
66
  def send_exception(exception, tags=nil)
66
- return if is_ignored_exception?(exception)
67
+ return if !active? || is_ignored_exception?(exception)
67
68
  transaction = Appsignal::Transaction.create(SecureRandom.uuid, ENV)
68
69
  transaction.add_exception(exception)
69
70
  transaction.set_tags(tags) if tags
@@ -72,13 +73,14 @@ module Appsignal
72
73
  end
73
74
 
74
75
  def add_exception(exception)
75
- return if Appsignal::Transaction.current.nil? || exception.nil?
76
+ return if !active? || Appsignal::Transaction.current.nil? || exception.nil?
76
77
  unless is_ignored_exception?(exception)
77
78
  Appsignal::Transaction.current.add_exception(exception)
78
79
  end
79
80
  end
80
81
 
81
82
  def tag_request(params={})
83
+ return unless active?
82
84
  transaction = Appsignal::Transaction.current
83
85
  return false unless transaction
84
86
  transaction.set_tags(params)
@@ -1,3 +1,3 @@
1
1
  module Appsignal
2
- VERSION = '0.8.10'
2
+ VERSION = '0.8.11'
3
3
  end
@@ -96,6 +96,52 @@ describe Appsignal do
96
96
  end
97
97
  end
98
98
 
99
+ context "not active" do
100
+ describe "#enqueue" do
101
+ it "should do nothing" do
102
+ lambda {
103
+ Appsignal.enqueue(Appsignal::Transaction.create(SecureRandom.uuid, ENV))
104
+ }.should_not raise_error
105
+ end
106
+ end
107
+
108
+ describe "#listen_for_exception" do
109
+ it "should do nothing" do
110
+ error = RuntimeError.new('specific error')
111
+ lambda {
112
+ Appsignal.listen_for_exception do
113
+ raise error
114
+ end
115
+ }.should raise_error(error)
116
+ end
117
+ end
118
+
119
+ describe "#send_exception" do
120
+ it "should do nothing" do
121
+ lambda {
122
+ Appsignal.send_exception(RuntimeError.new)
123
+ }.should_not raise_error
124
+ end
125
+ end
126
+
127
+ describe "#add_exception" do
128
+ it "should do nothing" do
129
+ lambda {
130
+ Appsignal.add_exception(RuntimeError.new)
131
+ }.should_not raise_error
132
+ end
133
+ end
134
+
135
+ describe "#tag_request" do
136
+ it "should do nothing" do
137
+ lambda {
138
+ Appsignal.tag_request(:tag => 'tag')
139
+ }.should_not raise_error
140
+ end
141
+ end
142
+ end
143
+
144
+
99
145
  context "with config and started" do
100
146
  before do
101
147
  Appsignal.config = project_fixture_config
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: 0.8.10
4
+ version: 0.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-04-24 00:00:00.000000000 Z
15
+ date: 2014-05-08 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -248,7 +248,7 @@ rubyforge_project:
248
248
  rubygems_version: 2.2.2
249
249
  signing_key:
250
250
  specification_version: 4
251
- summary: Logs performance and exception data from your app toappsignal.com
251
+ summary: Logs performance and exception data from your app to appsignal.com
252
252
  test_files:
253
253
  - spec/lib/appsignal/agent_spec.rb
254
254
  - spec/lib/appsignal/aggregator/middleware/action_view_sanitizer_spec.rb