after_commit_exception_notification 0.1.1 → 0.2.0

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: e7981dcf2909b198ed0f6d41e2f43426ac17dbfa
4
- data.tar.gz: 4342afffdc9eca40451c6537983b1d89b95191bf
3
+ metadata.gz: 6999142ad0119ee9882bcd2111a510bc085396cb
4
+ data.tar.gz: 07a177d6a69409b8273f153e74cb76a8ecc6244f
5
5
  SHA512:
6
- metadata.gz: 2a368ef25b94a2074703f81e5d6b54be24dbfab57f8b943ac8237c73eab7679ba960b95edec4fcbe131784de8d25501ce927077d3562e7ae06d54d5971282305
7
- data.tar.gz: 87f6a443ae4112473374e83f62a1ed015fc48fc948c7722662e5e49b7e87c54235bd56df3498af0183b211c1258c1f67674dac892ab317b858be29536b1ceb57
6
+ metadata.gz: 0ce1097a39cd25d017fd30d966b3f1784aa4a8178b7c9db1828ab32098df707278118172c6fbd518450e4013a2fadee77fae70156f6c4282bc66690a8c865ddc
7
+ data.tar.gz: a8d08f3677e6c037cf3a624c478f3af8db11cf8afc947115af46f4b18b9d581edb23c62ebecd8fd9d92674b25739ad73207d2bbd6ea8ba526b0fed09a4e93645
@@ -4,8 +4,12 @@ module AfterCommitExceptionNotification
4
4
  def self.callback(exception = nil, &block)
5
5
  if block
6
6
  @block = block
7
- else
7
+ elsif @block
8
8
  @block.call(exception)
9
+ else
10
+ message = ["After commit failed: #{$!}"].concat $!.backtrace
11
+ ActiveRecord::Base.logger.error(message)
12
+ warn message
9
13
  end
10
14
  end
11
15
 
@@ -1,3 +1,3 @@
1
1
  module AfterCommitExceptionNotification
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: after_commit_exception_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-02 00:00:00.000000000 Z
11
+ date: 2014-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord