appsignal 0.11.6 → 0.11.7.beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0f12c9322a77d5c5442195389f434d06bc0a334d
4
+ data.tar.gz: 8f007c5d9b2abfb9e8880ee8502271859a6d0c88
5
+ SHA512:
6
+ metadata.gz: f936ea6c08024fcac1164f4a6d0b4792ea5e89b7ac1e5f9ad1cf1ccff0734014210004efb3cd187d5ba400c8314a59d52867ceb926ba22462a0ef44181a51e90
7
+ data.tar.gz: 1e0252c19c00511c3edebd399dd89a55c7e3519b5d7c4a8d808f98c4aa75c362ec8b9fa8e90e2584251161c023fda8bb7bb68c8737b299fb582b3aab30a51f13
@@ -1,3 +1,6 @@
1
+ # 0.11.7
2
+ * Add option to override Job name in Delayed Job
3
+
1
4
  # 0.11.6
2
5
  * Use `APPSIGNAL_APP_NAME` and `APPSIGNAL_ACTIVE` env vars in config
3
6
  * Better Sinatra support: Use route as action and set session data for Sinatra
@@ -11,7 +11,13 @@ if defined?(::Delayed::Plugin)
11
11
  end
12
12
 
13
13
  def self.invoke_with_instrumentation(job, block)
14
- class_name, method_name = job.name.split('#')
14
+ class_and_method_name = if job.payload_object.respond_to?(:appsignal_name)
15
+ job.payload_object.appsignal_name
16
+ else
17
+ job.name
18
+ end
19
+ class_name, method_name = class_and_method_name.split('#')
20
+
15
21
  Appsignal.monitor_transaction(
16
22
  'perform_job.delayed_job',
17
23
  :class => class_name,
@@ -1,3 +1,3 @@
1
1
  module Appsignal
2
- VERSION = '0.11.6'
2
+ VERSION = '0.11.7.beta.1'
3
3
  end
@@ -34,7 +34,8 @@ describe "Delayed Job integration" do
34
34
  :priority => 1,
35
35
  :attempts => 1,
36
36
  :queue => 'default',
37
- :created_at => time - 60_000
37
+ :created_at => time - 60_000,
38
+ :payload_object => double
38
39
  )
39
40
  end
40
41
  let(:invoked_block) { Proc.new { } }
@@ -49,13 +50,43 @@ describe "Delayed Job integration" do
49
50
  :priority => 1,
50
51
  :attempts => 1,
51
52
  :queue => 'default',
52
- :queue_start => time - 60_000
53
+ :queue_start => time - 60_000,
53
54
  )
54
55
 
55
56
  Timecop.freeze(time) do
56
57
  plugin.invoke_with_instrumentation(job, invoked_block)
57
58
  end
58
59
  end
60
+
61
+ context "with custom name call" do
62
+ let(:job) do
63
+ double(
64
+ :payload_object => double(
65
+ :appsignal_name => 'CustomClass#perform'
66
+ ),
67
+ :name => 'TestClass#perform',
68
+ :priority => 1,
69
+ :attempts => 1,
70
+ :queue => 'default',
71
+ :created_at => time - 60_000
72
+ )
73
+ end
74
+ it "should wrap in a transaction with the correct params" do
75
+ Appsignal.should_receive(:monitor_transaction).with(
76
+ 'perform_job.delayed_job',
77
+ :class => 'CustomClass',
78
+ :method => 'perform',
79
+ :priority => 1,
80
+ :attempts => 1,
81
+ :queue => 'default',
82
+ :queue_start => time - 60_000
83
+ )
84
+
85
+ Timecop.freeze(time) do
86
+ plugin.invoke_with_instrumentation(job, invoked_block)
87
+ end
88
+ end
89
+ end
59
90
  end
60
91
 
61
92
  context "with an erroring call" do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.6
5
- prerelease:
4
+ version: 0.11.7.beta.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Robert Beekman
@@ -13,118 +12,104 @@ authors:
13
12
  autorequire:
14
13
  bindir: bin
15
14
  cert_chain: []
16
- date: 2015-02-16 00:00:00.000000000 Z
15
+ date: 2015-02-20 00:00:00.000000000 Z
17
16
  dependencies:
18
17
  - !ruby/object:Gem::Dependency
19
18
  name: rack
20
19
  requirement: !ruby/object:Gem::Requirement
21
- none: false
22
20
  requirements:
23
- - - ! '>='
21
+ - - ">="
24
22
  - !ruby/object:Gem::Version
25
23
  version: '0'
26
24
  type: :runtime
27
25
  prerelease: false
28
26
  version_requirements: !ruby/object:Gem::Requirement
29
- none: false
30
27
  requirements:
31
- - - ! '>='
28
+ - - ">="
32
29
  - !ruby/object:Gem::Version
33
30
  version: '0'
34
31
  - !ruby/object:Gem::Dependency
35
32
  name: thread_safe
36
33
  requirement: !ruby/object:Gem::Requirement
37
- none: false
38
34
  requirements:
39
- - - ! '>='
35
+ - - ">="
40
36
  - !ruby/object:Gem::Version
