delayed-plugins-raven 1.0.3 → 1.0.4

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: 7cda5f840d2a0129ad193541ceaa61077d608223
4
- data.tar.gz: 44df544fa078d48d1782fd0ba2c9cb9030f98cd7
3
+ metadata.gz: 510d9ad154ecf812d69636bf14411ed9371fdd8a
4
+ data.tar.gz: 32a8f245505374f8973dd7743df615bf295b8fb7
5
5
  SHA512:
6
- metadata.gz: 711478e7cc792753ad50c4749de0a7e80fdf4203971c352cdb05570f494b46a45d97086eec1a158343b5aeaf5f9c75d98ea9bcc5b2b063b848a18624289eaf29
7
- data.tar.gz: df16b8b2ec13322a84d1178850ab4d7e198979c7800fcf3f9f61a7b88c0104fabfe6b3973ded4a8d27cf9ef82a52b06cb70b521fd9da0a13b8163adad178f957
6
+ metadata.gz: 568b2b73d59a534bd000ef4a35ddeb29cba537969aa359cae7186e6a841c0f6f514de1f156c47c7d78706426918be88279dec6db1322ed2e824ff7733f7d7ddf
7
+ data.tar.gz: 6686dc7b2dcaf92235994cc24a69e912ecb2fd8400a61c9bb863aa4e1f40e45cfb22cec75b6e9f11cd8fd6450d5c788df89c627ea297739178afe053aa74b7f2
@@ -11,7 +11,7 @@ module Delayed::Plugins::Raven
11
11
  begin
12
12
  ::Raven.capture_exception(error, {
13
13
  configuration: ::Delayed::Plugins::Raven.configuration,
14
- extra: { delayed_job: get_job_json(job) }
14
+ extra: { delayed_job: job.as_json }
15
15
  })
16
16
  rescue Exception => e
17
17
  Rails.logger.error "Raven logging failed: #{e.class.name}: #{e.message}"
@@ -19,20 +19,6 @@ module Delayed::Plugins::Raven
19
19
  end
20
20
  super if defined?(super)
21
21
  end
22
-
23
- private
24
-
25
- def get_job_json(job)
26
- json = job.as_json["job"]
27
- json["handler"] = trim_lines(json["handler"], ::Delayed::Plugins::Raven.max_handler_lines)
28
- json["last_error"] = trim_lines(json["last_error"], ::Delayed::Plugins::Raven.max_error_lines)
29
- json
30
- end
31
-
32
- def trim_lines(string, limit)
33
- return string unless limit
34
- string.lines.to_a.map(&:strip).slice(0, limit).join("\n") if string.present?
35
- end
36
22
  end
37
23
 
38
24
  callbacks do |lifecycle|
@@ -46,7 +32,6 @@ module Delayed::Plugins::Raven
46
32
 
47
33
  class << self
48
34
  attr_accessor :configuration
49
- attr_accessor :max_handler_lines, :max_error_lines
50
35
 
51
36
  def configure
52
37
  @configuration = ::Raven::Configuration.new
@@ -1,7 +1,7 @@
1
1
  module Delayed
2
2
  module Plugins
3
3
  module Raven
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed-plugins-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Qiushi He
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-20 00:00:00.000000000 Z
13
+ date: 2014-02-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sentry-raven