41
37
  version: '0'
42
38
  type: :runtime
43
39
  prerelease: false
44
40
  version_requirements: !ruby/object:Gem::Requirement
45
- none: false
46
41
  requirements:
47
- - - ! '>='
42
+ - - ">="
48
43
  - !ruby/object:Gem::Version
49
44
  version: '0'
50
45
  - !ruby/object:Gem::Dependency
51
46
  name: rake
52
47
  requirement: !ruby/object:Gem::Requirement
53
- none: false
54
48
  requirements:
55
- - - ! '>='
49
+ - - ">="
56
50
  - !ruby/object:Gem::Version
57
51
  version: '0'
58
52
  type: :development
59
53
  prerelease: false
60
54
  version_requirements: !ruby/object:Gem::Requirement
61
- none: false
62
55
  requirements:
63
- - - ! '>='
56
+ - - ">="
64
57
  - !ruby/object:Gem::Version
65
58
  version: '0'
66
59
  - !ruby/object:Gem::Dependency
67
60
  name: rspec
68
61
  requirement: !ruby/object:Gem::Requirement
69
- none: false
70
62
  requirements:
71
- - - ~>
63
+ - - "~>"
72
64
  - !ruby/object:Gem::Version
73
65
  version: 2.14.1
74
66
  type: :development
75
67
  prerelease: false
76
68
  version_requirements: !ruby/object:Gem::Requirement
77
- none: false
78
69
  requirements:
79
- - - ~>
70
+ - - "~>"
80
71
  - !ruby/object:Gem::Version
81
72
  version: 2.14.1
82
73
  - !ruby/object:Gem::Dependency
83
74
  name: pry
84
75
  requirement: !ruby/object:Gem::Requirement
85
- none: false
86
76
  requirements:
87
- - - ! '>='
77
+ - - ">="
88
78
  - !ruby/object:Gem::Version
89
79
  version: '0'
90
80
  type: :development
91
81
  prerelease: false
92
82
  version_requirements: !ruby/object:Gem::Requirement
93
- none: false
94
83
  requirements:
95
- - - ! '>='
84
+ - - ">="
96
85
  - !ruby/object:Gem::Version
97
86
  version: '0'
98
87
  - !ruby/object:Gem::Dependency
99
88
  name: timecop
100
89
  requirement: !ruby/object:Gem::Requirement
101
- none: false
102
90
  requirements:
103
- - - ! '>='
91
+ - - ">="
104
92
  - !ruby/object:Gem::Version
105
93
  version: '0'
106
94
  type: :development
107
95
  prerelease: false
108
96
  version_requirements: !ruby/object:Gem::Requirement
109
- none: false
110
97
  requirements:
111
- - - ! '>='
98
+ - - ">="
112
99
  - !ruby/object:Gem::Version
113
100
  version: '0'
114
101
  - !ruby/object:Gem::Dependency
115
102
  name: webmock
116
103
  requirement: !ruby/object:Gem::Requirement
117
- none: false
118
104
  requirements:
119
- - - ! '>='
105
+ - - ">="
120
106
  - !ruby/object:Gem::Version
121
107
  version: '0'
122
108
  type: :development
123
109
  prerelease: false
124
110
  version_requirements: !ruby/object:Gem::Requirement
125
- none: false
126
111
  requirements:
127
- - - ! '>='
112
+ - - ">="
128
113
  - !ruby/object:Gem::Version
129
114
  version: '0'
130
115
  description: The official appsignal.com gem
@@ -135,9 +120,9 @@ executables:
135
120
  extensions: []
136
121
  extra_rdoc_files: []
137
122
  files:
138
- - .gitignore
139
- - .rspec
140
- - .travis.yml
123
+ - ".gitignore"
124
+ - ".rspec"
125
+ - ".travis.yml"
141
126
  - CHANGELOG.md
142
127
  - Gemfile
143
128
  - LICENSE
@@ -253,27 +238,26 @@ files:
253
238
  homepage: https://github.com/appsignal/appsignal
254
239
  licenses:
255
240
  - MIT
241
+ metadata: {}
256
242
  post_install_message:
257
243
  rdoc_options: []
258
244
  require_paths:
259
245
  - lib
260
246
  required_ruby_version: !ruby/object:Gem::Requirement
261
- none: false
262
247
  requirements:
263
- - - ! '>='
248
+ - - ">="
264
249
  - !ruby/object:Gem::Version
265
250
  version: '1.9'
266
251
  required_rubygems_version: !ruby/object:Gem::Requirement
267
- none: false
268
252
  requirements:
269
- - - ! '>='
253
+ - - ">"
270
254
  - !ruby/object:Gem::Version
271
- version: '0'
255
+ version: 1.3.1
272
256
  requirements: []
273
257
  rubyforge_project:
274
- rubygems_version: 1.8.23
258
+ rubygems_version: 2.2.2
275
259
  signing_key:
276
- specification_version: 3
260
+ specification_version: 4
277
261
  summary: Logs performance and exception data from your app to appsignal.com
278
262
  test_files:
279
263
  - spec/lib/appsignal/agent_spec.rb